This library provides convenient wrapper functions for Helcim Commerce REST API. The API is documented here
PHP 5.4.0
include('./Helcim.php');
$accountId = (int)"YOUR-ACCOUNT-ID";
$apiToken = "YOUR-API-TOKEN";
$helcim = new Helcim($accountId, $apiToken, array(
'testMode' => true,
'debug' => true
));
print_r($helcim->misc->testConnection()->getData());
include('./Helcim.php');
$accountId = (int)"YOUR-ACCOUNT-ID";
$apiToken = "YOUR-API-TOKEN";
$helcim = new Helcim($accountId, $apiToken, array(
'testMode' => true,
'debug' => true
));
$amount = 100;
$cardNumber = 5454545454545454;
$cardExpiry = 0125;
$cardCVV = 100;
print_r($helcim->payments->card->purchase($amount, $cardNumber, $cardExpiry, $cardCVV)->getData());
include('./Helcim.php');
$accountId = (int)"YOUR-ACCOUNT-ID";
$apiToken = "YOUR-API-TOKEN";
$helcim = new Helcim($accountId, $apiToken, array(
'testMode' => true,
'debug' => true
));
$customerCode = 'CST1001';
print_r($helcim->customers->fetchCustomer($customerCode)->getData());
include('./Helcim.php');
$accountId = (int)"YOUR-ACCOUNT-ID";
$apiToken = "YOUR-API-TOKEN";
$helcim = new Helcim($accountId, $apiToken, array(
'testMode' => true,
'debug' => true
));
$orderNumber = 'INV1001';
print_r($helcim->customers->viewOrder($orderNumber)->getData());
Helcim did a amazing job documenting their api. You can find all the documentation from the link I provided above. I also provided references to all the actions/transactionTypes in the comments of the code.