diff --git a/CRM/Stripe/BAO/StripePaymentintent.php b/CRM/Stripe/BAO/StripePaymentintent.php index 192ab5b9bd54313af3edb4d35f82b7ace521a07b..805c8970783eda7e1e3f0c1b2062156e5bafe678 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 22d66f24d956a22cd99b278a129ae54e5bd77c9d..0a69ea68dbe835361ead1d1422f9c41325ff9543 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');