omise / omise-woocommerce

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

Credit Card payment, updating order status to 'processing' for successful 'auth-only' payment. #180

Closed guzzilar closed 4 years ago

guzzilar commented 4 years ago

1. Objective

At the moment, the plugin will leave the order status as pending payment for a successful 'auth-only' Credit Card payment method. As the original idea, we were assuming that the authorized charge status (charge.authorized=true, charge.paid=false, charge.status=pending) is equal as WooCommerce Order pending payment status.

However, as researched. It's more correct behaviour to update WC Order status to processing for those authorised-charges instead of leaving it as pending payment.

2. Description of change

Executing WC_Order::payment_complete() right at the moment when the charge transaction has authorized (charge.authorized=true, charge.paid=false, charge.status=pending)

3. Quality assurance

🔧 Environments:

✏️ Details:

  1. Making sure that the WC Order status will be updated to processing if placing order using Credit Card payment method with auth-only action.

    processing-001
  2. There is a change on auto-capture. This simply just to re-order the order-note messages so the

    Omise: Payment successful. An amount of {amount} {currency} has been paid

will come first before

Order status changed from Pending payment to Processing.

processing-002

4. Impact of the change

The order flow will be changed.

However, as we are in a stage of releasing a major version, I think it is a good time to correct it from the beginning.

5. Priority of change

Normal

6. Additional Notes

None