【问题标题】:Keep getting error message "Currency is not supported" with Merchant and CodeigniterMerchant 和 Codeigniter 不断收到错误消息“不支持货币”
【发布时间】:2016-08-21 19:42:03
【问题描述】:

我正在将这个 merchant library 与 Codeigniter 一起使用,但我一直收到此错误 "Currency is not supported"

这是我的控制器代码

$this->load->library('merchant');
$this->merchant->load('paypal_express');
$settings = $this->merchant->default_settings();
$this->merchant->initialize($settings);
//var_dump($sumo) outputs float(8.9)
$params = array(
    'currency' => 'EUR',
    'desc' => "my shop",
    'amount' => $sumo,
    'return_url' => 'http://myapp.com/store/notify_payment?inter_num='.$inter_num,
    'cancel_url' => 'http://myapp.com/store/cancel_payment'
);
$this->merchant->purchase($params);

然后支付宝显示并登录。登录后我按“购买按钮”并收到错误消息Currency is not supported

我的默认设置是

public function default_settings()
{
    return array(
        'username' => 'myshop.info_api1.myshop.com',
        'password' => 'PASSWORD',
        'signature' => 'SIGNATURE',
        'test_mode' => FALSE,
        'solution_type' => array('type' => 'select', 'default' => 'Sole', 'options' => array(
            'Sole' => 'merchant_solution_type_sole',
            'Mark' => 'merchant_solution_type_mark')),
        'landing_page' => array('type' => 'select', 'default' => 'Billing', 'options' => array(
            'Billing'   => 'merchant_landing_page_billing',
            'Login'     => 'merchant_landing_page_login'))
    );
}

那么我做错了什么?我也尝试了欧元货币,但显示了相同的信息。当我在 test_mode 下工作时,一切似乎都正常。

如果您需要任何其他信息,请告诉我,我会提供。提前谢谢你

【问题讨论】:

    标签: php codeigniter paypal ci-merchant


    【解决方案1】:

    ci-merchant 不再受支持,您应该改用 Omnipay https://github.com/thephpleague/omnipay/blob/master/README.md

    【讨论】:

      猜你喜欢
      • 2014-07-30
      • 1970-01-01
      • 1970-01-01
      • 2012-07-20
      • 1970-01-01
      • 2014-04-12
      • 1970-01-01
      • 2021-01-03
      • 1970-01-01
      相关资源
      最近更新 更多