To make charge with Internet Banking payment method and handle the callback.
2. Description of change
Once a user select an internet banking provider and click the submit button, the page will use XHR to call the checkout method of the offsite extension. The extension then adds order to the database with pending state and calls Omise charge API with offsite parameter (see https://www.omise.co/offsite-payment) and returns authorize_uri to the front end.
The front end will then redirect user to bank authorize page, allowing users to enter their credentials and it will redirect back to OpenCart offsite extension's callback page. The callback page checks for payment result and update order status to either success or failed, then redirects user to the appropriated page.
3. Quality assurance
🔧 Environments:
Platform version: OpenCart 2.0.3.1.
Omise plugin version: Omise-OpenCart 2.0.0.1
PHP versions: 7.0.17
✏️ Details:
Buy some item.
Select the "Internet Banking (Powered by Omise)" payment method, accept T&C, and click continue.
Select any bank, and click confirm order.
Process at the authorize screen.
Wait for success/failure result.
There should be a new capture object in Omise dashboard.
This PR requires #40 to be merged first.
1. Objective
To make charge with Internet Banking payment method and handle the callback.
2. Description of change
Once a user select an internet banking provider and click the submit button, the page will use XHR to call the checkout method of the offsite extension. The extension then adds order to the database with pending state and calls Omise
charge
API withoffsite
parameter (see https://www.omise.co/offsite-payment) and returnsauthorize_uri
to the front end.The front end will then redirect user to bank authorize page, allowing users to enter their credentials and it will redirect back to OpenCart offsite extension's callback page. The callback page checks for payment result and update order status to either success or failed, then redirects user to the appropriated page.
3. Quality assurance
🔧 Environments:
✏️ Details:
4. Impact of the change
This PR changes no UI. But make the flow success.
5. Priority of change
Normal.
6. Additional notes
This PR requires #40 to be merged first.