1

我想設置延遲PayPal付款。我有一個關於這幾個問題:PayPal延遲鏈接付款中的付款轉賬

  1. 如何設置到期日爲轉賬金額的二次 接收器?

  2. 我怎樣才能從主接收器轉移數量到中學 接收器通過php?

我必須在輸入參數中設置所有的東西。所以請在參數方面幫助我。

我的輸入參數:

$actionType= "PAY_PRIMARY"; 
    $receiver = array();  
    $receiver[0]['receiverEmail'] = '[email protected]'; 
    $receiver[0]['receiverAmount'] =50; 
    $receiver[0]['receiverPrimary'] = true; 


    $receiver[1]['receiverEmail'] = '[email protected]'; 
    $receiver[1]['receiverAmount'] =30; 
    $receiver[1]['receiverPrimary'] = false; 

    $optional = array(); 
    $optional['memo'] = 'memo here'; 
    $optional['feesPayer'] = 'EACHRECEIVER'; 
    $cancel_url='http://www.mywebsite.com/cancel.php'; 
    $return_url='http://www.mywebsite.com/return.php'; 

通過把我試圖把開始日期和結束日期:

$var['startingDate']=date("Y-m-d H:i:s"); 
$var['endDate']= date('Y-m-d H:i:s', strtotime('+5 minutes', strtotime($var["startingDate"]))); 

//總持續時間爲5min轉移量,第二用戶。但它不起作用。

回答

0

首先,你需要生成批准前,你什麼時候產生預先批准鍵,您可以設置關鍵的時間框架:

<?php 
$startDate = date('Y-m-d', time()); 
$endDate = date('Y-m-d',strtotime('+364 days')); 

define('PREAPPROVAL_STARTDATE',$startDate); 
define('PREAPPROVAL_ENDDATE',$endDate); 
define('PREAPPROVAL_MAXNUMBEROFPAYMENTS','10000'); 
define('PREAPPROVAL_MAXAMOUNT','2000'); 

您正在使用正確的格式,更多的你可以從這裏下載github:https://github.com/paypal/adaptivepayments-sdk-php