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

feat(payment): PAYPAL-3520 Max capture amount failure #2485

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bc-nick
Copy link
Contributor

@bc-nick bc-nick commented Apr 26, 2024

What?

Handling an specific error related to max capture failure

Why?

To show the error message with an appropriate information for users

Testing / Proof

Manual testing

@bigcommerce/team-checkout @bigcommerce/team-payments

if (isPaypalCommerceProviderError(error)) {
const paypalProviderError = error?.errors?.filter((e: any) => e.provider_error) || [];

return paypalProviderError[0].provider_error?.code === '2046';
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe it would be better to create a separate constant for '2046' error? How do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry for the late response. I think it is not necessary, we use this code only here and nowhere else

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants