From dc0e157e711944954b5cf9d888d792bf93fa17be Mon Sep 17 00:00:00 2001 From: belikov_artem Date: Tue, 25 Apr 2023 20:00:07 +0300 Subject: [PATCH] feat: v2.0.1 --- catalog/controller/payment/paypal.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/catalog/controller/payment/paypal.php b/catalog/controller/payment/paypal.php index 0d1332f..0b76c97 100644 --- a/catalog/controller/payment/paypal.php +++ b/catalog/controller/payment/paypal.php @@ -18,6 +18,14 @@ public function index(): string { $agree_status = $this->model_extension_paypal_payment_paypal->getAgreeStatus(); if ($this->config->get('payment_paypal_status') && $this->config->get('payment_paypal_client_id') && $this->config->get('payment_paypal_secret') && !$this->webhook() && $agree_status) { + if (VERSION >= '4.0.2.0') { + if (!empty($this->session->data['payment_method']['code'])) { + if ($this->session->data['payment_method']['code'] == 'paypal.paylater') { + return $this->load->controller('extension/paypal/payment/paypal_paylater'); + } + } + } + $this->load->language('extension/paypal/payment/paypal'); // Setting @@ -2708,7 +2716,7 @@ public function webhook(): bool { return false; } - + public function header_before(string $route, array &$data): void { $this->load->model('extension/paypal/payment/paypal');