New Zenner
- Join Date:
- Jun 2016
- Posts:
- 20
- Plugin Contributions:
- 0
Paypal Express Minimum amount [HELP]
Dear all,
I had spent tremendous amount of time searching for similar threads, found it but new problem arised. Would appreciate if someone could help me understand.
I inserted an if else condition to paypal express module to prevent palpal option from appearing less than 20 amount. It worked well until the final stage. After clicking confirm order, it wont connect to paypal page (the circle paypal loading page) and show the page isnt working.
Below is my code if someone could help. Additions are bolded in the middle of the text wall.
function paypalwpp() {
include_once(zen_get_file_directory(DIR_FS_CATALOG . DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/payment/', 'paypalwpp.php', 'false'));
global $order;
$this->code = 'paypalwpp';
$this->codeTitle = MODULE_PAYMENT_PAYPALWPP_TEXT_ADMIN_TITLE_EC;
$this->codeVersion = '1.5.1';
$this->enableDirectPayment = FALSE;
$this->enabled = (MODULE_PAYMENT_PAYPALWPP_STATUS == 'True');
[B]if ($order->info['subtotal'] < 20.00){$this->enabled=false;}
else {$this->enabled=true;}[/B]
// Set the title & description text based on the mode we're in ... EC vs US/UK vs admin
if (IS_ADMIN_FLAG === true) {
$this->description = sprintf(MODULE_PAYMENT_PAYPALWPP_TEXT_ADMIN_DESCRIPTION, ' (rev' . $this->codeVersion . ')');
switch (MODULE_PAYMENT_PAYPALWPP_MODULE_MODE) {
case ('PayPal'):
$this->title = MODULE_PAYMENT_PAYPALWPP_TEXT_ADMIN_TITLE_EC;
break;
case ('Payflow-UK'):
$this->title = MODULE_PAYMENT_PAYPALWPP_TEXT_ADMIN_TITLE_PRO20;
break;
case ('Payflow-US'):
if (defined('MODULE_PAYMENT_PAYPALWPP_PAYFLOW_EC') && MODULE_PAYMENT_PAYPALWPP_PAYFLOW_EC == 'Yes') {
$this->title = MODULE_PAYMENT_PAYPALWPP_TEXT_ADMIN_TITLE_PF_EC;
} else {
$this->title = MODULE_PAYMENT_PAYPALWPP_TEXT_ADMIN_TITLE_PF_GATEWAY;
}
break;
default:
$this->title = MODULE_PAYMENT_PAYPALWPP_TEXT_ADMIN_TITLE_EC;
}