首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何调试CI-Merchant Paypal Pro集成?

如何调试CI-Merchant Paypal Pro集成?
EN

Stack Overflow用户
提问于 2013-01-27 21:16:13
回答 1查看 858关注 0票数 1

我试图使用CI-Merchant库集成Paypal Pro (直接付款),但我迷路了。

我已经设置了一个英国沙箱(都与贝宝pro预先配置的卖方帐户,并与以下信息买方帐户($params阵列))

下面是我得到的响应(状态失败,没有消息)以及我使用的$params数组:

代码语言:javascript
复制
Merchant_response Object
(
    [_status:protected] => failed
    [_message:protected] => 
    [_reference:protected] => 
    [_data:protected] => 
    [_redirect_url:protected] => 
    [_redirect_method:protected] => GET
    [_redirect_message:protected] => 
    [_redirect_data:protected] => 
)
Array
(
    [card_type] => Visa
    [card_no] => 4269072658337891
    [first_name] => Buyer
    [last_name] => One
    [address1] => 1 Main Terrace
    [city] => Wolverhampton
    [region] => West Midlands
    [postcode] => W12 4LQ
    [amount] => 10
    [currency] => GBP
    [country] => UK
)

下面是代码:

代码语言:javascript
复制
$this->load->library('merchant');
$this->merchant->load('paypal_pro');

$settings = array(
  'username' => '***',
 'password' => '***',
 'signature' => '***',
 'test_mode' => true);

$this->merchant->initialize($settings);

//params array is set through a form submit.
$response = $this->merchant->purchase($params);
echo '<pre>';
print_r($response);
print_r($params);
exit;

请让我知道如何调试这个!

谢谢你,乔治

EN

回答 1

Stack Overflow用户

发布于 2014-09-09 14:44:04

在这段代码之后

代码语言:javascript
复制
$this->load->library('merchant');
$this->merchant->load('paypal_pro');

你需要初始化

代码语言:javascript
复制
$settings = $this->merchant->default_settings();

和宾果游戏

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/14547731

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档