我在Codeigniter中使用此merchant library并且我一直收到此错误"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);
然后支付pall show并且我登录。登录后我按下“购买按钮”,我收到错误消息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中工作时,一切似乎都运行良好。
如果您需要任何其他信息,请告诉我,我会提供。提前谢谢
答案 0 :(得分:1)
不再支持ci-merchant您应该使用Omnipay而不是https://github.com/thephpleague/omnipay/blob/master/README.md