1

Can anyone tell me how to automatically execute a delayed payment (let's say it's 5 days after the primary receiver receive the payment) in a chained payment manner? The key is automatic execution, not having to manually approve and pay the secondary receiver. Please illuminate with some sample code.

I have used "actionType" => "PAY_PRIMARY" so that primary receiver get money.

But how can I code so that secondary receiver get money?

4

3 に答える 3

2

解決策については、この回答を確認してください。基本的には、 90 日以内に でExecutePayment操作を実行して、二次側に支払いを送信する必要があります。payKey

于 2012-02-25T20:01:11.267 に答える
0

actionType が PAY_PPRIMARY の場合、この支払いは 90 日以内にトリガーされます。遅れていますが、時間経過ではありません。

https://cms.paypal.com/cms_content/US/en_US/files/developer/PP_AdaptivePayments.pdf

于 2012-02-15T07:20:36.410 に答える
0

手遅れかもしれませんが、将来誰かを確実に助けるでしょう。Paypal遅延チェーン支払いを統合したため、すべての金額が入るプライマリアカウントを設定でき、プライマリアカウント所有者の承認後にアカウントが転送されるセカンダリアカウントを設定することもできます.

    string endpoint = Constants_Common.endpoint + "Pay";
     NVPHelper NVPRequest = new NVPHelper();
     NVPRequest[SampleNVPConstant.requestEnvelopeerrorLanguage] = "en_US";
    //NVPRequest[SampleNVPConstant.Pay2.actionType] = "PAY";
    //the above one is for simple adoptive payment payment 
     NVPRequest[SampleNVPConstant.Pay2.actionType] = "PAY_PRIMARY";
    //the above one for deleayed chained payment
     NVPRequest[SampleNVPConstant.Pay2.currencyCode] = "USD";
     NVPRequest[SampleNVPConstant.Pay2.feesPayer] = "EACHRECEIVER";
     NVPRequest[SampleNVPConstant.Pay2.memo] = "XXXXXXXX";

次に、プライマリ レシーバーとセカンダリ レシーバーを設定する必要があります。

    //primary account
        NVPRequest[SampleNVPConstant.Pay2.receiverListreceiveramount_0] = TotalAmount;
        NVPRequest[SampleNVPConstant.Pay2.receiverListreceiveremail_0] = "XXXx.xxxxx.com";
        NVPRequest[SampleNVPConstant.Pay2.receiverListreceiverprimary_0] = "true";
        //secondary accounts
        NVPRequest[SampleNVPConstant.Pay2.receiverListreceiveramount_1] = (somemoney out of total amount);
        NVPRequest[SampleNVPConstant.Pay2.receiverListreceiveremail_1] = "xxxxx.xxxx.com";
        NVPRequest[SampleNVPConstant.Pay2.receiverListreceiverprimary_1] = "false";
        NVPRequest[SampleNVPConstant.Pay2.receiverListreceiveramount_2] = (somemoney out of total amount);
        NVPRequest[SampleNVPConstant.Pay2.receiverListreceiveremail_2] = x.x.com;
        NVPRequest[SampleNVPConstant.Pay2.receiverListreceiverprimary_2] = "false";

遅延チェーン支払いを使用している間は、有効なペイパル アカウントを提供する必要があることを忘れないでください。これで、90 日以内に支払いを実行するために使用する必要がある pay_key を取得して、他の二次受信者がお金を受け取ることができます。作業コードは次のとおりです。

    String endpoint = Constants_Common.endpoint + "ExecutePayment";
    NVPHelper NVPRequest = new NVPHelper();
    //requestEnvelope.errorLanguage is common for all the request
    NVPRequest[SampleNVPConstant.requestEnvelopeerrorLanguage] = "en_US";
    NVPRequest[SampleNVPConstant.ExecutePayment.payKey] = "your pay key";
    string strrequestforNvp = NVPRequest.Encode();
    //calling Call method where actuall API call is made, NVP string, header value adne  end point are passed as the input.
    CallerServices_NVP CallerServices = new CallerServices_NVP();
    string stresponsenvp = CallerServices.Call(strrequestforNvp, Constants_Common.headers(), endpoint);
    //Response is send to Decoder method where it is decoded to readable hash table
    NVPHelper decoder = new NVPHelper();
    decoder.Decode(stresponsenvp);
    if (decoder != null && decoder["responseEnvelope.ack"].Equals("Success") && decoder["paymentExecStatus"].Equals("COMPLETED"))
    {
    //do something
    }

それが誰かを助けることを願っています。

于 2013-05-23T06:20:21.720 に答える