tdphong Posted October 7, 2015 Report Share Posted October 7, 2015 Hi all, Currently, the transaction has 7 order status : Approved Declined Error Voided Pending Refunded Returned Now, I wanna create a new order status with name is Pending Capture.So, how can i do this? Thanks, Phong Quote Link to comment Share on other sites More sharing options...
activa Posted October 7, 2015 Report Share Posted October 7, 2015 you need to make some change in the database to add the status "Pending Capture" to the status column , then you need to change the transaction model to add the new status in the queries . and the language file & the template files . for a normal user is not easy , bur for a developer is easy and can take just 10 mins of code customization . you need to save the files for upgrade case . some gateways return status that is not exist in blesta , so is better to adjust the gateway response to the status's blesta . Quote Link to comment Share on other sites More sharing options...
Tyson Posted October 7, 2015 Report Share Posted October 7, 2015 What's the reason behind the new status? Why is the normal 'pending' status not sufficient here? Quote Link to comment Share on other sites More sharing options...
tdphong Posted October 8, 2015 Author Report Share Posted October 8, 2015 Hi Tyson, Our payment method support to authorize first in checkout then capture later in admin site. If the authorization is successful, I will mark order status as "Pending Capture" just for a meaningful status. Thanks, Phong Quote Link to comment Share on other sites More sharing options...
Tyson Posted October 8, 2015 Report Share Posted October 8, 2015 I see. As activa mentioned, there are several places you would have to update to add the status. Starting by adding it to the database and making it available from the Transactions model (app/models/transactions.php) in all relevant queries. Then, add it to the UI on the page it should be displayed on. Quote Link to comment Share on other sites More sharing options...
tdphong Posted October 9, 2015 Author Report Share Posted October 9, 2015 Hi Tyson, I don't understand clearly. Can you tell me about this? So, when the Blesta upgrade, I have to do again the step above? Thanks, Quote Link to comment Share on other sites More sharing options...
Blesta Addons Posted October 9, 2015 Report Share Posted October 9, 2015 So, when the Blesta upgrade, I have to do again the step above? Thanks, what i suggestfor you is to create a plugin that act in the event Transactions.add , and get the transaction by thier ID , so if the transaction belong to your gateways and has the status "pending" add it to the plugin page list , then you can easly identify wich transaction need to be ready for capture ..... activa 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.