Part of the EllisLab Network
x
 
Create New Page
 View Previous Changes    ( Last updated by Jamie Rumbelow )

Authorize.net AIM Integration

Category:Libraries -> External

Download the following file:
File:My payment.php.zip

Then unzip/add to application/libraries

Just add the following config to your application/config/config.php file

$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 

Call it from you controller or wherever like this:

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

File located here:
File:My payment.php.zip

Categories: