diff --git a/Block/Adminhtml/Order/View/View.php b/Block/Adminhtml/Order/View/View.php new file mode 100644 index 00000000..099c9467 --- /dev/null +++ b/Block/Adminhtml/Order/View/View.php @@ -0,0 +1,62 @@ +orderRepository = $orderRepository; + } + + /** + * @return string + */ + public function getPayUrl() + { + return self::PAY_TRANSACTION_URL . $this->getId(); + } + + /** + * @return mixed + */ + public function getOrder() + { + $params = $this->getRequest()->getParams(); + $orderId = isset($params['order_id']) ? $params['order_id'] : null; + + try { + $order = $this->orderRepository->get($orderId); + $getPayment = $order->getPayment(); + } catch (\Exception $e) { + payHelper::logCritical($e, $params); + } + + return $getPayment; + } + + /** + * @return string + */ + public function getId() + { + $additionalInformation = $this->getOrder()->getAdditionalInformation(); + return $additionalInformation['transactionId'] ?? ''; + } +} diff --git a/i18n/en_US.csv b/i18n/en_US.csv index 1fe09c94..c52d420d 100644 --- a/i18n/en_US.csv +++ b/i18n/en_US.csv @@ -134,6 +134,7 @@ "Check version","Check version" "You are up to date with the latest version","You are up to date with the latest version" "There is a new version available (","There is a new version available (" +"Pay. Transaction-ID: ","Pay. Transaction-ID: " "PAY. - This payment has been flagged as possibly fraudulent. Please verify this transaction in the Pay. portal.","PAY. - This payment has been flagged as possibly fraudulent. Please verify this transaction in the Pay. portal." "Select whether you want to use the PAY. thank you page when transaction is pending.","Select whether you want to use the PAY. thank you page when transaction is pending." "Automatically void authorisation-transactions when cancelling an order.","Automatically void authorisation-transactions when cancelling an order." diff --git a/i18n/nl_NL.csv b/i18n/nl_NL.csv index d209637f..c0531350 100644 --- a/i18n/nl_NL.csv +++ b/i18n/nl_NL.csv @@ -182,6 +182,7 @@ "Check version","Check versie" "You are up to date with the latest version","U bent up to date met de laatste versie" "There is a new version available (","Er is een nieuwe versie beschikbaar (" +"Pay. Transaction-ID: ","Pay. Transactie-ID: " "PAY. - This payment has been flagged as possibly fraudulent. Please verify this transaction in the Pay. portal.","PAY. - Deze betaling is gemarkeerd als mogelijk frauduleus. Controleer deze transactie in het Pay. portaal." "Select whether you want to use the PAY. thank you page when transaction is pending.","Selecteer of u gebruik wilt maken van de PAY. bedankpagina wanneer de transactie in behandeling is." "Automatically void authorisation-transactions when cancelling an order.","Authorize-transacties automatisch vrijgeven bij het annuleren van een bestelling." diff --git a/view/adminhtml/layout/sales_order_view.xml b/view/adminhtml/layout/sales_order_view.xml new file mode 100644 index 00000000..8042bb81 --- /dev/null +++ b/view/adminhtml/layout/sales_order_view.xml @@ -0,0 +1,10 @@ + + + + + + + + \ No newline at end of file diff --git a/view/adminhtml/templates/order/view/view.phtml b/view/adminhtml/templates/order/view/view.phtml new file mode 100644 index 00000000..beec5438 --- /dev/null +++ b/view/adminhtml/templates/order/view/view.phtml @@ -0,0 +1,13 @@ + +
+
+ getId() ?> +
+
\ No newline at end of file diff --git a/view/adminhtml/web/css/configtab.css b/view/adminhtml/web/css/configtab.css index 97e6c8ba..805b77ca 100644 --- a/view/adminhtml/web/css/configtab.css +++ b/view/adminhtml/web/css/configtab.css @@ -33,4 +33,17 @@ #paynl_version_check_button { padding: 1px 8px +} + +.pay-orderinformation { + width: calc((100%) * .5 - 30px); + margin: -40px 0px 20px 0px; +} + +.pay-link-icon { + color: black; + margin-left: 2px; + font-size: 17px; + text-decoration: none; + display: inline-block; } \ No newline at end of file