【发布时间】:2016-04-30 22:16:40
【问题描述】:
我刚刚使用 RestAPI 和以下 SDK 示例完成了我的 paypal 付款。
首先(获取发送客户的贝宝网址) https://github.com/paypal/PayPal-PHP-SDK/blob/master/sample/payments/CreatePaymentUsingPayPal.php
最后(为授权客户返回我的服务器的 url) https://github.com/paypal/PayPal-PHP-SDK/blob/master/sample/payments/ExecutePayment.php
在最后的cmet中,是关于根据送货地址增加费用的信息,但我不知道如何获得。
// ### Optional Changes to Amount
// If you wish to update the amount that you wish to charge the customer,
// based on the shipping address or any other reason, you could
// do that by passing the transaction object with just `amount` field in it.
// Here is the example on how we changed the shipping to $1 more than before.
顺便说一下,我执行支付时只得到客户的地址,然后我得到支付的对象为$result->payer
$result = $payment->execute($execution, $apiContext);
在根据客户的地址执行检查运费之前如何获得付款人?
谢谢。
【问题讨论】: