Author Topic: Paypal (new API) problems  (Read 20615 times)

newbii

  • Beginner
  • *
  • Posts: 5
Paypal (new API) problems
« on: February 05, 2011, 15:35:41 pm »
Hi

I'm new to virtuemart and having some problems with paypal.

paypal is my only payment option.

When i checkout step 1-3 is ok, but when i enter step 4 I get some errors.

I'm never transferred to the paypal site where to commit the payment, instead at step 4 I get the messages:

Invalid Credit Card Number or Credit Card Verification Code.

Error: Invalid Credit Card Number or Credit Card Verification Code.
Error: Failure in Processing the Payment (ps_paypal_api)

Invalid Credit Card Number or Credit Card Verification Code.

Why is that? Have I forgot to setup something at the Paypal module?
or...?

Hope someone know about this.

Thanks  ???


JohnBerringer

  • Beginner
  • *
  • Posts: 20
Re: Paypal (new API) problems
« Reply #1 on: February 05, 2011, 22:44:56 pm »
you use "paypal (old)" module or new? if you use old have you set up settings?
If you use new one you should enable another payment module i think this is bug if you have just pay pal it does not work you must have at least 2 different like "cash on delivery" then you will see 3 choices

PayPal
Credit Card
Cash on Delivery

choose paypal. But i suggest using old module.

newbii

  • Beginner
  • *
  • Posts: 5
Re: Paypal (new API) problems
« Reply #2 on: February 07, 2011, 10:08:02 am »
Hi, Thanks for your fast reply :-), but I'm still having the same problems.

Still when I choose paypal as payment method I get the same errors! I have to be send to the paypal site, but nothing happens except when finished step 4, the errors are shown!

And another question, why do I always have the option 'credit card' even though it has been disabled?

???


Shibumi

  • ** on hiatus **
  • Sr. Member
  • ****
  • Posts: 591
  • if it aint broke, there must be something wrong
    • Shibumi Design Studios
  • VirtueMart Version: 2.0.20b
Re: Paypal (new API) problems
« Reply #3 on: February 08, 2011, 01:58:43 am »
I have experienced the same problem, but in IE only... if I run the same product through the checkout process in Google Chrome, Safari, and Firefox with only PayPal (new API) it works fine and goes to the paypal payment page, but... if I run it through IE8, it will give me the error.  Paypal Express checkout works in all instances. I have tested on Google Chrome, Safari, and Firefox in OSX and they all work fine - IE8 gives the error, Google Chrome and IE9 did work in Windows 7.

I have tried with only PayPal (new API) and with other payment methods such as cash on delivery using ps_payment
Jeff
=================================================
Scionergy.com - www.Scionergy.com
Scion Owners Club of Ottawa - www.ScionOwnersClubOttawa.ca
Capital Door Service - www.CapitalDoorService.com - VM2.0.20b, Joomla 2.5.11 PHP5.2.11 powered site

Hennie

  • Beginner
  • *
  • Posts: 11
Re: Paypal (new API) problems
« Reply #4 on: March 05, 2011, 14:43:48 pm »
Hi..,
did anyone has a solution yet? I experience the same errors. Tried some suggestions on this board but nothing so far.. :(
kind regards Hennie

zanardi

  • Development Team
  • Sr. Member
  • *
  • Posts: 874
    • GiBiLogic
Re: Paypal (new API) problems
« Reply #5 on: March 05, 2011, 17:53:50 pm »
Some fixes regarding this issue has been included in VirtueMart 1.1.8, which IS NOT RELEASED YET.

If you want, you may test a BETA VERSION (strictly for non-production environment) available at http://dev.virtuemart.net/issues/308.
--
Francesco (zanardi)
http://extensions.gibilogic.com
@gibilogic on Twitter

Hennie

  • Beginner
  • *
  • Posts: 11
Re: Paypal (new API) problems
« Reply #6 on: March 05, 2011, 18:29:59 pm »
thank you for your response  :)
I'm considering... have to check first with my iDeal-comp supplier.
Have just resolved an amount of troubles there...
kind regards,
Hennie

skulldah

  • Beginner
  • *
  • Posts: 1
Re: Paypal (new API) problems
« Reply #7 on: May 29, 2011, 01:32:36 am »
I have experienced the same problem, but in IE only... if I run the same product through the checkout process in Google Chrome, Safari, and Firefox with only PayPal (new API) it works fine and goes to the paypal payment page, but... if I run it through IE8, it will give me the error.  Paypal Express checkout works in all instances. I have tested on Google Chrome, Safari, and Firefox in OSX and they all work fine - IE8 gives the error, Google Chrome and IE9 did work in Windows 7.

I have tried with only PayPal (new API) and with other payment methods such as cash on delivery using ps_payment

Everybody try to do this:

Open the file get_payment_method_paypal_ex.tpl.php in [JOOMLA_HOME]/components/com_virtuemart\themes\default\templates\checkout

Look for this code:

<input type="hidden" id="paypalExpress_ecm" name="payment_method_ppex" value="" />

and change for this

<input type="hidden" id="paypalExpress_ecm" name="payment_method_ppex" value="2" />

The problem in IE8 is that JavaScript Engine doesn't execute the code that puts the value 2 in input id paypalExpress_ecm.

Virtue Mart needs that value to bypass the traditional credit card type and number validation
               
               

stAn99

  • Development Team
  • Beginner
  • *
  • Posts: 41
    • One Page Checkout for Virtuemart 2
Re: Paypal (new API) problems
« Reply #8 on: June 02, 2011, 17:28:47 pm »
Hello everybody,
 today i found a bug in PayPal New Api when using direct payment and shipping tax together. Paypal will issue an error:

