我已经有大约 1 个月没能从事我的项目了。现在我有时间重新投入其中。我注意到 paypal 做了一些改变。
在我暂时离开这个项目之前,我能够使用 paypal api 发送付款。但是现在,当我使用相同的代码时,我收到以下消息:
Preapproval API call failed. Detailed Error Message: The receiver is based in a country that isn't enabled to receive paymentsError Code: 580022Error Severity: ErrorError Domain: PLATFORMError Category: Application
我在英国,我的 paypalplaform.php 文件根本没有改变。我唯一更改的是 api 凭据以及我获得的新凭据:
$PROXY_HOST = '127.0.0.1';
$PROXY_PORT = '808';
$Env = "sandbox";
$API_UserName = "new-facilitator_api-email-goes-here";
$API_Password = "password-goes-here";
$API_Signature = "sig-goes-here";
// AppID is preset for sandbox use
// If your application goes live, you will be assigned a value for the live environment by PayPal as part of the live onboarding process
$API_AppID = "APP-80W284485P519543T";
$API_Endpoint = "";
if ($Env == "sandbox")
{
$API_Endpoint = "https://svcs.sandbox.paypal.com/AdaptivePayments";
}
else
{
$API_Endpoint = "https://svcs.paypal.com/AdaptivePayments";
}
为什么这不再有效?我在 apache error.log 文件中没有收到任何错误。
最佳答案
问题在于您使用的沙盒 AppID:APP-80W284485P519543T。
我们已注意到此问题并正在努力解决它。一旦这个问题得到解决,我会尽快通知你。
在此期间,您应该能够使用美国帐户恢复测试。
关于php - 新的 paypal 系统已停止使用我的代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15552292/