diff --git a/Block/Payment/Checkout/Info.php b/Block/Payment/Checkout/Info.php index f3e8c40..159d92a 100644 --- a/Block/Payment/Checkout/Info.php +++ b/Block/Payment/Checkout/Info.php @@ -36,4 +36,13 @@ public function getSveaCheckoutId() return ""; } } + + public function getSveaCustomerReference() + { + try { + return $this->getInfo()->getAdditionalInformation('svea_customer_reference'); + } catch (\Exception $e) { + return ""; + } + } } diff --git a/Model/Checkout.php b/Model/Checkout.php index 8448024..37534dc 100644 --- a/Model/Checkout.php +++ b/Model/Checkout.php @@ -597,6 +597,10 @@ public function placeOrder(GetOrderResponse $sveaOrder, Quote $quote) //set payment $payment = $quote->getPayment(); + $customerReference = $sveaOrder->getCustomerReference(); + if ($customerReference) { + $payment->setAdditionalInformation('svea_customer_reference', $customerReference); + } //force payment method if (!$payment->getMethod() || $payment->getMethod() != $this->_paymentMethod) { diff --git a/view/adminhtml/templates/payment/checkout/info.phtml b/view/adminhtml/templates/payment/checkout/info.phtml index e4f07aa..85e9f3b 100644 --- a/view/adminhtml/templates/payment/checkout/info.phtml +++ b/view/adminhtml/templates/payment/checkout/info.phtml @@ -1,16 +1,27 @@ -
escapeHtml(__('Svea Checkout Order ID')); ?>: | -escapeHtml($block->getSveaCheckoutId()); ?> | += $escaper->escapeHtml(__('Svea Checkout Order ID')); ?>: | += $escaper->escapeHtml($block->getSveaCheckoutId()); ?> |
---|---|---|---|
escapeHtml(__('Svea Payment Method')); ?>: | -escapeHtml($block->getSveaPaymentMethod()); ?> | += $escaper->escapeHtml(__('Svea Payment Method')); ?>: | += $escaper->escapeHtml($block->getSveaPaymentMethod()); ?> |
= $escaper->escapeHtml(__('Svea Customer Payment Reference')) ?>: | += $escaper->escapeHtml($block->getSveaCustomerReference()) ?> + |