From 32d76e5c587f939ead722c9d85c050ac1f9c4332 Mon Sep 17 00:00:00 2001 From: Benji Date: Tue, 5 Nov 2019 16:10:49 +0700 Subject: [PATCH 1/2] [ID-258] Fixing compatibility issue in whmcs7 --- src/modules/gateways/paymentwall/helpers/helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/gateways/paymentwall/helpers/helper.php b/src/modules/gateways/paymentwall/helpers/helper.php index e51807b..725a3b0 100755 --- a/src/modules/gateways/paymentwall/helpers/helper.php +++ b/src/modules/gateways/paymentwall/helpers/helper.php @@ -170,7 +170,7 @@ function getRecurringBillingValuesFromInvoice($invoiceid) { require ROOTDIR . "/includes/invoicefunctions.php"; } - $proratavals = getProrataValues($billingcycle, 0, $proratadate, $proratachargenextmonth, $orderday, $ordermonth, $orderyear); + $proratavals = getProrataValues($billingcycle, 0, $proratadate, $proratachargenextmonth, $orderday, $ordermonth, $orderyear, $userid); $firstcycleperiod = $proratavals['days']; $firstcycleunits = "Days"; } From 1438aed0c1ea6f5933e0b6659ac91f3a1cb36ed8 Mon Sep 17 00:00:00 2001 From: Benji Date: Tue, 5 Nov 2019 18:09:57 +0700 Subject: [PATCH 2/2] [ID-258] Update module info --- README.md | 2 +- src/modules/gateways/brick.php | 2 +- src/modules/gateways/paymentwall.php | 2 +- src/modules/gateways/paymentwall/helpers/helper.php | 5 +++++ 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index bf735bd..d966136 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Paymentwall module for WHMCS. ### Requirement -* Tested on WHMCS v5.3.14, v6.0.1 , v7.1.1, 7.4.1, 7.4.2 +* Tested on WHMCS v5.3.14, v6.0.1 , v7.1.1, 7.4.1, 7.4.2, 7.7.1 * PHP 5.6 or greater # Installation diff --git a/src/modules/gateways/brick.php b/src/modules/gateways/brick.php index ff41176..1466f49 100755 --- a/src/modules/gateways/brick.php +++ b/src/modules/gateways/brick.php @@ -4,7 +4,7 @@ * Plugin Name: Paymentwall for WHMCS * Plugin URI: https://docs.paymentwall.com/modules/whmcs * Description: Official Paymentwall module for Prestashop. - * Version: v1.6.2 + * Version: v1.6.3 * Author: The Paymentwall Team * Author URI: http://www.paymentwall.com/ * License: The MIT License (MIT) diff --git a/src/modules/gateways/paymentwall.php b/src/modules/gateways/paymentwall.php index fd4492d..782bed3 100755 --- a/src/modules/gateways/paymentwall.php +++ b/src/modules/gateways/paymentwall.php @@ -4,7 +4,7 @@ * Plugin Name: Paymentwall for WHMCS * Plugin URI: https://docs.paymentwall.com/modules/whmcs * Description: Official Paymentwall module for Prestashop. - * Version: v1.6.2 + * Version: v1.6.3 * Author: The Paymentwall Team * Author URI: http://www.paymentwall.com/ * License: The MIT License (MIT) diff --git a/src/modules/gateways/paymentwall/helpers/helper.php b/src/modules/gateways/paymentwall/helpers/helper.php index 725a3b0..470690d 100755 --- a/src/modules/gateways/paymentwall/helpers/helper.php +++ b/src/modules/gateways/paymentwall/helpers/helper.php @@ -46,6 +46,11 @@ function getHostIdFromInvoice($invoiceId) { function getRecurringBillingValuesFromInvoice($invoiceid) { global $CONFIG; + if( !function_exists("getBillingCycleMonths") ) + { + include_once(ROOTDIR . "/includes/invoicefunctions.php"); + } + $firstcycleperiod = $firstcycleunits = ""; $invoiceid = (int)$invoiceid; $result = select_query("tblinvoiceitems", "count(tblinvoiceitems.relid) as count_recurring", array("invoiceid" => $invoiceid, "type" => "Hosting", "billingcycle" => array("sqltype" => "NEQ", "value" => "One Time")), "tblinvoiceitems`.`id", "ASC", "", "tblhosting ON tblhosting.id=tblinvoiceitems.relid");