我需要在我的应用程序中实现链式支付,我正在使用Symfony。
我发现JMSPaymentPaypalBundle被推荐用于付款,但在我深入研究之前想知道它是否支持链式付款。
有很多如何使用标准支付方式的示例,但找不到任何关于自适应支付支持的内容。
你可以试试这个,我已经PayPal自适应支付与此集成在一起。
"PayPal/adaptivepayments-sdk-php": "dev-master",
$receiverList = new ReceiverList($receiver);
$baseUrl = $this->generateUrl('sylius_homepage', array(), true);
$payRequest = new PayRequest(new RequestEnvelope("en_US"), "PAY",
$baseUrl, $offer->getProduct()->getCurrencyCode(), $receiverList,
$baseUrl."payment/success_payment");
$payRequest->feesPayer = "EACHRECEIVER";
$payRequest->memo = "DeepClass";
$payRequest->reverseAllParallelPaymentsOnError = "false";
//$payRequest->senderEmail = "milosmilojevicfacebook@gmail.com";
$service = new AdaptivePaymentsService();
try {
/* wrap API method calls on the service object with a try catch */
$response = $service->Pay($payRequest);
//var_dump($response);
$link = PAYPAL_REDIRECT_URL . '_ap-payment&paykey=' . $response->payKey;