VirtueMart Forum

VirtueMart 1.1.x [ Old version - no longer supported ] => Payment VM 1.1 => PayPal / PayPal Pro VM 1.1 => Topic started by: TechGuy1 on May 27, 2010, 22:57:18 PM

Title: Error: Failure in Processing the Payment (ps_paypal_api)
Post by: TechGuy1 on May 27, 2010, 22:57:18 PM
Hello All

I just installed the Paypal pro module. I entered my API info and when I check out I get..

Error: Error - Paypal did not complete the transaction. Please try again in a little while.
Error: Failure in Processing the Payment (ps_paypal_api)

Does anyone know why? or at least know if it is a VM issue or PP isue?

Thanks in advance!
Brad
Title: Re: Error: Failure in Processing the Payment (ps_paypal_api)
Post by: WebWeaver on June 02, 2010, 00:14:34 AM
I'm having the exact same problem on my site:

www.solsticeglass.com (http://www.solsticeglass.com)

I had installed the previous version of this plugin in early February and it has been capturing most transactions.  But it came to my attention that maybe as many as 5% of the transactions weren't being processed even when tried a couple different times.

I just installed the latest version of the plugin and now am getting the same error as TechGuy1:

Error: Error - Paypal did not complete the transaction. Please try again in a little while.
Error: Failure in Processing the Payment (ps_paypal_api)

This is only intermittent and appears to not happen when orders are processed through the Paypal button...only intermittently when paying direct with a credit card. 

My site is live and is my primary means of income.  I have no other options for payment processing at this time so any quick help would be very much appreciated.

Title: Re: Error: Failure in Processing the Payment (ps_paypal_api)
Post by: gina on October 07, 2010, 22:05:26 PM
There is an error in the tax amount calculation that can cause this.
In a couple of places I changed:
$taxamt = $amt - $order_totals['item_total'] - $shippingamt;
to:
$taxamt = round($amt - ($order_totals['item_total'] + $shippingamt),2);
Title: Re: Error: Failure in Processing the Payment (ps_paypal_api)
Post by: Q-collective on November 02, 2010, 19:21:54 PM
Same issue as in the first two posts. It seems to be a bug in Virtuemart as the issue was caused by making an order before making an account. After the order was remade when logged in, the error disappeared and the transaction went fine.
Title: Re: Error: Failure in Processing the Payment (ps_paypal_api)
Post by: 4lane on February 15, 2011, 22:26:48 PM
Was there any resolution to this problem? I'm having the exact same problem as the others.
Title: Re: Error: Failure in Processing the Payment (ps_paypal_api)
Post by: zanardi on February 19, 2011, 13:49:49 PM
@4lane:
can you restate exactly the error you are getting? With all steps necessary to reproduce it?
Title: Re: Error: Failure in Processing the Payment (ps_paypal_api)
Post by: patrickmark on February 25, 2011, 03:48:29 AM
i have this same:


Deprecated: Function ereg_replace() is deprecated in /home/digital4/public_html/administrator/components/com_virtuemart/classes/ps_checkout.php on line 491

Notice: Undefined index: ppex_token in /home/digital4/public_html/administrator/components/com_virtuemart/classes/payment/ps_paypal_api.php on line 345

Notice: Undefined index: ppex_userdata in /home/digital4/public_html/administrator/components/com_virtuemart/classes/payment/ps_paypal_api.php on line 347
Error: Error - Paypal did not complete the transaction. Please try again in a little while.
Error: Failure in Processing the Payment (ps_paypal_api)
Title: Re: Error: Failure in Processing the Payment (ps_paypal_api)
Post by: Stefanos on February 25, 2011, 05:15:10 AM
Hi, I work on a digital download store, tested the ps_paypal_api module with sandbox and works great except that the download purchases cannot get auto-confirmed,
so I thought that this might be an issue of the sandbox once it is for testing, and turned it to the proper setup using the API Username/API Password/Signature as generated by the paypal account.
The paypal account type is "Premier"/Verified (no Websites Payments Pro), and works great for years. Does it need to be Business or even needing to have "Websites Payments Pro"?

I made a product with 1 euro cost and entered real credit info to proceed to checkout.
I get the following errors:

Error: Error - Paypal did not complete the transaction. Please try again in a little while.
Error: Failure in Processing the Payment (ps_paypal_api)

my ps_paypal_api is the only payment method enabled. Setup:

Payment method type:
Use Payment Processor (also tried "Credit Card" / could this be the problem ? does it only work using "HTML-Form based (e.g. PayPal)" ? need an asnwer to this one please)

Accepted Credit Card Types:
Visa
MasterCard
American Express
Discover Card

Enable Direct Payment?: No
Sandbox Mode?: No
Show PayPal Errors: No

If I try with a sligtly different number than the real one I entered I do get:
Error: The Credit Card Number entered is not valid.

I have adminsitrator directory password protected, tried disabling this with no luck.
No SSL for now, also the site is in joomla/offline mode (could this be the issue ?)

with same settings, sandbox worked excellent...
any help appreciated..
cheers





Title: Re: Error: Failure in Processing the Payment (ps_paypal_api)
Post by: zanardi on February 25, 2011, 18:14:50 PM
Quote from: patrickmark on February 25, 2011, 03:48:29 AM
Deprecated: Function ereg_replace() is deprecated in /home/digital4/public_html/administrator/components/com_virtuemart/classes/ps_checkout.php on line 491

Notice: Undefined index: ppex_token in /home/digital4/public_html/administrator/components/com_virtuemart/classes/payment/ps_paypal_api.php on line 345

Notice: Undefined index: ppex_userdata in /home/digital4/public_html/administrator/components/com_virtuemart/classes/payment/ps_paypal_api.php on line 347
Error: Error - Paypal did not complete the transaction. Please try again in a little while.
Error: Failure in Processing the Payment (ps_paypal_api)

@patrickmark:
"DEPRECATED" and "NOTICE" will be surely fixed, thank you.
About the PayPal error, what option do you use for "User Registration Type"? Normal, Silent, Optional, No account?
Title: Re: Error: Failure in Processing the Payment (ps_paypal_api)
Post by: zanardi on February 25, 2011, 18:25:09 PM
Quote from: Stefanos on February 25, 2011, 05:15:10 AM
The paypal account type is "Premier"/Verified (no Websites Payments Pro), and works great for years. Does it need to be Business or even needing to have "Websites Payments Pro"?

Not sure about this. PayPal API does in fact implement Website Payment Pro methods, i don't know if these methods are only available to certain PayPal account types. You'd better ask to PayPal support.

Quote from: Stefanos on February 25, 2011, 05:15:10 AM
Payment method type:
Use Payment Processor (also tried "Credit Card" / could this be the problem ? does it only work using "HTML-Form based (e.g. PayPal)" ? need an asnwer to this one please)

"Use Payment Processor" is the right one. "HTML-Form based" is NOT right.

Quote
with same settings, sandbox worked excellent...

This really suggests that your PayPal account type could be the culprit. Try to solve the first question with PayPal support, or try with a different PayPal account if this is possible.
Title: Re: Error: Failure in Processing the Payment (ps_paypal_api)
Post by: Stefanos on February 25, 2011, 18:46:59 PM
hi zanardi, thanks for the answers, I appreciate.

I spent many hours on this and finally found out the explanations which are in no way related to the plugin. A good start was the different error messages giving error codes, which exist for checking on this page:
https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_nvp_errorcodes

example this one:
10500
Invalid Configuration
This transaction cannot be processed due to an invalid merchant configuration.
Occurs when you have not agreed to the billing agreement.

..well, this appears when your paypal account does not have "website payments pro" activated, and costs 30 usd (per month):
https://merchant.paypal.com/cgi-bin/marketingweb?cmd=_render-content&content_ID=merchant/wp_pro

there is no other way to avoid taking the user to the paypal site to complete the transaction, only the above.

In fact, as I think paypal express checkout vs the old one don't have any difference to me except little changes to the page the user gets taken once they both accept credit card without a paypal account, so there is no point !

// Edit
most of people's errors get solved by something very silly/obvious.. clearing cache/cookies and restart browser after changes in the api/sandbox....
Title: deprecated/notice problem
Post by: EdgeCrafter on March 01, 2011, 01:57:28 AM
Quote from: zanardi on February 25, 2011, 18:14:50 PM
Quote from: patrickmark on February 25, 2011, 03:48:29 AM
Deprecated: Function ereg_replace() is deprecated in /home/digital4/public_html/administrator/components/com_virtuemart/classes/ps_checkout.php on line 491

Notice: Undefined index: ppex_token in /home/digital4/public_html/administrator/components/com_virtuemart/classes/payment/ps_paypal_api.php on line 345

Notice: Undefined index: ppex_userdata in /home/digital4/public_html/administrator/components/com_virtuemart/classes/payment/ps_paypal_api.php on line 347
Error: Error - Paypal did not complete the transaction. Please try again in a little while.
Error: Failure in Processing the Payment (ps_paypal_api)

@patrickmark:
"DEPRECATED" and "NOTICE" will be surely fixed, thank you.
About the PayPal error, what option do you use for "User Registration Type"? Normal, Silent, Optional, No account?

I had the depreceated/notice problem with a joomla template bought from joomla-monster.com (http://bit.ly/joomla-template-monster)

My findings:
php 5.3.X might give some problems with deprecated warning and notices.

Permanent resolution:
Researching this error it seems the code fix is to "switch out eregi() and ereg_replace with preg_match() and preg_replace()"


I got an update for my template, but virtuemart throws a lot of these warnings for php 5.3.x, so I used the workaround below;

Workaround:
Turn of PHP generated warnings via custom php.ini file, code below

error_reporting = E_ALL & ^(E_DEPRECATED|E_NOTICE)


I found out my webhost Dreamhost (http://bit.ly/dreamhost-webhosting) supports easy setup for a custom php.ini file for 5.3+ but your webhost may differ.
Title: Re: Error: Failure in Processing the Payment (ps_paypal_api)
Post by: zanardi on March 12, 2011, 16:11:40 PM
If anyone of you would like to test, a BETA version of 1.1.8 package is available at http://dev.virtuemart.net/issues/308, that should remove those "Deprecated" and "Notice" issues. Thank you.
Title: Re: Error: Failure in Processing the Payment (ps_paypal_api)
Post by: khancock on March 17, 2011, 03:11:14 AM
I'm having the exact same problem as the original poster, did anyone ever find a solution for this? I'm not receiving the deprecation or php warnings that others have mentioned.
Title: Re: Error: Failure in Processing the Payment (ps_paypal_api)
Post by: HDG on March 18, 2011, 21:58:54 PM
I'm having the same issue too.
Title: Re: Error: Failure in Processing the Payment (ps_paypal_api)
Post by: zanardi on March 19, 2011, 12:48:13 PM
It looks like it could be a PayPal account type issue. I.E., you have to have "business" account to use Website Payment Pro, which is implemented by new PayPal API.
Title: Re: Error: Failure in Processing the Payment (ps_paypal_api)
Post by: Tiger452 on May 08, 2011, 15:47:30 PM
Does anyone know a way to disable the credit card option on the shop and just have Paypal payment option? This could be another solution, instead of having to get the website pro payment.
Thank
Title: Re: Error: Failure in Processing the Payment (ps_paypal_api)
Post by: rajeev108 on May 31, 2011, 21:21:03 PM
I am using Your VirtueMart version: VirtueMart 1.1.8 stable [Little brother] 19/03/2011 12:11 GMT.

I am getting the following error on checkout which I have edited for sensitive info:

Error: Error - 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. -
&PAYMENTACTION=Sale&IPADDRESS=127.0.0.1&CREDITCARDTYPE=Visa&ACCT=XXXX&EXPDATE=042012&EMAIL=xxx%40yahoo.co.uk&FIRSTNAME=Test&LASTNAME=User&CVV2=000&STREET=test+address1&CITY=Test+city&STATE=EN&COUNTRYCODE=GB&ZIP=XX5+3XX&SHIPPINGAMT=6.39&CURRENCYCODE=GBP&TAXAMT=0.2&DESC=&INVNUM=66_863368f0018ef7cc8&BUTTONSOURCE=Virtuemart_Cart_DP&L_AMT0=1&L_QTY0=1&L_NAME0=Hammer&ITEMAMT=1&AMT=8.87&SHIPTONAME=Test+User&SHIPTOSTREET=test+address1&SHIPTOSTREET2=test+address+2&SHIPTOCITY=Test+city&SHIPTOSTATE=EN&SHIPTOZIP=SW15+3QJ&SHIPTOCOUNTRYCODE=GB
Error: Error - Paypal did not complete the transaction. Please try again in a little while.
Error: Failure in Processing the Payment (ps_paypal_api)

The PayPal forum tells me that AMT should equal ITEMAMT+TAXAMT+SHIPPINGAMT+HANDLINGAMT

Looking at my transaction details it seems that TAXAMT field just has VAT for the product item but not the postage. However, at the time of checkout it correctly shows the VAT for both product and shipping. Is there a bug in ps_paypal_api?
Title: Re: Error: Failure in Processing the Payment (ps_paypal_api)
Post by: rpolanco on August 23, 2011, 23:14:16 PM
the original posting for where the problem resolution is found is as follows: http://forum.virtuemart.net/index.php?topic=87202.0

I have resolved the problem by modifying ps_paypal_api.php line 1748 to be:

$ship_total = isset($d['shipping_total']) ? round($d['shipping_total'] + $d['shipping_tax'] ,2) : 0;

It seems that elsewhere the SHIPPINGAMT field of PayPal API is set with value including shipping VAT but here it is not. For example, if we look at line 1653 it is clearly adding shipping VAT:

$shippingamt = round($order_totals['order_shipping']+$order_totals['order_shipping_tax'],2);

It seems to be a bug in VirtueMart and I am new to the product so those who are familiar with the product can report it as a bug and get it rectified in future additions.
Title: Re: Error: Failure in Processing the Payment (ps_paypal_api)
Post by: useris on December 17, 2011, 15:40:40 PM

It did not solved the problem for me.
Quote from: rpolanco on August 23, 2011, 23:14:16 PM
the original posting for where the problem resolution is found is as follows: http://forum.virtuemart.net/index.php?topic=87202.0

I have resolved the problem by modifying ps_paypal_api.php line 1748 to be:

$ship_total = isset($d['shipping_total']) ? round($d['shipping_total'] + $d['shipping_tax'] ,2) : 0;

It seems that elsewhere the SHIPPINGAMT field of PayPal API is set with value including shipping VAT but here it is not. For example, if we look at line 1653 it is clearly adding shipping VAT:

$shippingamt = round($order_totals['order_shipping']+$order_totals['order_shipping_tax'],2);

It seems to be a bug in VirtueMart and I am new to the product so those who are familiar with the product can report it as a bug and get it rectified in future additions.
Title: Re: Error: Failure in Processing the Payment (ps_paypal_api)
Post by: nasowos on March 02, 2012, 16:53:17 PM
Hey guys,

I have also had this problem from the thread starter until today:

Quote from: TechGuy1 on May 27, 2010, 22:57:18 PM
I just installed the Paypal pro module. I entered my API info and when I check out I get..

Error: Error - Paypal did not complete the transaction. Please try again in a little while.
Error: Failure in Processing the Payment (ps_paypal_api)

I tryed a lot. Then I made something undone: The hack to avoid displaying the unwanted Credit Card payment method: http://www.aglobalweb.com/aglobalweb/blog/2-virtuemart/48-virtuemart-paypal-api-bugs-and-solutions.html

So I replaced the "fixed" ps_checkout.php and ps_payment_method.php with the original, backuped ones and the problem did never occur again! So this "fix" was the problem! (At least in my case.)

So this problem was solved, while another appeared again: the unwanted credit card payment method. I fixed it rather simple myself by commenting out the following line in the list_payment_methods.tpl.php, which is responsible for diplaying the (paypal related) credit card payment method:

// $ps_payment_method->list_paypalrelated($payment_method_id,  false);

Simply paste the "//" in front of this code line and you will be rid of the credit card payment method and all works fine (at least in my case).

Please let me know if this worked for you guys (as I am surely not the only one who is fu**ing around with all these annoying virtuemart bugs)..

Best wishes, colleagues!
Title: Re: Error: Failure in Processing the Payment (ps_paypal_api)
Post by: vandusendesign on March 09, 2012, 20:55:45 PM
I am getting the general "Error: Failure in Processing the Payment (ps_paypal_api)".  Only on the CC form method.  I have been back and forth with PayPal and through every forum I can find online, and am still having this issue. 

Can anyone give me some direction with this issue?

https://www.thegreatunbaked.com/store.html?page=shop.browse&category_id=1
LIVE MODE

VM 1.1.8
Joomla 1.5.25
PayPal (NEW API)