I have a problem with SetExpressCheckout paypal nvp . I'm getting the following error
TIMESTAMP=2014%2d09%2d12T04%3a46%3a48Z&CORRELATIONID=bac06e6e9473d&ACK=Failure&VERSION=112%2e0&BUILD=127
86467&L_ERRORCODE0=10400&L_SHORTMESSAGE0=Transaction%20refused%20because%20of%20an%20invalid%20argument%2e%20See%20additional%20error%20messages%20for%20details%2e&L_LONGMESSAGE0=Order%20total%20is%20missing%2e&L_SEVERITYCODE0=Error
I have passed the following variables for setexpresscheckout,
&RETURNURL=xxx&CANCELURL=yyy&ALLOWNOTE=1&PAYMENTREQUEST_0_PAYMENTACTION=Sale&L_PAYMENTREQUEST_0_NAME0=Nokia presents the Lumia a feature-rich mid-range smartphone&L_PAYMENTREQUEST_0_NUMBER0=xROwRr6F&L_PAYMENTREQUEST_0_AMT0=50&L_PAYMENTREQUEST_0_QTY0=1&LOGOIMG=mmm&PAYMENTREQUEST_0_SHIPPINGAMT=10&PAYMENTREQUEST_0_TAXAMT=0&PAYMENTREQUEST_0_ITEMAMT=50&PAYMENTREQUEST_0_AMT=60&PAYMENTREQUEST_0_CURRENCYCODE=USD
But error says "order total is missing".. is all passed variables are correct??
Please help!
I have fixed the issue, because of all item amounts, i have given urlencode and for returnURL & cancelURL, its decoded before passing to paypal server. Now i removed all urlencode from item amounts and that solved the problem.
Thanks!
Related
PayPal is ignoring the response to my instant update callback.
I'm on sandbox
I'm getting the callback
I'm returning the exact example result in the documentation
...and PayPal continues to show my default shipping fee
Here's what I return from the callback (the example response at the end of this page):
METHOD=CallbackResponse&OFFERINSURANCEOPTION=true&L_SHIPPINGOPTIONNAME0=UPS Next Day Air&L_SHIPPINGOPTIONAMOUNT0=20.00&L_TAXAMT0=2.20&L_INSURANCEAMOUNT0=1.51&L_SHIPPINGOPTIONISDEFAULT0=false&L_SHIPPINGOPTIONNAME1=UPS Express 2 Days&L_SHIPPINGOPTIONAMOUNT1=10.00&L_TAXAMT1=2.00&L_INSURANCEAMOUNT1=1.35&L_SHIPPINGOPTIONISDEFAULT1=true&L_SHIPPINGOPTIONNAME2=UPS Ground2 to 7 Days&L_SHIPPINGOPTIONAMOUNT2=9.99&L_TAXAMT2=1.99&L_INSURANCEAMOUNT2=1.28&L_SHIPPINGOPTIONISDEFAULT2=false
I've also tried a much simpler response with no change in effect:
L_SHIPPINGOPTIONAMOUNT0=20.00&OFFERINSURANCEOPTION=false&L_SHIPPINGOPTIONISDEFAULT0=true&L_SHIPPINGOPTIONNAME0=Standard+Domestic&METHOD=CallbackResponse
What could I possibly be doing wrong? I see the callback in my server log. This is baffling.
It seems like in the response from the above url one parameter is missing which is "L_SHIPPINGOPTIONLABEL0=somenamehere" .
Try updating your callback script to send the above variable also in the response to the PayPal and see if that works for you .
For everyone interested, here is the documentation of the "Callback Response Message". I was also searching for the documentation because of a missing parameter.
https://developer.paypal.com/docs/classic/api/merchant/Callback_API_Operation_NVP/
I am passing my PayPal API call like this:
&METHOD=SetExpressCheckout
&RETURNURL=''
&CANCELURL=''
&PAYMENTREQUEST_0_PAYMENTACTION='SALE'
&PAYMENTREQUEST_0_NOTIFYURL=''
&BRANDNAME=''
&NOSHIPPING=0
&PAYMENTREQUEST_0_CURRENCYCODE=''
&LOCALECODE=US
&LOGOIMG=''
&CARTBORDERCOLOR=''
&ALLOWNOTE=0';
&PAYMENTREQUEST_0_CUSTOM=''
&PAYMENTREQUEST_0_SELLERPAYPALACCOUNTID=''
&L_PAYMENTREQUEST_0_NAME1=''
&L_PAYMENTREQUEST_0_AMT1=''
'&L_PAYMENTREQUEST_0_QTY1=''
&PAYMENTREQUEST_0_ITEMAMT=''
&PAYMENTREQUEST_0_SHIPPINGAMT=''
&PAYMENTREQUEST_0_AMT=''
and obviously I am including the:
'&PAYMENTREQUEST_0_DESC='.urlencode($desc).
where $desc = "Payment made from My Website";
But it's not showing anywhere in the confirmation emails that PayPal sends. Neither in the sandbox nor in the live version.
Has anyone gotten this to work successfully?
If you don't include items information, this parameter will show on PayPal checkout page.
I found a way to do it.
It's with: '&PAYMENTREQUEST_0_NOTETEXT='.urlencode($desc).
i have used the paypal nvp (name value pair) in sandbox. all worked. when the client approved to go live. i have changed the url, username, password... all seems fine.
but...
adding to cart on the site and sending to paypal with server side MSXML2.ServerXMLHTTP with method "SetExpressCheckou" work. i get the token. than getting back from paypal and executing "GetExpressCheckoutDetails" works. on same page load i then need to execute "DoExpressCheckoutPayment" but i get "opetation time out "
i have tried "WinHttp.WinHttpRequest.5.1" and tried setting timeout for the process or for the page or for the website in the IIS - nothing work stable as it should!
Set paypalHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP")
paypalHTTP.Open "POST", requestURL, False
paypalHTTP.Send requestPARMS
paypalHTTP.waitForResponse 5
what can be done here?
I am building a payout system using PayPal's Mass Pay API. According to their documentation, a message will come back with one of the following status responses:
"Success"
"SuccessWithWarning"
"Failure"
"FailureWithWarning"
Does anyone know what an example of a "SuccessWithWarning" situation is for the Mass Pay API? I have only been able to simulate "Success" and "Failure" in Sandbox. Even after turning on Negative Testing for my Sandbox account, I was not able to reproduce a "SuccessWithWarning" status with the Mass Pay API. Any help is appreciated! Thank you.
For reference:
https://developer.paypal.com/docs/classic/api/NVPAPIOverview/
The above four values are the possible values for the variable ACK . Not all the API return the "SuccessWithWarning" as the ACK value . This value is applicable only to some API's like SetExpressCheckout API , DoExpressCheckout API etc . You can refer the below link to check what are the possible errors related to a particular API:
https://developer.paypal.com/webapps/developer/docs/classic/api/errorcodes/#id09C3F0O0NTU
I was sent a notification on one of my legacy systems today with the "SuccessWithWarning" response.
ACK = SuccessWithWarning
VERSION = 65.1
BUILD = 12896494
L_ERRORCODE0 = 11812
L_SHORTMESSAGE0 = Invalid Data
L_LONGMESSAGE0 = The value of Description parameter has been truncated.
L_SEVERITYCODE0 = Warning
So there is one example for you.
We have been using "Post to return page" (rm = 2) as the way of receiving payment data for regular one time purchase (web_accept) and we have been getting "VERIFIED" fine when doing the validation. Recently we want to add a subscription-based product so I have been testing in the paypal sandbox and I am really baffled about what I did wrong for always getting INVALID when validating subscriptions (subscr_signup). The regular purchases returned VERIFIED in the sandbox just fine but not the subscriptions. It is the exact same piece of code for posting the validation, the same merchant/buyer combination...etc. Did I miss anything? Below is the common classic ASP code snippets which I have used. Please advise. Thanks
' read post from PayPal system and add 'cmd'
str = Request.Form & "&cmd=_notify-validate"
' post back to PayPal system to validate
'set objHttp = Server.CreateObject("Msxml2.ServerXMLHTTP")
' set objHttp = Server.CreateObject("Msxml2.ServerXMLHTTP.4.0")
set objHttp = Server.CreateObject("Microsoft.XMLHTTP")
objHttp.open "POST", "https://www.sandbox.paypal.com/cgi-bin/webscr", false
objHttp.setRequestHeader "Content-type", "application/x-www-form-urlencoded"
objHttp.Send str
There are some IPN issues that are currently effecting the live site. This issue that you are reporting sounds like it may be related to the issues. I would suggest opening up a ticket with PayPal's Merchant Technical Support team. This way we can look into the issue further and also notify you once the issue is resolved.