Conversation
…s' if place a new order with offline payment method.
jonrandy
approved these changes
Aug 7, 2020
mayurkathale
approved these changes
Aug 7, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
1. Objective
It seems the 'is_omise_payment_resolved' flag is not working smoothly with Offline payment flow.
For those Credit Card and Offsite payment methods, we have
is_omise_payment_resolvedas an indicator to tell the plugin if a specific Webhook event is needed to be queued (if the store's callback has triggered). However, as Offline has no redirection behaviour after payment, thisis_omise_payment_resolvedwill stay asfalseforever.Event handler flow at the moment:
1). if "Order.is_omise_payment_resolved" is "false"?
2). if Queue.try < 3, queue the event again.
3). Otherwise, bypass the "is_omise_payment_resolved" check to execute Charge.Complete event handler class.
The current flow is working just fine, however increases unnecessary steps to force all the Offline payment webhook to be in Queue as
is_omise_payment_resolvedas in the current, will never be set totrue.Related information:
Related issue(s): T22534 (internal ticket)
2. Description of change
is_omise_payment_resolvedtoyesif place a new order with offline payment method.3. Quality assurance
🔧 Environments:
✏️ Details:
To test this, you may try place a new order using one of the offline payment methods that Omise-WooCommerce supports.
Once the order has been placed,
is_omise_payment_resolvedflag will be updated toyes.Which, will result in the
charge.completewebhook event will get executed right after the Omise Webhook event is fired without being put in WC Queue.4. Impact of the change
None
5. Priority of change
Normal
6. Additional Notes
None