When I migrated the site to the production server I can no longer checkout using PayPal Payments Advanced.
I am currently able to checkout on the development server but not on the live server without making any changes. All settings are live on both sites.
On the production site, when I click on the paypal check out button on the Paypal Advanced Hosted Page I get the following error.
•Notice: Undefined index: AMT in commerce_payflow_link_redirect_form_validate() (line 714 of /var/www/vhosts/mysite.com/httpdocs/sites/all/modules/commerce_paypal/modules/payflow/commerce_payflow.module).
•Payment failed at the payment server. Please review your information and try again.
If I use a real credit card in the Hosted Checkout Page I get the following error inside the hosted checkout page
Some required information is missing or incorrect. Please correct the fields below and try again.
Error: An error has occurred. Please contact the system administrator.
The only differences between the two environments is that the production site is using an SSL certificate for a secure connection and the versions of PHP 5.3.
Production: PHP 5.3.3
Development: 5.3.22
I am logging successful Payflow server responses on both sites:
Payflow API request to https://payflowpro.paypal.com/:
Array
(
[CREATESECURETOKEN] => Y
[SECURETOKENID] => 515e50ccbdf57730617133
[TRXTYPE] => S
[AMT] => 9.27
[CURRENCY] => USD
[INVNUM] => 80-1365135564
[BILLTOEMAIL] => email*
[BILLTOFIRSTNAME] =>
[BILLTOLASTNAME] =>
[BILLTOSTREET] => address*
[BILLTOCITY] => city*
[BILLTOSTATE] => OH
[BILLTOCOUNTRY] => US
[BILLTOZIP] => zip*
[BUTTONSOURCE] => CommerceGuys_Cart_PPA
[ERRORURL] => production/checkout/80/payment/return/OUci5bY_mjz8f7MzjVwdVI_JyyCtMMqn98wlU2-k7fc
[RETURNURL] => production/checkout/80/payment/return/OUci5bY_mjz8f7MzjVwdVI_JyyCtMMqn98wlU2-k7fc
[CANCELURL] => production/checkout/80/payment/back/OUci5bY_mjz8f7MzjVwdVI_JyyCtMMqn98wlU2-k7fc
[DISABLERECEIPT] => TRUE
[TEMPLATE] => MINLAYOUT
[CSCREQUIRED] => TRUE
[CSCEDIT] => TRUE
[URLMETHOD] => POST
[USER1] => OUci5bY_mjz8f7MzjVwdVI_JyyCtMMqn98wlU2-k7fc
[L_NAME0] => BravoArtist Presents: Dads & Run Forever
[L_COST0] => 8.00
[L_QTY0] => 1
[L_SKU0] => Dads-2013-04-09T000000
[L_NAME1] => Will Call
[L_COST1] => 0.00
[L_QTY1] => 1
[ITEMAMT] => 8.00
[TAXAMT] => 1.27
[PARTNER] => paypal
[VENDOR] => vendor*
[USER] => user*
[PWD] => XXXXXXXXX
[MODE] => LIVE
)
Array
(
[RESULT] => 0
[SECURETOKEN] => PXRZNswZ9pEbXMIxGDVbNugmD
[SECURETOKENID] => 515e2a1e8c345121398684
[RESPMSG] => Approved
)
Any hints or ideas as to why this might occur?
Comments
Comment #1
myoung008 commentedI had this same error. The Paypal API doesn't like ampersands. The problem in your case is the ampersand in the product description. The error will also occur if a customer includes an ampersand in their name or another user-supplied field.
If you drill down in your order admin to the payment result you will find "Parameter list format error:" and a result of "-6".
Comment #2
rszrama commentedWow, nice bug! I've reported it to my integration engineer within PayPal. I'm guessing that'll go into an issue queue and be dealt with eventually. In the meantime, I think the safest thing for us to do is strip ampersands and equal signs out of any parameters we pass to PPA / PFL. The issue here is that the PPA / PFL API requires you to not urlencode parameter values, and it appears they are using our parameter values as is in GET redirects to EC. Hence the failure... EC gets a bunk parameter, doesn't know what to do, and so bails with the error.
Also, I've fixed that notice, so you won't see anything about AMT any more. : )
As for the credit card error, I can't be sure if it's related or not, but I can just confirm that I don't have any problem with CC transactions. One thing you should check is the failed transaction's payload array. You can find this by viewing the transaction from the order's Payment tab. My attempts with the & in the parameter list generated the following useful data:
Commit: http://drupalcode.org/project/commerce_paypal.git/commitdiff/601d892
Comment #3.0
(not verified) commentedupdated ipn info