Display the proper checkout result page both successful checkout and failed checkout.
Related information:
Related issue: -
Related ticket: T1279
Required pull request: #18
2. Description of change
Add a helper function to check whether Omise charge responded from Omise API failed
Add a helper function to get the failure code and message from the response of Omise API
Add a new template file to display the failed checkout
Implement the function to display successful checkout
3. Quality assurance
Environments:
Platform: PrestaShop 1.6.1.6
Omise plugin: Omise-PrestaShop 1.6.0.0
Omise-PHP: 2.5.0
PHP: 5.6.28
Mozilla Firefox: 50.1.0
Details:
Make sure that the Omise-PrestaShop has been installed and enabled.
At the front-end, add a product to cart.
Proceed to checkout.
Test case 1: Successfully checkout
At the step, 05. Payment, fill the valid card information and click button, Submit Payment. The system will process the payment and display the successful checkout page.
The screenshot below shows the successful checkout page.
Test case 2: Payment is failed
At the step, 05. Payment, fill the invalid card number for test and click button, Submit Payment. The system will process the payment and display the error checkout page.
The screenshot below shows the failed checkout page.
Test case 3: Exception occur during payment
Login to the back-end.
Configure the Omise module, input the invalid secret key.
Save the configuration.
Go to the front-end.
Proceed to checkout.
At the step, 05. Payment, fill the valid card information and click button, Submit Payment. The system will process the payment and display the error checkout page with the error message authentication failed.
The screenshot below shows the failed checkout page.
1. Objective
Display the proper checkout result page both successful checkout and failed checkout.
Related information: Related issue: - Related ticket: T1279 Required pull request: #18
2. Description of change
3. Quality assurance
Environments:
Details:
Test case 1: Successfully checkout
The screenshot below shows the successful checkout page.
Test case 2: Payment is failed
The screenshot below shows the failed checkout page.
Test case 3: Exception occur during payment
authentication failed
.The screenshot below shows the failed checkout page.
4. Impact of the change
-
5. Priority of change
Normal
6. Additional notes
The screenshot below shows the passed unit tests at Travis CI.