This pull request is introducing PromptPay payment method to Omise-WooCommerce plugin.
Related information:
Related issue(s): T22500 (internal ticket)
2. Description of change
Displaying PromptPay payment method at the checkout page.
Displaying PromptPay QR code at the Thank-you page.
Alongs with the QR code expiry date.
Displaying successful payment message if the payment has been successfully paid.
Displaying failed payment message if the payment has failed.
After 10 minutes, if a particular order status still stay as on-hold then the plugin will stop Ajax-polling request to save the computer resource and display a 'refresh' button to allow buyer to fetch a payment status manually instead.
Displaying a link to PromptPay QR code at the order-confirmation email.
3. Quality assurance
🔧 Environments:
WooCommerce: v4.3
WordPress: v5.4.2
PHP version: 7.3.3.
✏️ Details:
There are 2 aspects that we want to test for this pull request, "merchant's perspective" and "buyer's perspective".
All the tests in this section will be separated into 2 situations as mentioned.
Setting up:
Once installed this PR, at the admin page, from sidebar menu Omise > Settings. You will see the PromptPay payment method is listed at the Available Payment Methods table. Click config
You may rename or add a payment description at the payment configuration page. Then, check the Enable Omise PromptPay Payment and click Save changes
To be able to use the full feature of plugin, you may set the Webhook endpoint to your Omise Account as well.
Note: As Webhook endpoint requires for HTTPS server. For localhost test, you can use https://ngrok.com tool to simulate for https protocol.
Once done, the PromptPay payment method will be listed at the checkout page.
Placing Order:
As a buyer:
Once the payment method has been set and enabled. Buyers will be able to placing order using PromptPay payment method at the checkout page.
After selecting PromptPay as a payment method, PromptPay QR code will be displayed at the WooCommerce Order-Confirmation page (thank-you page), along with the QR code expiry date.
Important: at this step, there will be AJAX polling request running behind to keep fetch order status every 10 seconds for 10 minutes to check if the payment has been paid (to update the screen accordingly). After 10 minutes, the AJAX will be terminated and displaying "refresh status" on the screen instead.
As well, there will be an email sent to buyer's billing email.
At this point, user may scan the QR code to pay.
As a merchant:
Once buyers make placed an order using PromptPay payment method, a new order with on-hold status will be created on WooCommerce.
Complete the payment
As a buyer:
Once the buyer paid for the payment, if payment is successful, there will be a successful payment message appear on the screen.
Once the buyer paid for the payment, if payment is failed, there will be a failure payment message appear on the screen.
In case if buyer didn't complete the transaction within 10 minutes, there will be a button refresh status appeared on the screen (this means that the AJAX polling has been terminated. Buyer can click this button to reactivate the AJAX script).
As a merchant:
In case of payment successful, the order status will be updated to processing.
In case of payment successful, the order status will be updated to failed.
1. Objective
This pull request is introducing PromptPay payment method to Omise-WooCommerce plugin.
Related information: Related issue(s): T22500 (internal ticket)
2. Description of change
Displaying PromptPay payment method at the checkout page.
Displaying PromptPay QR code at the Thank-you page. Alongs with the QR code expiry date.
Displaying successful payment message if the payment has been successfully paid.
Displaying failed payment message if the payment has failed.
After 10 minutes, if a particular order status still stay as
on-hold
then the plugin will stop Ajax-polling request to save the computer resource and display a 'refresh' button to allow buyer to fetch a payment status manually instead.Displaying a link to PromptPay QR code at the
order-confirmation
email.3. Quality assurance
🔧 Environments:
✏️ Details:
There are 2 aspects that we want to test for this pull request, "merchant's perspective" and "buyer's perspective". All the tests in this section will be separated into 2 situations as mentioned.
Setting up:
Once installed this PR, at the admin page, from sidebar menu
Omise > Settings
. You will see the PromptPay payment method is listed at the Available Payment Methods table. Click configYou may rename or add a payment description at the payment configuration page. Then, check the
Enable Omise PromptPay Payment
and click Save changesTo be able to use the full feature of plugin, you may set the Webhook endpoint to your Omise Account as well.
Once done, the PromptPay payment method will be listed at the checkout page.
Placing Order:
As a buyer:
Once the payment method has been set and enabled. Buyers will be able to placing order using PromptPay payment method at the checkout page.
After selecting PromptPay as a payment method, PromptPay QR code will be displayed at the WooCommerce Order-Confirmation page (thank-you page), along with the QR code expiry date.
As well, there will be an email sent to buyer's billing email.
At this point, user may scan the QR code to pay.
As a merchant:
Once buyers make placed an order using PromptPay payment method, a new order with
on-hold
status will be created on WooCommerce.Complete the payment
As a buyer:
Once the buyer paid for the payment, if payment is successful, there will be a successful payment message appear on the screen.
Once the buyer paid for the payment, if payment is failed, there will be a failure payment message appear on the screen.
In case if buyer didn't complete the transaction within 10 minutes, there will be a button refresh status appeared on the screen (this means that the AJAX polling has been terminated. Buyer can click this button to reactivate the AJAX script).
As a merchant:
In case of payment successful, the order status will be updated to
processing
.In case of payment successful, the order status will be updated to
failed
.4. Impact of the change
None
5. Priority of change
Normal
6. Additional Notes
Nothing.