我想设置PayPal的延迟链式支付。我对此几乎没有问题:
如何设置转入金额的到期日期 接收器
如何将金额从主接收器转移到辅助接收器 接收者通过php?
我必须在输入参数中设置的所有内容。所以请在参数方面帮助我。
我的输入参数:
$actionType= "PAY_PRIMARY";
$receiver = array();
$receiver[0]['receiverEmail'] = 'admin@gmail.com';
$receiver[0]['receiverAmount'] =50;
$receiver[0]['receiverPrimary'] = true;
$receiver[1]['receiverEmail'] = 'abc007@gmail.com';
$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"])));
//将金额转移到次要用户的总持续时间为5分钟。但它不起作用。
答案 0 :(得分: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