Jump to content

Recommended Posts

Posted

Hi all,

 

Currently, the transaction has 7 order status :

  1. Approved
  2. Declined
  3. Error
  4. Voided
  5. Pending
  6. Refunded
  7. Returned

Now, I wanna create a new order status with name is Pending Capture.So, how can i do this?

 

Thanks,

Phong

post-11453-0-06070700-1444202484_thumb.p

Posted

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 .

Posted

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

Posted

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.

Posted

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 .....

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...