Solve the situation that the payment result notification from bank server to Omise server is slower than the redirection of payer from bank site back to PrestaShop site.
In this situation, the status of Omise charge is pending and unpaid.
In other words, when the payer has been redirected back to PrestaShop site but Omise server is not received the payment result from bank, this situation causes the incorrect payment result display at order confirmation page.
Related information:
Related issue: -
Related ticket: -
2. Description of change
Change the step of condition that checked the Omise paid status.
3. Quality assurance
Environments:
Platform: PrestaShop 1.7.2.4
Omise plugin: Omise PrestaShop 1.3
PHP: 5.6.3.1
Details:
Before change:
The screenshot below shows the incorrect result of order confirmation page. From the screenshot, the error message box has been displayed but it has no any error message. This situation, payment has no error. The Omise charge status is just pending which Omise can not sure the result of payment from bank but the PrestaShop system display the error.
The screenshot below shows the PrestaShop back office, order detail page. The order status is processing.
The screenshot below shows the Omise dashboard, charge detail page. The charge status is pending and unpaid.
After change:
The screenshot below shows the correct result of order confirmation page.
The PrestaShop order status is processing and Omise charge status is pending and unpaid same as the before change.
4. Impact of the change
-
5. Priority of change
Normal
6. Additional notes
To reproduce the incorrect result above, it can be done by doing on Omise test account.
Steps to reproduce are:
Proceed checkout
At the payment step, pay by Omise internet banking
Refresh on the Omise internet banking testing page
After submit payment, the system will redirect payer to the Omise internet banking testing page.
From the screenshot below, refresh the page.
According to the situation that the notification of payment result from bank to Omise server is slower than the redirection of payer from bank site back to PrestaShop site, this situation is not easy to test or simulate without any additional configuration or software such as proxy or mocking.
The steps above can be used to closely simulate this situation without any additional configuration or software.
This situation can be solved by using Omise webhooks. The Omise webhooks feature that synchronized between Omise charge detail and PrestaShop order detail has been implemented in the pull request, #46.
1. Objective
Solve the situation that the payment result notification from bank server to Omise server is slower than the redirection of payer from bank site back to PrestaShop site.
In this situation, the status of Omise charge is pending and unpaid.
In other words, when the payer has been redirected back to PrestaShop site but Omise server is not received the payment result from bank, this situation causes the incorrect payment result display at order confirmation page.
Related information:
2. Description of change
Change the step of condition that checked the Omise paid status.
3. Quality assurance
Environments:
Details:
Before change:
The screenshot below shows the incorrect result of order confirmation page. From the screenshot, the error message box has been displayed but it has no any error message. This situation, payment has no error. The Omise charge status is just pending which Omise can not sure the result of payment from bank but the PrestaShop system display the error.
The screenshot below shows the PrestaShop back office, order detail page. The order status is processing.
The screenshot below shows the Omise dashboard, charge detail page. The charge status is pending and unpaid.
After change:
The screenshot below shows the correct result of order confirmation page.
The PrestaShop order status is processing and Omise charge status is pending and unpaid same as the before change.
4. Impact of the change
-
5. Priority of change
Normal
6. Additional notes
Steps to reproduce are:
After submit payment, the system will redirect payer to the Omise internet banking testing page.
From the screenshot below, refresh the page.
According to the situation that the notification of payment result from bank to Omise server is slower than the redirection of payer from bank site back to PrestaShop site, this situation is not easy to test or simulate without any additional configuration or software such as proxy or mocking.
The steps above can be used to closely simulate this situation without any additional configuration or software.