2012-02-13 9 views
1

連鎖支払方式で遅延支払を自動的に実行する方法(プライマリ受信者が支払を受け取ってから5日以内に)を教えてもらえますか?キーは自動実行であり、セカンダリレシーバを手動で承認して支払う必要はありません。いくつかのサンプルコードを照らしてください。遅延連鎖支払

私は、 "actionType" => "PAY_PRIMARY"を使用して、プライマリ受信者がお金を得るようにしました。

しかし、どのようにして二次受信者がお金を得るようにコードすることができますか?

答えて

0

actionTypeはPAY_PPRIMARYです この支払いは90日以内に行われます。 遅延はしていますが、時間が経過していません。

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

+0

申し訳ありませんが、詳しいことはできますか? actionTypeをPAY_PRIMARYとして指定しました。その後、自動的に5日後に2次受領者への2回目の支払いを自動的に開始しますか? – user1206030

2

解決のためのチェックthis answer。基本的には、payKeyExecutePayment操作を90日以内に実行するだけで、セカンダリパーティに支払いが送信されます。

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"; 

はあなたが遅れチェーンの支払いを使用している間、有効なPayPalアカウントを与える必要があることを忘れないでください。 他のセカンダリレシーバがお金を得るように、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 
    } 

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