diff --git a/upload/extension/opencart/catalog/controller/payment/opayo.php b/upload/extension/opencart/catalog/controller/payment/opayo.php index 46c93541a81..f594afa68cd 100644 --- a/upload/extension/opencart/catalog/controller/payment/opayo.php +++ b/upload/extension/opencart/catalog/controller/payment/opayo.php @@ -358,6 +358,9 @@ public function confirm(): void { $order_subscription = $this->model_checkout_subscription->getSubscriptionByOrderProductId($this->session->data['order_id'], $order_product['order_product_id']); if ($order_subscription && $order_subscription['order_product_id'] == $order_product['order_product_id']) { + $order_subscription['subscription'] = $order_subscription; + $order_subscription['subscription']['name'] = $order_product['name']; + $this->model_extension_opayo_payment_opayo->subscriptionPayment($order_subscription, $payment_data['VendorTxCode']); } } @@ -472,6 +475,9 @@ public function threeDSnotify(): void { $order_subscription = $this->model_checkout_subscription->getSubscriptionByOrderProductId($this->session->data['order_id'], $order_product['order_product_id']); if ($order_subscription && $order_subscription['order_product_id'] == $order_product['order_product_id']) { + $order_subscription['subscription'] = $order_subscription; + $order_subscription['subscription']['name'] = $order_product['name']; + $this->model_extension_opayo_payment_opayo->subscriptionPayment($order_subscription, $payment_data['VendorTxCode']); } } diff --git a/upload/extension/opencart/catalog/model/payment/opayo.php b/upload/extension/opencart/catalog/model/payment/opayo.php index 184888c0553..d97746caeaa 100644 --- a/upload/extension/opencart/catalog/model/payment/opayo.php +++ b/upload/extension/opencart/catalog/model/payment/opayo.php @@ -480,6 +480,7 @@ private function setPaymentData(array $order_info, array $opayo_order_info, floa */ private function calculateSchedule(string $frequency, \DateTime $next_payment, int $cycle) { $next_payment = clone $next_payment; + if ($frequency == 'semi_month') { $day = $next_payment->format('d'); $value = 15 - $day;