【问题标题】:getting ci-merchant working please?请让 ci-merchant 工作?
【发布时间】:2013-06-22 12:27:57
【问题描述】:

我正在尝试将 CI-Merchant 库用于 codeigniter。按照建议,我已经通过火花安装了它。 ci-merchant.org 网站上的文档示例没有具体显示正在加载的 spark,因此我不确定我是否正确使用了系统。任何人都可以查看下面的代码,看看他们是否能发现发生了什么。如果有帮助,我希望使用“sagepay 服务器”作为我的商家。

问候和感谢

    $this->load->spark('ci-merchant-2.1.1');
    $this->load->library('merchant');
    $this->merchant->load('sagepay_servber');

    $settings = array(
        'vendor' => 'fluidbrandinglt',
        'test_mode' => TRUE,
        'simulator_mode' => FALSE
    );

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

    $params = array(
        'amount' => 100.00,
        'currency' => 'USD',
        'return_url' => 'https://www.example.com/checkout/payment_return/123',
        'cancel_url' => 'https://www.example.com/checkout'
    );

    $response = $this->merchant->purchase($params);

当我运行上面的代码时,我只是得到一个空白屏幕,对正在发生的事情的反馈为零。我知道我有一个 Sagepay 提供给我的加密密码,但我还是看不到它的配置位置,或者即使它是否相关。

【问题讨论】:

  • 黑屏通常意味着 PHP 错误,您是否启用了 php 错误?

标签: php codeigniter ci-merchant


【解决方案1】:

你应该改变

$this->merchant->load('sagepay_servber');

与。

$this->merchant->load('sagepay_server');

您的加载语句中有一个“b”。小细节,但确实让人头疼。

【讨论】:

  • 如果这能解决您的问题,请将其标记为答案,如果没有,那么我可以尝试进一步帮助您。
猜你喜欢
  • 2013-08-28
  • 2012-11-30
  • 2013-09-01
  • 1970-01-01
  • 2015-03-06
  • 1970-01-01
  • 2012-11-17
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多