Search code examples
phpcodeigniterpaypalci-merchant

Keep getting error message "Currency is not supported" with Merchant and Codeigniter


I'm using this merchant library with Codeigniter and i'm keep getting this error "Currency is not supported"

This is my controller code

$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);

Then pay pall shows and i log in. After login i press the "purchase button" and i get error message Currency is not supported

My default settings are

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'))
    );
}

So what am i doing wrong? I also tried EURO currency but same message is shown. When i was working in test_mode everything seems to work fine.

If you need any additional information's please let me know and i will provide. Thank you in advance


Solution

  • ci-merchant is no longer supported you should use Omnipay instead https://github.com/thephpleague/omnipay/blob/master/README.md