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 = [