Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Jul 20, 2020

Conversation

guzzilar
Copy link
Contributor

@guzzilar guzzilar commented Jul 20, 2020

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:

  • WooCommerce: v4.3.0
  • WordPress: v5.4.2
  • PHP version: 7.3.3.

✏️ 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

  1. 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

@guzzilar guzzilar force-pushed the revise-omise-creditcard-processing-status branch from 4f84362 to cef8caa Compare July 20, 2020 07:11
Copy link
Contributor

@mayurkathale mayurkathale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@guzzilar guzzilar merged commit 1ee30fd into master Jul 20, 2020
@guzzilar guzzilar deleted the revise-omise-creditcard-processing-status branch July 20, 2020 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants