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

Extend event, error logging & order notes (488) #456

Closed
Dinamiko opened this issue Jan 31, 2022 · 1 comment
Closed

Extend event, error logging & order notes (488) #456

Dinamiko opened this issue Jan 31, 2022 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@Dinamiko
Copy link
Contributor

As of version 1.6.4, when the payment is successful at PayPal but the order for some reason fails in WooCommerce, there is no information logged about the failure. The WooCommerce order only shows a generic error in the order notes: Could not process order. Order status changed from Pending payment to Failed.

The same error is displayed when a payment has been rejected at PayPal. The PayPal Card Processing creates a Failed WooCommerce order with the same error.When logging is disabled in the plugin, then the merchant would have no clue as to what caused the order to fail.

Printing the API response that caused the order to fail in the order notes can help the store owner&user to better understand the problem:https://developer.paypal.com/api/rest/reference/orders/v2/errors/

Example case: User pays with a credit card via DCC and PayPal rejects the payment with: INSTRUMENT_DECLINED

The order notes could then display the API error with a description:

INSTRUMENT_DECLINED: 
The instrument presented was either declined by the processor or bank or it can't be used for this payment.

Negative testing instrument declined plugin

negative-testing-instrument-declined.php.zip

To Reproduce

  1. Install and activate 'Negative testing instrument declined' plugin attached above.
  2. Place an order.
  3. It will trigger INSTRUMENT_DECLINED by redirecting to PayPal site and will include two more payment tries until it fails displaying the error message in checkout screen.

Expected Behavior

After failing it should display INSTRUMENT_DECLINED error message in the order note.

Actual Behavior

Only displays a generic error in checkout screen.

Environment

  • WordPress Version: 5.9
  • WooCommerce Version: 6.1
  • Plugin Version: 1.6.4
@Dinamiko Dinamiko added the enhancement New feature or request label Jan 31, 2022
@Dinamiko Dinamiko changed the title Extend event, error logging & order notes Extend event, error logging & order notes (488) Jan 31, 2022
@Dinamiko Dinamiko added this to the Next version milestone Feb 1, 2022
@Dinamiko
Copy link
Contributor Author

Dinamiko commented Feb 2, 2022

#458.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant