omise / omise-woocommerce

Omise WooCommerce Plugin
https://docs.opn.ooo/woocommerce-plugin
MIT License
47 stars 27 forks source link

Introducing PayNow payment method (only available in Singapore) #152

Closed guzzilar closed 4 years ago

guzzilar commented 4 years ago

1. Objective

As Omise has been providing a support for PayNow payment method. This pull request is to integrate the new PayNow payment to WooCommerce plugin.

Related information: Related issue(s): T19391 (internal ticket)

2. Description of change

IMPORTANT: The changes only appear when using Omise Singapore account.

  1. Integrating Omise PayNow payment method with WooCommerce. At Omise Settings page, you will see a new payment method, "PayNow". Screen Shot 2563-02-26 at 12 04 44 copy
Screen Shot 2563-02-24 at 09 50 20
  1. Once enabled the payment, the PayNow payment method will be appeared at WooCommerce Checkout page.

    Screen Shot 2563-02-25 at 16 48 09
  2. Displaying PayNow QR code at the order-confirmation page, once placing an order with PayNow payment method.

    Screen Shot 2563-02-25 at 16 48 37
  3. With Omise Webhook feature, once the charge has been paid, an order status will be updated to processing.

    Screen Shot 2563-02-25 at 17 00 23

3. Quality assurance

🔧 Environments:

✏️ Details:

IMPORTANT: To test this feature, requires Omise Singapore account, and also the Webhook feature should be set on that particular account.

1. Making sure that the payment method's setting is available only on Omise Singapore account.

Using Omise Singapore account

Screen Shot 2563-02-26 at 12 04 44 copy

Using Omise Japan account

Screen Shot 2563-02-26 at 12 03 40

2. Making sure that once enabled the PayNow payment method, the method will be displayed at WooCommerce Checkout page properly.

Screen Shot 2563-02-25 at 16 48 09

3. Making sure that once the order has been placed, a PayNow QR code will be displayed at the Order Received page, scannable.

Screen Shot 2563-02-25 at 16 48 37 copy

The example using QR Reader application, on iPhone

Screen Shot 2563-02-26 at 12 15 45

An order has been placed with on-hold order status.

Screen Shot 2563-02-26 at 12 18 47 copy

4. Making sure that Omise charge.complete event will be caught properly once the payment has been paid.

To simulate this situation, firstly Omise Webhook feature must be promptly set with a store's webhook endpoint.

Screen Shot 2563-02-26 at 12 23 53 copy

Then to go to Omise Dashboard and mark a particular charge as successful.

Screen Shot 2563-02-26 at 12 22 49 copy

Once done, the plugin will be able to catch a charge.complete event that has been triggered by Omise, then update an order status accordingly.

Screen Shot 2563-02-26 at 12 26 34 copy

The following graphic is showing an overview of the payment flow. paynow-flow

4. Impact of the change

None

5. Priority of change

Normal

6. Additional Notes

This pull request is providing the least basic feature of PayNow payment method. There are still numbers of thing that can be added to make its experience better however will be discussed and implemented later.

i.e.

  1. An input from Irista suggested a counting down mechanism to automatically cancel the payment & order after a certain time if the payment hasn't been paid (10-15 minutes).

  2. Adding more text or footnote to provide an instruction of how to use PayNow.

  3. Including QR code to the WooCommerce Order Confirmation email.

and so on.