本文介绍了在ci-merchant库代码中接收更多的响应数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何在ci商家代码指示器库中收到更多回应资料?

How can I receive more response data in the ci-merchant codeigniter library ?

我使用Paypal快速结帐付款方式。

I am using the Paypal Express checkout payment method.

我传递以下参数:

现在只得到以下回应

如何获取PayPal ID,送货地址,项目名称等PayPal在DoExpressCheckoutPayment响应中返回的数据?

How can I get the data like paypal id, shipping address, item name and other stuff that paypal returns in the DoExpressCheckoutPayment response ?

推荐答案

这不是一个答案,但你应该尝试使用。 Omnipay基本上是CI-Merchant V2(我是这两个图书馆的作者)。

This isn't exactly an answer to your question, but you should try using Omnipay instead. Omnipay is basically CI-Merchant V2 (I'm the author of both libraries).

Omnipay可让您直接访问原始回复。例如。你将会这样做:

Omnipay lets you have direct access to the raw response. E.g. you would do something like this:

$params = array( 'amount' => 1000, 'currency' => 'USD', 'returnUrl' => 'my return url', 'cancelUrl' => 'my cancel url' );
$response = $gateway->completePurchase($params)->send();

$reference = $response->getTransactionReference(); // paypal transaction id
$data = $response->getData(); // this is the raw response object

这篇关于在ci-merchant库代码中接收更多的响应数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-24 13:50
查看更多