1. Go to this page and download the library: Download ptuchik/omnipay-idram library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ptuchik / omnipay-idram example snippets
use Omnipay\Omnipay;
$gateway = Omnipay::create('Idram');
$gateway->setAccountId(env('ACCOUNT_ID'));
$gateway->setSecretKey(env('SECRET_KEY'));
$purchaseData = $gateway->purchase(); // Call purchase() to get PurchaseRequest instance
$purchaseData->setLanguage(\App::getLocale()); // Language
$purchaseData->setAmount(10); // Amount to charge
$purchaseData->setTransactionId(XXXX); // Transaction ID from your system
$gateway = Omnipay::create('Idram');
$gateway->setAccountId(env('ACCOUNT_ID'));
$gateway->setSecretKey(env('SECRET_KEY'));
$purchase = $gateway->completePurchase()->send();
// Do the rest with $purchase and response with 'OK'
if ($purchase->isSuccessful()) {
// Your logic
}
return new Response('OK');
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.