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

fix(payments): early error if payment request is invalid #37503

Closed

Conversation

blaggacao
Copy link
Collaborator

Context

  • As a users, create a Payment Request with an invalid datum in terms of the chosen payment gateway

Current Behaviour

  • Silently, no payment url is created

Desired Behaviour

  • The user is informed early about the invalid payment request on this particular gateway

Proposed Solution

  • Don't silence exceptions that where meant to bubble up to the user

Impact / Migration

Calling sites which dependent on a truthy value need to be refactored and cast exceptions themselves, if that's what they want to do.

@blaggacao
Copy link
Collaborator Author

needs backport to v15

@blaggacao
Copy link
Collaborator Author

blaggacao commented Oct 26, 2023

@s-aga-r I beleive this PR survived the refactorings unaltered.

@s-aga-r
Copy link
Contributor

s-aga-r commented Oct 27, 2023

@blaggacao test is failing, please check

@blaggacao blaggacao force-pushed the fix/payment-gateway-validation-hook branch from 07a0f23 to af0e611 Compare October 30, 2023 16:43
@blaggacao blaggacao force-pushed the fix/payment-gateway-validation-hook branch from 9a16724 to 6d7475a Compare October 30, 2023 17:31
@blaggacao
Copy link
Collaborator Author

superseded by frappe/payments#53

@blaggacao blaggacao closed this Nov 5, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs-tests This PR needs automated unit-tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants