Solve the invalid display of payment result message on PrestaShop order confirmation page.
Related information:
Related issue: -
Related ticket: -
2. Description of change
Remove a condition checking the current PrestaShop order status when redirect payer back to PrestaShop.
3. Quality assurance
Environments:
Platform: PrestaShop 1.7.2.4
Omise plugin: Omise PrestaShop 1.3
PHP: 5.6.31
Details:
Steps to reproduce
Configure the Omise webhooks.
Proceed checkout.
At the payment step, pay by Omise internet banking.
At the Omise internet banking testing page, click Failure button AND IMMEDIATELY push escape (esc) button on keyboard.
Refresh page.
The 3rd and 4th steps are the simulation of the situation that the notification via webhooks is faster than the redirection of payer back to PrestaShop site. Pushing the esc button on keyboard makes the redirection has been stopped but the notification via webhooks still working. And then refresh the page on 5th step makes the redirection back to PrestaShop site after the webhooks has been handled by Omise PrestaShop.
The screenshot below shows Omise internet banking testing page. Click Failure button AND IMMEDIATELY push esc button on the keyboard.
The screenshot below shows the invalid display of payment result message on PrestaShop order confirmation page.
After change:
Reproduce the above steps. The system display the error message correctly.
4. Impact of the change
-
5. Priority of change
Normal
6. Additional notes
Due to the offsite payment, it has the redirection flow. The offsite payment such as internet banking payment. This offsite payment includes the implementation of Omise webhooks, it is possible that webhooks is faster than redirection. The steps of this situation are;
Payer completed their payment but the payment is failed. So, Omise charge is failed.
The notification from bank to Omise was passed or forwarded to the PrestaShop site via Omise webhooks FASTER THAN the redirection of payer back to PrestaShop site.
Omise PrestaShop handled this webhooks event by changed the PrestaShop order status to be Canceled because Omise charge is failed.
When the payer has been redirected back to PrestaShop site, the Omise PrestaShop strictly check the current PrestaShop order status but the PrestaShop order status of this payment has been changed to be canceled.
This condition or situation can be happened normally with the payment that has the redirection flow.
So, the condition checking the current PrestaShop order status (the PrestaShop order status was allowed only 2 status, processing and payment accepted) when payer has been redirected back to PrestaShop site should be removed by this pull request.
1. Objective
Solve the invalid display of payment result message on PrestaShop order confirmation page.
Related information:
2. Description of change
Remove a condition checking the current PrestaShop order status when redirect payer back to PrestaShop.
3. Quality assurance
Environments:
Details:
Steps to reproduce
The 3rd and 4th steps are the simulation of the situation that the notification via webhooks is faster than the redirection of payer back to PrestaShop site. Pushing the esc button on keyboard makes the redirection has been stopped but the notification via webhooks still working. And then refresh the page on 5th step makes the redirection back to PrestaShop site after the webhooks has been handled by Omise PrestaShop.
The screenshot below shows Omise internet banking testing page. Click Failure button AND IMMEDIATELY push esc button on the keyboard.
The screenshot below shows the invalid display of payment result message on PrestaShop order confirmation page.
After change:
Reproduce the above steps. The system display the error message correctly.
4. Impact of the change
-
5. Priority of change
Normal
6. Additional notes
Due to the offsite payment, it has the redirection flow. The offsite payment such as internet banking payment. This offsite payment includes the implementation of Omise webhooks, it is possible that webhooks is faster than redirection. The steps of this situation are;
This condition or situation can be happened normally with the payment that has the redirection flow.
So, the condition checking the current PrestaShop order status (the PrestaShop order status was allowed only 2 status, processing and payment accepted) when payer has been redirected back to PrestaShop site should be removed by this pull request.