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

Return to the checkout form when the payment intent is created #7753

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

Conversation

Genevieve-K
Copy link
Contributor

When the payment intent cannot be create due to a Stripe error (Ex: Your card's security code is incorrect.), there is an Exception. Some functions as handlePaymentIntentStatus() cannot access to status/id, and a new exception is created. There is no point in going any further, and we can return directly to the checkout form as in class-give-stripe-payment-method.php.

Errors in log:

[19-Feb-2025 13:03:38 UTC] PHP Warning:  Attempt to read property "id" on bool in /wp/wp-content/plugins/give/src/PaymentGateways/Gateways/Stripe/ValueObjects/PaymentIntent.php on line 44
[19-Feb-2025 13:03:38 UTC] PHP Warning:  Attempt to read property "status" on bool in /wp/wp-content/plugins/give/src/PaymentGateways/Gateways/Stripe/ValueObjects/PaymentIntent.php on line 53

Message for the donor from handlePaymentIntentStatus():
image

A question: if this error occurs in a recurring donation, the error is simply: Your card's security code is incorrect. , There was an issue with your donation transaction:...

When the payment intent cannot be create due to a Stripe error (Ex:  Your card's security code is incorrect.), there is an Exception. 
Some functions as handlePaymentIntentStatus() cannot access to status/id, and a new exception is created. There is no point in going any further, and we can return to the checkout form as in class-give-stripe-payment-method.php.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant