From e78b9ec4bb8ca0018bc4dbd68a71b3b0911c12e8 Mon Sep 17 00:00:00 2001 From: hossam-adyen <132500300+hossam-adyen@users.noreply.github.com> Date: Thu, 25 Jan 2024 10:01:52 +0100 Subject: [PATCH] ShopperReference should be string to be aligned with checkout API (#2453) * ShopperReference should be string to be aligned with checkout API --- Helper/PaymentMethods.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Helper/PaymentMethods.php b/Helper/PaymentMethods.php index 4f4213602..a55fa2a6c 100644 --- a/Helper/PaymentMethods.php +++ b/Helper/PaymentMethods.php @@ -266,9 +266,10 @@ protected function setQuote(\Magento\Quote\Model\Quote $quote): void $this->quote = $quote; } - protected function getCurrentShopperReference(): ?int + protected function getCurrentShopperReference(): ?string { - return $this->getQuote()->getCustomerId(); + $customerId = $this->getQuote()->getCustomerId(); + return $customerId ? (string)$customerId : null; } protected function getPaymentMethodsRequest(