1

我正在将此商家库与 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 工作时,一切似乎都运行良好。

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

4

1 回答 1

1

不再支持 ci-merchant 你应该使用 Omnipay 代替https://github.com/thephpleague/omnipay/blob/master/README.md

于 2016-04-27T14:13:10.540 回答