우리는 Paypal 샌드 박스로 사이트를 시험하고 테스트했으며 금액을 완전히 공제합니다.PHP에서 Paypal API Express Checkout 지불 오류 코드 13113
Google은 API 세부 정보를 Paypal 및 링크로 전환했습니다. 우리는 그것이 작동 하는지를보기 위해 여러 페이팔 계정으로 시도했습니다 (그들 모두는 거래에 충분한 자금을 가지고 있습니다).
우리는 우리의 returnUrl 페이지에서 API를 통해이 다시받을 - API 호출이 최종 API를 호출 할 PHP는
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)
실패 -
$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);
위의 배열이 경우에서 유래를 내가 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);
}
Google 오류 코드에 대한 정보는 많지 않습니다. 누구도 전에 건너 온 적이 있습니까?
감사합니다. 이제 모든 코드를 확인해 보겠습니다 : D – JP29
모든 매개 변수에 'urlencode'를 사용했는지 확인하십시오. 당신이'urlencode ($ token)'을 의미한다고 생각할 때'urldecode ($ token)'을 사용합니다. – cegfault
고마워요. 시도 인코딩. 분명히 그것이 기여한 요인이라면 샌드 박스는 효과가 없었을 것입니다. – JP29