Created
September 30, 2023 15:42
-
-
Save jitendrapurohit/03a851d0c7e1c54ec7a68c746cabeffc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/CRM/Stripe/PaymentIntent.php b/CRM/Stripe/PaymentIntent.php | |
index 87d6189..74ceea4 100644 | |
--- a/CRM/Stripe/PaymentIntent.php | |
+++ b/CRM/Stripe/PaymentIntent.php | |
@@ -413,6 +413,12 @@ class CRM_Stripe_PaymentIntent { | |
$intentParams = []; | |
$intentParams['confirm'] = TRUE; | |
+ $intentParams['confirmation_method'] = 'manual'; | |
+ if (empty($params['paymentIntentID']) && empty($params['paymentMethodID'])) { | |
+ $intentParams['confirm'] = FALSE; | |
+ $intentParams['confirmation_method'] = 'automatic'; | |
+ } | |
+ $intentParams['payment_method_types'] = ['card']; | |
if (!empty($params['paymentIntentID'])) { | |
try { | |
@@ -446,8 +452,8 @@ class CRM_Stripe_PaymentIntent { | |
$intentParams['customer'] = $params['customer']; | |
} | |
- $intentParams['automatic_payment_methods']['enabled'] = TRUE; | |
- $intentParams['automatic_payment_methods']['allow_redirects'] = 'never'; | |
+ // $intentParams['automatic_payment_methods']['enabled'] = TRUE; | |
+ // $intentParams['automatic_payment_methods']['allow_redirects'] = 'never'; | |
$intent = $this->paymentProcessor->stripeClient->paymentIntents->create($intentParams); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment