From a26325850094d10023b2a15eb89565ad84f153e7 Mon Sep 17 00:00:00 2001 From: Matthew Wire <mjw@mjwconsult.co.uk> Date: Sat, 12 Nov 2022 20:44:50 +0000 Subject: [PATCH] extraData is actually a string --- CRM/Core/Payment/Stripe.php | 2 +- CRM/Stripe/PaymentIntent.php | 2 +- api/v3/StripePaymentintent.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CRM/Core/Payment/Stripe.php b/CRM/Core/Payment/Stripe.php index 00981bcc..31ef3766 100644 --- a/CRM/Core/Payment/Stripe.php +++ b/CRM/Core/Payment/Stripe.php @@ -642,7 +642,7 @@ class CRM_Core_Payment_Stripe extends CRM_Core_Payment { $stripePaymentIntent = new CRM_Stripe_PaymentIntent($this); $stripePaymentIntent->setDescription($this->getDescription($params)); $stripePaymentIntent->setReferrer($_SERVER['HTTP_REFERER'] ?? ''); - $stripePaymentIntent->setExtraData($params['extra_data'] ?? []); + $stripePaymentIntent->setExtraData($params['extra_data'] ?? ''); $paymentIntentParams = [ 'paymentMethodID' => $paymentMethodID, diff --git a/CRM/Stripe/PaymentIntent.php b/CRM/Stripe/PaymentIntent.php index afee97e8..51a40ec9 100644 --- a/CRM/Stripe/PaymentIntent.php +++ b/CRM/Stripe/PaymentIntent.php @@ -35,7 +35,7 @@ class CRM_Stripe_PaymentIntent { /** * @var array */ - protected $extraData = []; + protected $extraData = ''; /** * @param \CRM_Core_Payment_Stripe $paymentProcessor diff --git a/api/v3/StripePaymentintent.php b/api/v3/StripePaymentintent.php index c3b26bec..67766ccd 100644 --- a/api/v3/StripePaymentintent.php +++ b/api/v3/StripePaymentintent.php @@ -204,7 +204,7 @@ function civicrm_api3_stripe_paymentintent_process($params) { $stripePaymentIntent = new CRM_Stripe_PaymentIntent($paymentProcessor); $stripePaymentIntent->setDescription($description); $stripePaymentIntent->setReferrer($_SERVER['HTTP_REFERER'] ?? ''); - $stripePaymentIntent->setExtraData($params['extra_data'] ?? []); + $stripePaymentIntent->setExtraData($params['extra_data'] ?? ''); if ($setup) { $params = [ // Optional paymentMethodID -- GitLab