Skip to content

Commit

Permalink
Merge branch 'task/sw53x/RATEPLUG-14_delete_order' into 5.3.15-dev
Browse files Browse the repository at this point in the history
* task/sw53x/RATEPLUG-14_delete_order:
  RATEPLUG-14: delete order: add ordernumber to request on cancellation
  • Loading branch information
rommelfreddy committed Oct 13, 2020
2 parents 0dfc9f3 + 66d5865 commit c357da8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Component/Mapper/ModelFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -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
Expand Down Expand Up @@ -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 = [
Expand Down

0 comments on commit c357da8

Please sign in to comment.