Requests
Provide access to the client and order information when creating a merchant gateway
I'm working towards integrating a merchant gateway into Blesta. I thought of doing it as a merchant gateway because it allows to save CCs as tokens, but the way of interacting with the APIs is a little different, and I believe it's not fully supported in Blesta (as I talked with Jono on Discord).
The gateway requires me to:
1. Acquire an authorization token before loading the credit card js form.
The request for that authorization code needs to include some information on the order that is about to get paid on the JS form: for example:
- The gateway's secret key: which is available
- The gateway's order ID: I don't know if each purchase is available as an order per se.
- Amount of the order
- Currency
That returned token is used to call the JS form to pay with credit card. It's basically pre authorized for that specific payment request.
2. After the payment is finished, the gateway will use a callback URL to post the result.
I believe this is doable right now.
The issue is that the buildCCForm function does not get any data about the order itself, like the amount, order_id, and so on, in order to use them for the token request.
-----
My specific request would be to make those order information available throughout the whole payment process.
-----
Please, let me know if I need to post this on the forum or in other place.
Please consider this request for merchant gateways.
The solution would be to pass all the order and client information to the buildCCForm method, so we can use them when creating the form.
Comments have been locked on this page!