php并行支付-交易手续费

Posted

技术标签:

【中文标题】php并行支付-交易手续费【英文标题】:php parallel payment - transaction fee 【发布时间】:2015-07-28 02:04:03 【问题描述】:

我怎样才能在下面的场景中实现这一点?取自 PayPal 网站。

收款人以并行支付方式支付费用

如果收款人同时支付费用,则每个收款人根据他们的评估支付一部分费用。以下示例显示了支付费用的接收方:

我的参数:

$bodyParams = array (   
                        "actionType"                        => "PAY",
                        "currencyCode"                      => "USD",
                        "receiverList.receiver(0).email"    => $receiver_p,
                        "receiverList.receiver(0).amount"   => $amount_primary,
                        //"receiverList.receiver(0).primary"=>true,
                        "receiverList.receiver(1).email"    => $receiver["paypal_id"][0],
                        "receiverList.receiver(1).amount"   => $amount[0],
                        "receiverList.receiver(2).email"    => $receiver["paypal_id"][1],
                        "receiverList.receiver(2).amount"   => $amount[1],                      
                            "receiverList.receiver(3).email"    => $receiver["paypal_id"][2],
                        "receiverList.receiver(3).amount"   => $amount[2],                  
                            "receiverList.receiver(4).email"    => $receiver["paypal_id"][3],
                        "receiverList.receiver(4).amount"   => $amount[3],                      
                        "returnUrl"                         => APP_WEB_ROOT.'/checkout.php?cmd=paid',
                        "cancelUrl"                         => APP_WEB_ROOT.'/checkout.php',
                        "requestEnvelope.errorLanguage"     => "en_US",
                        'FeesPayer' => 'EACHRECEIVER'
                    );

is 'FeesPayer' => 'EACHRECEIVER' 是足够的参数来传递以实现上述场景。我如何在沙盒中检查这个?

【问题讨论】:

【参考方案1】:

是的,EACHRECEIVER 就是您想要的。您可以通过创建多个沙盒帐户然后设置在这些接收者之间分配的付款来在沙盒中对此进行测试。当您在沙盒中完成结帐后,您可以登录到每个接收方帐户并查看他们支付的费用。

【讨论】:

以上是关于php并行支付-交易手续费的主要内容,如果未能解决你的问题,请参考以下文章

《区块链100问》第16集:比特币转账需要手续费

USDT-TRC20转账最低限制

php 处理微信账单

数据结构与算法之深入解析“买卖股票的最好时机含手续费”的求解思路与算法示例

EIP1559协议争议几何

EIP1559协议争议几何