From 0e90ae457a0da866775ab67c4d8dd9475e45eb8a Mon Sep 17 00:00:00 2001 From: woutse Date: Wed, 27 Nov 2024 13:47:25 +0100 Subject: [PATCH] Updated desc field --- Model/PayPaymentCreate.php | 4 ++-- Model/PayPaymentCreateFastCheckout.php | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Model/PayPaymentCreate.php b/Model/PayPaymentCreate.php index 984b75aa..e74b9224 100644 --- a/Model/PayPaymentCreate.php +++ b/Model/PayPaymentCreate.php @@ -79,7 +79,7 @@ class PayPaymentCreate /** * @var float|string|null */ - private $orderId; + protected $orderId; /** * @var Order @@ -258,7 +258,7 @@ public function setCurrency($currency) /** * @return float|string|null */ - private function getDescription() + public function getDescription() { $prefix = $this->scopeConfig->getValue('payment/paynl/order_description_prefix', 'store'); return !empty($prefix) ? $prefix . $this->orderId : $this->orderId; diff --git a/Model/PayPaymentCreateFastCheckout.php b/Model/PayPaymentCreateFastCheckout.php index 1cf77207..e987cdeb 100644 --- a/Model/PayPaymentCreateFastCheckout.php +++ b/Model/PayPaymentCreateFastCheckout.php @@ -43,6 +43,8 @@ public function __construct($methodInstance, $amount, $products, $baseUrl, $quot $finishUrl = $baseUrl . 'paynl/checkout/finish/?entityid=fc'; $exchangeUrl = $baseUrl . 'paynl/checkout/exchange/'; + $this->orderId = $reservedOrderId; + $fastCheckout->setAmount($amount); $fastCheckout->setCurrency($currency); $fastCheckout->setFinishURL($finishUrl); @@ -78,7 +80,7 @@ public function getData() $parameters['paymentMethod'] = ['id' => $this->paymentMethodId]; $this->_add($parameters, 'returnUrl', $this->paymentData['returnURL']); - $this->_add($parameters, 'description', ''); + $this->_add($parameters, 'description', $this->getDescription()); $this->_add($parameters, 'reference', $this->reference); $this->_add($parameters, 'exchangeUrl', $this->paymentData['exchangeURL']);