forked from bcit-ci/CodeIgniter
-
Notifications
You must be signed in to change notification settings - Fork 4
Authorize.net AIM Integration
World Wide Web Server edited this page Jul 4, 2012
·
5 revisions
Just add the following config to your application/config/config.php file [code] $config['at_login'] = "xxxxxxxxxx"; //your login $config['at_password'] = "xxxxxxxxxxxx"; //your transaction key $config['at_test'] = 1; //Set to 0 for live transactions $config['at_debug'] = 1; //Set to 0 for live transactions $config['at_site'] = 'https://test.authorize.net/gateway/transact.dll'; //comment for live trans //$config['at_site'] = 'https://secure.authorize.net/gateway/transact.dll'; //uncomment for live trans [/code]
Call it from you controller or wherever like this:
[code] public function validate() { $this->load->library('my_payment');
$params->cc = '4242424242424242';
$params->exp = '02/10';
$params->desc = 'Some Product Here';
$params->amount = '2222.34';
$params->firstName = 'Jowy';
$params->lastName = 'Hurtado';
$params->address = '1234 5th St.';
$params->city = 'YourTown';
$params->state = 'NM';
$params->zip = '81225';
$params->customerMonth = '03';
$params->customerDay = '21';
$params->customerYear = '06';
$params->specialCode = '000';
$result = $this->my_payment->authorize($params);
print_r($result);
} [/code]