implicit paypal payment - PAY - You do not have permission to execute this payment implicitly

半腔热情 提交于 2020-01-11 10:13:33

问题


I want to perform an implicit payment from my account (the paypal api signed one) into another (or multiple as parallel payment).

I decided to use Adaptive Payments and have implemented the function to call the Pay action as follows

$bodyparams = array (
            "requestEnvelope.errorLanguage" => "en_US",
            'actionType' => 'PAY',
            'currencyCode' => 'USD',
            'receiverList.receiver(0).email' => 'receiver@domain.com',
            'receiverList.receiver(0).amount' => '1.00',
            'senderEmail' => 'myaccount@domain.com',
            'memo' => 'Test memo',
            'ipnNotificationUrl' => 'http://google.com',
            'cancelUrl' => 'http://google.com',
            'returnUrl' => 'http://google.com'
        );

        $url = "https://svcs.paypal.com/AdaptivePayments/Pay";


        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_HTTPHEADER, array(
            'X-PAYPAL-SECURITY-USERID: XXX',
            'X-PAYPAL-SECURITY-PASSWORD: XXX',
            'X-PAYPAL-SECURITY-SIGNATURE: XXX',
            'X-PAYPAL-REQUEST-DATA-FORMAT: NV',
            'X-PAYPAL-RESPONSE-DATA-FORMAT: JSON',
            'X-PAYPAL-APPLICATION-ID: APP-XXX',
        ));
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
        curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($bodyparams));

        $response = json_decode(curl_exec($ch));

        $pk="";
        if(isset($response->responseEnvelope) && $response->responseEnvelope->ack == "Success"){
            $pk = $response->payKey;
        }else{

            die(var_dump($response));
        }



        $ch = curl_init();
        header("Location: https://www.paypal.com/cgi-bin/webscr?cmd=_ap-payment&paykey=".$pk);
        die();

Paypal returns me "You do not have permission to execute this payment implicitly"

    {
  "responseEnvelope": {
    "timestamp": "2016-05-19T10:05:05.407-07:00",
    "ack": "Failure",
    "correlationId": "22e0930fcae7d",
    "build": "20420247"
  },
  "error": [
    {
      "errorId": "550001",
      "domain": "PLATFORM",
      "subdomain": "Application",
      "severity": "Error",
      "category": "Application",
      "message": "You do not have permission to execute this payment implicitly"
    }
  ]
}

But when I switch the 2 accounts (i.e. just for test, the other account sends me the money), I get redirected to the approval process.

Now, the app I am using has the flag as shown in the picture below

What should I check? It seems that paypal doesn't allow me to send implicit payments, but don't know for what reason (paypal support were not be able to say anything else then give me some links).

IMPORTANT EDIT
If I use the sandbox credentials, the payment is "COMPLETED"

来源:https://stackoverflow.com/questions/37329755/implicit-paypal-payment-pay-you-do-not-have-permission-to-execute-this-payme

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!