-
Notifications
You must be signed in to change notification settings - Fork 69
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
Improve message shown to merchants when there is an error capturing/cancelling pending authorizations #9937
base: develop
Are you sure you want to change the base?
Conversation
Test the buildOption 1. Jetpack Beta
Option 2. Jurassic Ninja - available for logged-in A12s🚀 Launch a JN site with this branch 🚀 ℹ️ Install this Tampermonkey script to get more options. Build info:
Note: the build is updated when a new commit is pushed to this PR. |
Size Change: +1.57 kB (0%) Total Size: 1.39 MB
ℹ️ View Unchanged
|
…e-shown-to-merchants-when-there-is-an-error-capturing-authorizations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Playwright E2E was running for over 2.5 hours, it needs a timeout after a certain time period like we have for other E2E tests, I have canceled it for now.
The PR also needs a changelog and I have left a comment below.
…e-shown-to-merchants-when-there-is-an-error-capturing-authorizations
Fixes #5002
Changes proposed in this Pull Request
This pull request includes changes to improve error handling in the
submitCaptureAuthorization
andsubmitCancelAuthorization
functions and adds corresponding tests. The most important changes include refactoring error handling to provide more detailed error messages and adding tests to ensure proper error handling behavior.Testing instructions
WP Admin
>Payments
>Settings
>Issue an authorization on checkout, and capture later
woocommerce-payments/includes/admin/class-wc-rest-payments-orders-controller.php
Line 267 in d43e033
woocommerce-payments/includes/admin/class-wc-rest-payments-orders-controller.php
Line 493 in d43e033
return new WP_Error( 'wcpay_missing_order', __( 'This is a test error', 'woocommerce-payments' ), [ 'status' => 404 ] );
You can also test the cancel flow similarly but you must reveal the
Block transaction
button. You can apply this tweak:npm run changelog
to add a changelog file, choosepatch
to leave it empty if the change is not significant. You can add multiple changelog files in one PR by running this command a few times.Post merge