I tried to integrate codeigniter authorize.net payment gateway by using the docs http://ci-merchant.org , I can successfully integrate the paypal but unfortunately i couldn't do authorize.net. The below code i have tried,but not working, how to do it ?
$this->load->library('merchant');
$this->merchant->load('authorize_net_sim');
$settings = array(
'api_login_id' => 'xxxx',
'transaction_key' => 'xxxx',
'test_mode' => true);
$this->merchant->initialize($settings);
$params = array(
'amount' => 10,
'currency' => 'USD',
'card_no' => '4111111111111111',
'exp_month' => '12',
'exp_year' => '14',
'csc' => 123,
'first_name' => 'Ashok',
'last_name' => 'KS',
'return_url' => 'http://www.ioss.in/success',
'cancel_url' => 'http://www.ioss.in/cancel'
);
$response = $this->merchant->purchase($params);
print_r($response)
returns:
Merchant_response Object (
[_status:protected] => failed
[_message:protected] =>
[_reference:protected] =>
[_data:protected] =>
[_redirect_url:protected] =>
[_redirect_method:protected] => GET
[_redirect_message:protected] =>
[_redirect_data:protected] =>
)
UPDATE 1 after change the code, its working fine...
$params = array(
'amount' => 10.00,
'currency' => 'USD',
'return_url' => 'http://www.ioss.in',
'cancel_url' => 'http://www.google.in');
print_r($response)
return?developer_mode
parameter totrue
instead oftest_mode
- I can't exactly remember the difference, it's something weird that Auth.net does, and there are two different ways of testing (either using a developer account, or as a test transaction on a live account).