From 39056eb5d797bfac873dff3a446eaf1cd642b80b Mon Sep 17 00:00:00 2001 From: "Matthew Wire (MJW Consulting)" <mjw@mjwconsult.co.uk> Date: Sat, 19 Oct 2019 22:00:16 +0100 Subject: [PATCH] Fix loading of confirm JS on contribution thankyou page --- CRM/Stripe/BAO/StripePaymentintent.php | 2 +- stripe.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Stripe/BAO/StripePaymentintent.php b/CRM/Stripe/BAO/StripePaymentintent.php index 192ab5b9..805c8970 100644 --- a/CRM/Stripe/BAO/StripePaymentintent.php +++ b/CRM/Stripe/BAO/StripePaymentintent.php @@ -39,7 +39,7 @@ class CRM_Stripe_BAO_StripePaymentintent extends CRM_Stripe_DAO_StripePaymentint public static function create($params) { $instance = new self; try { - if ($params['id']) { + if (!empty($params['id'])) { $instance->id = $params['id']; } elseif ($params['paymentintent_id']) { diff --git a/stripe.php b/stripe.php index 22d66f24..0a69ea68 100644 --- a/stripe.php +++ b/stripe.php @@ -136,7 +136,7 @@ function stripe_civicrm_buildForm($formName, &$form) { } switch ($formName) { - case 'CRM_Contribution_Form_ThankYou': + case 'CRM_Contribute_Form_Contribution_ThankYou': case 'CRM_Event_Form_Registration_ThankYou': \Civi::resources()->addScriptFile(E::LONG_NAME, 'js/civicrmStripeConfirm.js'); -- GitLab