Reputation: 625
We have tried and tested our site with Paypal sandbox and it works fully deducting the amount.
We switched the API details to Paypal and the links. We have tried with several paypal accounts to see if it works (all of them have enough funds for the transaction).
We recieve this back through the API on our returnUrl page - The API Call Failed
Array ( [TIMESTAMP] => 2012%2d07%2d15T19%3a31%3a43Z [CORRELATIONID] => 927a89205e54a
[ACK] => Failure [VERSION] => 65%2e1 [BUILD] => 3300093 [L_ERRORCODE0] => 13113
[L_SHORTMESSAGE0] => Buyer%20Cannot%20Pay%2e [L_LONGMESSAGE0] =>
The%20Buyer%20cannot%20pay%20with%20PayPal%20for%20this%20Transaction%2e [L_SEVERITYCODE0] => Error )
Php to make the final API call -
$APIUSERNAME="*****";
$APIPASSWORD="***";
$APISIGNATURE="*****";
$ENDPOINT = "https://api-3t.paypal.com/nvp";
//$ENDPOINT = "https://api-3t.sandbox.paypal.com/nvp";
$VERSION = "64";
//Build the Credential String:
$cred_str = "USER=" . $APIUSERNAME . "&PWD=" . $APIPASSWORD . "&SIGNATURE=" .
$APISIGNATURE . "&VERSION=" . $VERSION;
//Build NVP String for GetExpressCheckoutDetails
$nvp_str = "&METHOD=GetExpressCheckoutDetails&TOKEN=" . urldecode($token);
//Lets combine both strings then make the API call
$req_str = $cred_str . $nvp_str; $response = PPHttpPost($ENDPOINT, $req_str);
The above array comes from when i recieve my final acknowledgment from paypal.
//check Response
if($doresponse['ACK'] == "Success" || $doresponse['ACK'] == "SuccessWithWarning") {
echo "completed"; //just put to test
include "finishtransaction.php"; //cancels my cart sessions
} else{
echo "The API Call Failed"; print_r($doresponse);
}
There is not much on google about this error, not even in the API error codes. Has anyone come accross this before?
Upvotes: 2
Views: 6885
Reputation: 6632
The PayPal API Error Codes are admittedly not very helpful.
Error code 13113, or "The Buyer cannot pay with PayPal for this Transaction" means that PayPal has taken a security measure by refusing to process the transaction. This can happen for one of the following reasons (there are more, but here are a few):
Unfortunately, there isn't much anyone can tell you without thoroughly looking through your code. I would check my code and make sure all appropriate flags and what-not are set. If you wait a few hours and are still getting the error (especially on multiple/new accounts), then you will need to contact PayPal.
I know it sucks, but only PayPal will be able to tell you why exactly the transaction is failing.
Upvotes: 7