From 6ddc055005ae26d885e2a83a2d9861d033ae00c7 Mon Sep 17 00:00:00 2001
From: Matthew Wire <mjw@mjwconsult.co.uk>
Date: Sat, 23 Jan 2021 18:35:39 +0000
Subject: [PATCH] Fix PHP notices

---
 api/v3/StripePaymentintent.php | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/api/v3/StripePaymentintent.php b/api/v3/StripePaymentintent.php
index 07f5bab3..b4d9f43b 100644
--- a/api/v3/StripePaymentintent.php
+++ b/api/v3/StripePaymentintent.php
@@ -142,9 +142,9 @@ function civicrm_api3_stripe_paymentintent_process($params) {
       _civicrm_api3_stripe_paymentintent_returnInvalid();
     }
   }
-  $paymentMethodID = CRM_Utils_Type::validate($params['payment_method_id'], 'String');
-  $paymentIntentID = CRM_Utils_Type::validate($params['payment_intent_id'], 'String');
-  $capture = CRM_Utils_Type::validate($params['capture'], 'Boolean', FALSE);
+  $paymentMethodID = CRM_Utils_Type::validate($params['payment_method_id'] ?? '', 'String');
+  $paymentIntentID = CRM_Utils_Type::validate($params['payment_intent_id'] ?? '', 'String');
+  $capture = CRM_Utils_Type::validate($params['capture'] ?? NULL, 'Boolean', FALSE);
   $amount = CRM_Utils_Type::validate($params['amount'], 'String');
   // $capture is normally true if we have already created the intent and just need to get extra
   //   authentication from the user (eg. on the confirmation page). So we don't need the amount
-- 
GitLab