Jump to content

Show external Transaction ID on Backoffice order information even if order is Cancelled


Recommended Posts

Hi!
I'm developing a payment module to integrate with our online payment gateway. I have everything done, but I want to add information about the payment status in the order information in Prestashop. The first thing I tried was to add messages to the order to inform about this (state, message from our payment processor, transaction id...), but it seems that adding messages using validateOrder() has a bug that is pending to be fixed
Later, I tried to attach it using transaction_id, and this works and I like how it looks, but this only works when the order is completed and valid. The thing is that when there is an error and I cancel the order or mark it as failed, I need to also attach the transaction id that we have generated from our payment processor so that they can search for this transaction in the POS admin portal (we can't use the same id of Prestashop cause our trans_id must be 12 characters long, and we need to add 3 random numbers to avoid repeating transaction ids. How could I display this id? I am really out of ideas.

I have come up with ideas like validating the order and then updating its status to cancelled, but apart from that I don't know how to cancel it afterwards, this would send a confirmation email so it is not an option. Another is if there is a method to add the payment information to the order afterwards, because manually I can do it even if the order is cancelled, but I don't know how to do it from the module using PHP.

Thanks for your help!

Edited by Silver Knight
Added a link for reference (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...