Classic API NVP, Classic ASP DoDirectPayment in Sandbox - paypal

I'm getting the following error when running a DoDirectPayment method in the sandbox. The same code is actually working fine in the live version.
WinHttp.WinHttpRequest error '80072f7d'
An error occurred in the secure channel support
BTW, the endpoint I'm using is:
API_ENDPOINT = "https://api-3t.sandbox.paypal.com/nvp"
I found a post that recommends to change:
Set objHttp = Server.CreateObject("WinHTTP.WinHTTPRequest.5.1")
by
Set objhttp = Server.CreateObject ("MSXML2.XMLHTTP.6.0")
In that case the response is:
TIMESTAMP=2016-08-11T17:04:06Z&
CORRELATIONID=aa25568f7686b&
ACK=Failure&
VERSION=63.0&
BUILD=000000&
L_ERRORCODE0=10759&
L_SHORTMESSAGE0=Transaction cannot be processed.&
L_LONGMESSAGE0=Please use a different payment card.&
L_SEVERITYCODE0=Error&
AMT=4.00&
CURRENCYCODE=USD
By the way, I have tested with more than one card. i.e:
MasterCard 5555555555554444
MasterCard 5105105105105100
Visa 4111111111111111
Visa 4012888888881881
Any help will be appreciated.

I finally found the issue. I was using testing card numbers from paypal provided in this site:
https://www.paypalobjects.com/en_US/vhelp/paypalmanager_help/credit_card_numbers.htm
Instead of using that, I got the numbers from the following site, and everything goes fine.
http://www.getcreditcardnumbers.com/

Related

Has anybody gotten PAYMENTREQUEST_0_DESC to work in the PayPal API?

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).

Payouts errors on Sandbox

I am trying to create Payout functionality using REST API, and I have few errors.
While I am sending this request :
{"sender_batch_header":{"sender_batch_id":"test_0","email_subject":"RaceBets Withdrawal","recipient_type":"PAYPAL_ID"},"items":[{"recipient_type":"PAYPAL_ID","amount":{"currency":"EUR","value":"20.0"},"receiver":"XXXX","note":"Hello there!","sender_item_id":"71292226"}]}
I received:
JAXBException occurred : 4 counts of IllegalAnnotationExceptions.
or :
{"name":"REQUIRED_SCOPE_MISSING","message":"Access token does not have required scope.","information_link":"https://developer.paypal.com/webapps/developer/docs/api/#REQUIRED_SCOPE_MISSING"}
the second error is also strange, because payments are working fine, and scope is also fine
{"scope":"https://uri.paypal.com/services/subscriptions https://api.paypal.com/v1/payments/.* https://api.paypal.com/v1/vault/credit-card https://uri.paypal.com/services/applications/webhooks openid https://uri.paypal.com/services/invoicing https://api.paypal.com/v1/vault/credit-card/.*","access_token":"xxx","token_type":"Bearer","app_id":"APP-xxx","expires_in":28800}
Any idea?
For the second error make sure you have checked the option for "payouts" under your application at developer.paypal.com .
Go to developer.paypal.com --> DashBoard --> My APP -- > Click your APP Name --> App Feature . Select Payout here .
Regarding the REQUIRED_SCOPE_MISSING error, I experienced this as well. Adding the scope as the other poster describes fixed the issue.
Please note that after changing scope (i.e. adding Payouts) it can take a few hours for the change to be reflected, so you'll continue getting the error for awhile. This confused me when I was testing because I didn't expect sandbox to have this latency.

Paypal NVP and classic asp

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?

Payment validation got VERIFIED for web_accept transaction type but not for subscr_signup

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.

Paypal shows old version error on express check out , I got my page run first but now shows this error

I doing paypal express checkout in jsp on sandbox with out using the sdk I am getting the ACK as sucess when generating the token after that when i redirected to sandbox now it shows error message on sandbox as
You have requested an outdated version of PayPal. This error often results from the use of bookmarks.
This is the Ack response i got
TOKEN=EC%2d5PT30649GD612951T&TIMESTAMP=2012%2d03%2d04T16%3a44%3a18Z&CORRELATIONID=4ed0e9de9ec8a&ACK=Success&VERSION=84%2e0&BUILD=2571254
I decoded the response using URLDecoder and redirected to the sandbox
if (ack.equals("Success")) { String logurl = "https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=express-checkout&token="+token;
response.sendRedirect(logurl);
}
Thanks in advance for any suggestions and answers
If you are receiving this error, it is best to check the url you are redirecting.
Documentation says that the URL is
https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout
Careful with the _express-checkout part. If you are using an ide (like Visual Studio) that marks the urls as links, you might think that it is a space (as it becomes invisible) and at the first error you encounter, you might delete the underscore char.
I got it working and I am answering because i found many one have same error This error occurs mainly due to any of the samll errors or changes in your NVP if you are using it.
I think This link will be helps , deals with "You have requested an outdated version of PayPal"