omise / omise-prestashop

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

Update the order status to be canceled instead of remain it processing in progress #27

Closed nimid closed 7 years ago

nimid commented 7 years ago

1. Objective

For the 3-D Secure payment, if charge is failed, update the order status to be Canceled instead of remain it Processing in progress.

Related information:

2. Description of change

At the 3-D Secure payment controller class, add a command to update the order status to be canceled, if it has an error from the Omise charge process.

3. Quality assurance

Environments:

Details:

There are 2 test cases below.

  1. Test create failed 3-D Secure charge with the condition, Fail Pre-auth aka Invalid Security Code, expect that the order status is Canceled.

  2. Test create failed 3-D Secure charge with the condition, Fail 3DS Card Enrollment, expect that the order status is Canceled.

Prerequisite

At the back-end

The screenshot below shows the Omise configuration at the back-end. In the red box, it is the setting for 3-D Secure payment.

screenshot-localhost 16114-2017-06-21-17-30-24

Test case 1:

At the front-end

For an example, 4111 1111 1116 0001.

The expectation is meet. The screenshot below shows the PrestaShop order detail at the back-end. The current order status is canceled. Note that in the red box, the transaction ID is Omise charge ID. The PrestaShop order status and Omise charge status are consistent.

screenshot-localhost 16114-2017-06-21-18-11-08

The screenshot below shows the Omise charge detail at the Omise dashboard.

omise

Test case 2:

At the front-end

For an example, 4111 1111 1115 0002.

The expectation is meet. The screenshot below shows the PrestaShop order detail at the back-end. The current order status is canceled. Note that in the red box, the transaction ID is Omise charge ID. The PrestaShop order status and Omise charge status are consistent.

screenshot-localhost 16114-2017-06-21-18-19-30

The screenshot below shows the Omise charge detail at the Omise dashboard.

omise2

4. Impact of the change

This change impacts to only one payment process, 3-D Secure payment.

5. Priority of change

Normal

6. Additional notes

-