Ingenico ePayments driver (e-Commerce) for the Omnipay PHP payment processing library
Omnipay 3.x is a framework agnostic, multi-gateway payment processing library for PHP 5.6+
Omnipay is installed via Composer.
composer require deniztezcan/omnipay-ingenico-epayments:^1
use Omnipay\Omnipay;
$gateway = Omnipay::create('IngenicoePayments');
$gateway->setMode('test');
$gateway->setPSPID('PSID');
$gateway->setLanguage('nl_NL');
$gateway->setShaIn('SHAIN');
$gateway->setShaOut('SHAOUT');
$gateway->setHashing('SHA-1');
$request = $gateway->purchase([
'amount' => 9999,
'currency' => 'EUR',
'returnUrl' => 'https://example.com/tmp/done',
'cancelUrl' => 'https://example.com/tmp/cancel',
'transactionId' => '1111111',
'description' => 'DESCRIPTION',
'paymentMethod' => 'PAYMENTMETHOD',
'card' => [
'firstName' => 'firstName',
'lastName' => 'lastName',
'billingAddress1' => 'billingAddress1',
'postcode' => 'postcode',
'city' => 'city',
'phone' => 'phone',
'email' => 'email'
],
'customfields' => [
'XX' => 'XX',
]
]);
$response = $request->send();
$response->redirect();
You will be transfered to the e-Commerce page of Ingenico.
use Omnipay\Omnipay;
$gateway = Omnipay::create('IngenicoePayments');
$gateway->setMode('test');
$gateway->setPSPID('PSID');
$gateway->setLanguage('nl_NL');
$gateway->setShaIn('SHAIN');
$gateway->setShaOut('SHAOUT');
$request = $gateway->completePurchase(['transaction' => $_GET]);
$response = $request->send();
if ($response->isSuccessful()) {
echo $response->getTransactionId();
}else{
echo $response->getError();
}
If you are having general issues with Omnipay, we suggest posting on Stack Overflow. Be sure to add the omnipay tag so it can be easily found.
If you believe you have found a bug, please report it using the GitHub issue tracker, or better yet, fork the library and submit a pull request.