From 66d5865feaa080fa60fdb47a916427122704a6e7 Mon Sep 17 00:00:00 2001 From: Frederik Rommel Date: Tue, 13 Oct 2020 11:45:07 +0200 Subject: [PATCH] RATEPLUG-14: delete order: add ordernumber to request on cancellation --- Component/Mapper/ModelFactory.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Component/Mapper/ModelFactory.php b/Component/Mapper/ModelFactory.php index cb6dd7cd..c1e56148 100755 --- a/Component/Mapper/ModelFactory.php +++ b/Component/Mapper/ModelFactory.php @@ -152,10 +152,11 @@ public function callPaymentConfirm($countryCode = false) * get request head * * @param bool $countryCode + * @param null $orderId * @return \RatePAY\ModelBuilder * @throws Exception */ - private function getHead($countryCode = null) + private function getHead($countryCode = null, $orderId = null) { $systemId = $this->getSystemId(); $bootstrap = new \Shopware_Plugins_Frontend_RpayRatePay_Bootstrap('ratepay_config'); @@ -180,9 +181,9 @@ private function getHead($countryCode = null) ] ]; - $orderId = $this->_orderId; + $orderId = $orderId ? : $this->_orderId; if (!empty($orderId)) { - $head['External']['OrderId'] = $this->_orderId; + $head['External']['OrderId'] = $orderId; } //side effect @@ -632,7 +633,7 @@ public function callPaymentChange($operationData) $this->setZPercent(); } - $mbHead = $this->getHead($countryCode); + $mbHead = $this->getHead($countryCode, $order->getNumber()); $shoppingItems = $this->createBasketArray($order->getCurrency(), $operationData['items'], $operationData['subtype'], $operationData['orderId']); $shoppingBasket = [