Is there a way to put a limit on dollar amount I can accept PayPal for?
Don't even get me started on how much I hate PayPal. If there was any other service that worked as well I would sign up for them in a minute! Anyway I've been burned several times by PayPal so now ONLY ship to confirmed address and ONLY accept PayPal from US customers. I would like to protect myself even more though by limiting the amound of a purchase I will accept PayPal for. For example if someone has a total that's over $300, what I want is for the paypal button to not show and their only option to choose would be the other payment options I take. Any easy way that can be done?
Re: Is there a way to put a limit on dollar amount I can accept PayPal for?
Re: Is there a way to put a limit on dollar amount I can accept PayPal for?
try this, im no expert so someone could tell us if it causes any problems elsewhere
in /includes/modules/payment/paypal/tpl_ec_button.php
line 93 lets you limit paypal amount,
and in /includes/modules/payment/paypal/paypalwpp.php
just before if (IS_ADMIN_FLAG === true) { on line 109
add
PHP Code:
if ($order->info['total'] > 10) $this->enabled = false;
where 10 is the amount you want paypal to switch off, obviously set both to same amount so express checkut button disapears and paypal disapears during checkout
hope this helps and hope it works
bryan
Re: Is there a way to put a limit on dollar amount I can accept PayPal for?
Quote:
Originally Posted by
bn17311
try this, im no expert so someone could tell us if it causes any problems elsewhere
in /includes/modules/payment/paypal/tpl_ec_button.php
line 93 lets you limit paypal amount,
....
There is no line 93 in the standard install.
This is the code to find starting around line 46:
Code:
// PayPal module cannot be used for purchase > $10,000 USD or 5500 GBP
if ( ($_SESSION['currency'] == 'USD' && $currencies->value($_SESSION['cart']->total, true, 'USD') > 10000)
|| ($_SESSION['currency'] == 'GBP' && $currencies->value($_SESSION['cart']->total, true, 'GBP') > 5500) ) {
$paypalec_enabled = false;
}
Re: Is there a way to put a limit on dollar amount I can accept PayPal for?
Quote:
Originally Posted by
bn17311
in /includes/modules/payment/paypal/paypalwpp.php
just before if (IS_ADMIN_FLAG === true) { on line 109
add
PHP Code:
if ($order->info['total'] > 10) $this->enabled = false;
bryan
Since I have the button disabled I didn't need the first part of the tip but just installed the second and it works great thanks! It also would be nice if their order is over the set amount, I could also display a message that will tell the customer why the paypal payment method isn't showing when they proceed to the picking payment page but if that's too hard a fix, it will work as is!
Re: Is there a way to put a limit on dollar amount I can accept PayPal for?
Quote:
Originally Posted by
frank18
There is no line 93 in the standard install.
This is the code to find starting around line 46:
Code:
// PayPal module cannot be used for purchase > $10,000 USD or 5500 GBP
if ( ($_SESSION['currency'] == 'USD' && $currencies->value($_SESSION['cart']->total, true, 'USD') > 10000)
|| ($_SESSION['currency'] == 'GBP' && $currencies->value($_SESSION['cart']->total, true, 'GBP') > 5500) ) {
$paypalec_enabled = false;
}
Hi Frank
What does one do when the store is denominated in AUD.
I want to set my limit to $500AUD.
Thanks in advance.
Re: Is there a way to put a limit on dollar amount I can accept PayPal for?
Quote:
Originally Posted by
dw08gm
Hi Frank
What does one do when the store is denominated in AUD.
I want to set my limit to $500AUD.
Thanks in advance.
You could set the lines as in post #4 to something like this:
Code:
// PayPal module cannot be used for purchase > $10,000 USD or 5500 GBP
if ( ($_SESSION['currency'] == 'USD' && $currencies->value($_SESSION['cart']->total, true, 'USD') > 10000)
|| ($_SESSION['currency'] == 'AUD' && $currencies->value($_SESSION['cart']->total, true, 'AUD') > 500)
|| ($_SESSION['currency'] == 'GBP' && $currencies->value($_SESSION['cart']->total, true, 'GBP') > 5500) ) {
$paypalec_enabled = false;
}
Re: Is there a way to put a limit on dollar amount I can accept PayPal for?
Hi Frank
Please see the following, which ties up a few loose threads.
http://www.zen-cart.com/forum/showth...394#post996394
Cheers
Re: Is there a way to put a limit on dollar amount I can accept PayPal for?
I used the suggestion above and modified my tpl_ec_button.php file to limit my PayPal acceptance to $300 and it worked well.
The problem now though is I wanted to bump it up to $400 and although I changed the value from 300 to 400, it still limits me to $300. What I have now is below.
// PayPal module cannot be used for purchase > $400 USD
if ($_SESSION['currency'] == 'USD' && $currencies->value($_SESSION['cart']->total, true, 'USD') > 400) {
$paypalec_enabled = false;
}
It's been quite a while since I set this up and can't remember if I changed anything besides that line to set the original $300 limit. Any clue what I'm missing? Another file somewhere I might have also changed?
Re: Is there a way to put a limit on dollar amount I can accept PayPal for?
Still haven't figured out why this doesn't work. Any help?