omise / omise-prestashop

Omise PrestaShop Plugin
https://docs.opn.ooo/prestashop-plugin
MIT License
4 stars 7 forks source link

Solve the invalid display of payment result message on PrestaShop order confirmation page #49

Closed nimid closed 6 years ago

nimid commented 6 years ago

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

  1. Configure the Omise webhooks.
  2. Proceed checkout.
  3. At the payment step, pay by Omise internet banking.
  4. At the Omise internet banking testing page, click Failure button AND IMMEDIATELY push escape (esc) button on keyboard.
  5. 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.

omise-internet-banking-testing-page

The screenshot below shows the invalid display of payment result message on PrestaShop order confirmation page.

prestashop-1 7 2 4-omise-prestashop-condition-of-order-status-is-invalid

After change:

Reproduce the above steps. The system display the error message correctly.

prestashop-1 7 2 4-omise-prestashop-failed-processing-payment-result-on-order-confirmation-page

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.