Quote
Paypal did not complete the transaction - FAILURE - SHORTMESSAGE =Transaction refused because of an invalid argument. See additional error messages for details. -
ERRORCODE =10413 -
LONGMESSAGE =The totals of the cart item amounts do not match order amounts. -

Recommended solution:

edit \administrator\components\com_virtuemart\classes\payment\ps_paypal_api.php
function NVP_DoDirectPaymentRequest

after this line:
Code: [Select]
$ship_total = isset($d['shipping_total']) ? round($d['shipping_total'],2) : 0;

add:
Code: [Select]
if (!empty($d['order_shipping_tax'])) $ship_total += round($d['order_shipping_tax'],2);

The same error can occur for Paypal express or normal paypal redirect when your $ps_checkout->calc_order_totals returns incorrectly rounded values and the sum does not match order total. This is particularly problem when a price of a product is set to 1.123456 and you add 1000 quantities of the product and multiply it by a tax rate such as 19 percent.

JFrehe

  • Beginner
  • *
  • Posts: 5
Re: Paypal (new API) problems
« Reply #9 on: June 07, 2011, 16:05:59 pm »
I have experienced the same problem, but in IE only... if I run the same product through the checkout process in Google Chrome, Safari, and Firefox with only PayPal (new API) it works fine and goes to the paypal payment page, but... if I run it through IE8, it will give me the error.  Paypal Express checkout works in all instances. I have tested on Google Chrome, Safari, and Firefox in OSX and they all work fine - IE8 gives the error, Google Chrome and IE9 did work in Windows 7.

I have tried with only PayPal (new API) and with other payment methods such as cash on delivery using ps_payment

Everybody try to do this:

Open the file get_payment_method_paypal_ex.tpl.php in [JOOMLA_HOME]/components/com_virtuemart\themes\default\templates\checkout

Look for this code:

<input type="hidden" id="paypalExpress_ecm" name="payment_method_ppex" value="" />

and change for this

<input type="hidden" id="paypalExpress_ecm" name="payment_method_ppex" value="2" />

The problem in IE8 is that JavaScript Engine doesn't execute the code that puts the value 2 in input id paypalExpress_ecm.

Virtue Mart needs that value to bypass the traditional credit card type and number validation
               
               

Thanks! that worked!

upgrade

  • Beginner
  • *
  • Posts: 5
Re: Paypal (new API) problems
« Reply #10 on: June 23, 2011, 14:26:58 pm »
Hello everybody,
 today i found a bug in PayPal New Api when using direct payment and shipping tax together. Paypal will issue an error:

Quote
Paypal did not complete the transaction - FAILURE - SHORTMESSAGE =Transaction refused because of an invalid argument. See additional error messages for details. -
ERRORCODE =10413 -
LONGMESSAGE =The totals of the cart item amounts do not match order amounts. -

Recommended solution:

edit \administrator\components\com_virtuemart\classes\payment\ps_paypal_api.php
function NVP_DoDirectPaymentRequest

after this line:
Code: [Select]
$ship_total = isset($d['shipping_total']) ? round($d['shipping_total'],2) : 0;

add:
Code: [Select]
if (!empty($d['order_shipping_tax'])) $ship_total += round($d['order_shipping_tax'],2);

The same error can occur for Paypal express or normal paypal redirect when your $ps_checkout->calc_order_totals returns incorrectly rounded values and the sum does not match order total. This is particularly problem when a price of a product is set to 1.123456 and you add 1000 quantities of the product and multiply it by a tax rate such as 19 percent.

The method can't solve the problem: "Error: Credit Card Type not found" if upgrading to VirtueMart 1.1.9.

jenkinhill

  • Global Moderator
  • Super Hero
  • *
  • Posts: 20543
  • On vacation
    • Jenkin Hill Internet
Re: Paypal (new API) problems
« Reply #11 on: June 23, 2011, 15:13:43 pm »
\administrator\components\com_virtuemart\classes\payment\ps_paypal_api.php is not changed in VM1.1.9 - it is the same as in 1.1.8
Kelvyn
Jenkin Hill Internet,
Keswick, Lake District

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VM2.6.6 on Joomla 2.5.22 PHP 5.4.21
On Vacation until mid-August

upgrade

  • Beginner
  • *
  • Posts: 5
Re: Paypal (new API) problems
« Reply #12 on: June 23, 2011, 15:54:41 pm »
Hi jenkinhill,

Thank you for the reply first.

I'm sorry I should quote skulldah's post.
Because I found [JOOMLA_HOME]\components\com_virtuemart\themes\default\templates\checkout
\get_payment_method_paypal_ex.tpl.php didn't change , I update VirtueMart to 1.1.9.

But now, the error occurs in IE7, IE8 and IE9, while in VirtueMart 1.1.8, it only occurs in IE7 and IE8.

ian999999

  • Beginner
  • *
  • Posts: 3
Re: Paypal (new API) problems
« Reply #13 on: July 05, 2011, 03:27:47 am »
I am having this problem in Firefox 4 on OSX and Linux!

Using 1.9 and it is doing my head in!!!!

Anyone got a fix?

ian999999

  • Beginner
  • *
  • Posts: 3
Re: Paypal (new API) problems
« Reply #14 on: July 05, 2011, 11:22:17 am »
I do wonder if there is a fix for this... if not... Virtuemart is useless to me.

VirtueMart Forum

Re: Paypal (new API) problems
« Reply #14 on: July 05, 2011, 11:22:17 am »