1. Go to this page and download the library: Download mykholy/paymentgateway 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/ */
mykholy / paymentgateway example snippets
$paytm = XgPaymentGateway::paytm();
$paytm->setMerchantId('Digita57697814558795');
$paytm->setMerchantKey('dv0XtmsPYpewNag&');
$paytm->setMerchantWebsite('WEBSTAGING');
$paytm->setChannel('WEB');
$paytm->setIndustryType('Retail');
$paytm->setCurrency("EUR");
$paytm->setEnv(true); // this must be type of boolean , string will not work
$paytm->setExchangeRate(74); // if INR not set as currency
$response = $paytm->charge_customer([
'amount' => 10,
'title' => 'this is test title',
'description' => 'this is test description',
'ipn_url' => route('payment.paytm.ipn'), //get route
'order_id' => 56,
'track' => 'asdfasdfsdf',
'cancel_url' => route('payment.failed'),
'success_url' => route('payment.success'),
'email' => '[email protected]',
'name' => 'Ahmed Elkholy',
'payment_type' => 'order',
]);
return $response;
$paytm = XgPaymentGateway::paytm();
$paytm->setMerchantId('Digita57697814558795');
$paytm->setMerchantKey('dv0XtmsPYpewNag&');
$paytm->setMerchantWebsite('WEBSTAGING');
$paytm->setChannel('WEB');
$paytm->setIndustryType('Retail');
$paytm->setEnv(true); //env must set as boolean, string will not work
dd($paytm->ipn_response());
namespace App\Http\Middleware;
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
class VerifyCsrfToken extends Middleware
{
/**
* The URIs that should be excluded from CSRF verification.
*
* @var array
*/
protected $except = [
'cinetpay-ipn'
];
}
$cinetpay = XgPaymentGateway::cinetpay();
$cinetpay->setAppKey('LE9C12TNM5HAS');
$cinetpay->setSiteId('EAAAEOuLQObrVwJvCvoio3H13b8Ssqz1ighmTBKZvIENW9qxirHGHkqsGcPBC1uN');
$cinetpay->setCurrency("USD");
$cinetpay->setEnv(true);
$cinetpay->setExchangeRate(74); // if ['XOF', 'XAF', 'CDF', 'GNF', 'USD'] not set as currency
$response = $paytm->charge_customer([
'amount' => 10, // minimum 100 amount is onse;
$cinetpay = XgPaymentGateway::cinetpay();
$cinetpay->setAppKey('LE9C12TNM5HAS');
$cinetpay->setSiteId('EAAAEOuLQObrVwJvCvoio3H13b8Ssqz1ighmTBKZvIENW9qxirHGHkqsGcPBC1uN');
$cinetpay->setEnv(true); //env must set as boolean, string will not work
dd($cinetpay->ipn_response());
$paypal = XgPaymentGateway::paypal();
$paypal->setClientId('client_id'); // provide sandbox id if payment env set to true, otherwise provide live credentials
$paypal->setClientSecret('client_secret'); // provide sandbox id if payment env set to true, otherwise provide live credentials
$paypal->setAppId('app_id'); // provide sandbox id if payment env set to true, otherwise provide live credentials
$paypal->setCurrency("EUR");
$paypal->setEnv(true); //env must set as boolean, string will not work
$paypal->setExchangeRate(74); // if INR not set as currency
$response = $paypal->charge_customer([
'amount' => 10,
'title' => 'this is test title',
'description' => 'this is test description',
'ipn_url' => route('payment.instamojo.ipn'), //get route
'order_id' => 56,
'track' => 'asdfasdfsdf',
'cancel_url' => route('payment.failed'),
'success_url' => route('payment.success'),
'email' => '[email protected]',
'name' => 'Ahmed Elkholy',
'payment_type' => 'order',
]);
return $response;
$paypal = XgPaymentGateway::paypal();
$paypal->setClientId('AUP7AuZMwJbkee-2OmsSZrU-ID1XUJYE-YB-2JOrxeKV-q9ZJZYmsr-UoKuJn4kwyCv5ak26lrZyb-gb');
$paypal->setClientSecret('EEIxCuVnbgING9EyzcF2q-gpacLneVbngQtJ1mbx-42Lbq-6Uf6PEjgzF7HEayNsI4IFmB9_CZkECc3y');
$paypal->setEnv(true); //env must set as boolean, string will not work
$paypal->setAppId('641651651958');
dd($paypal->ipn_response());
$stripe = XgPaymentGateway::stripe();
$stripe->setSecretKey('sk_test_51GwS1SEmGOuJLTMs2vhSliTwAGkOt4fKJMBrxzTXeCJoLrRu8HFf4I0C5QuyE3l3bQHBJm3c0qFmeVjd0V9nFb6Z00VrWDJ9Uw');
$stripe->setPublicKey('pk_test_51GwS1SEmGOuJLTMsIeYKFtfAT3o3Fc6IOC7wyFmmxA2FIFQ3ZigJ2z1s4ZOweKQKlhaQr1blTH9y6HR2PMjtq1Rx00vqE8LO0x');
$stripe->setCurrency("EUR");
$stripe->setEnv(true); //env must set as boolean, string will not work
$stripe->setExchangeRate(74); // if INR not set as currency
$response = $stripe->charge_customer([
'amount' => 10,
'title' => 'this is test title',
'description' => 'this is test description',
'ipn_url' => route('payment.instamojo.ipn'), //get route
'order_id' => 56,
'track' => 'asdfasdfsdf',
'cancel_url' => route('payment.failed'),
'success_url' => route('payment.success'),
'email' => '[email protected]',
'name' => 'Ahmed Elkholy',
'payment_type' => 'order',
]);
return $response;
$stripe = XgPaymentGateway::stripe();
$stripe->setSecretKey('sk_test_51GwS1SEmGOuJLTMs2vhSliTwAGkOt4fKJMBrxzTXeCJoLrRu8HFf4I0C5QuyE3l3bQHBJm3c0qFmeVjd0V9nFb6Z00VrWDJ9Uw');
$stripe->setPublicKey('pk_test_51GwS1SEmGOuJLTMsIeYKFtfAT3o3Fc6IOC7wyFmmxA2FIFQ3ZigJ2z1s4ZOweKQKlhaQr1blTH9y6HR2PMjtq1Rx00vqE8LO0x');
$stripe->setEnv(true); //env must set as boolean, string will not work
dd($stripe->ipn_response());
$midtrans = XgPaymentGateway::midtrans();
$midtrans->setClientKey('SB-Mid-client-iDuy-jKdZHkLjL_I');
$midtrans->setServerKey('SB-Mid-server-9z5jztsHyYxEdSs7DgkNg2on');
$midtrans->setCurrency("IDR");
$midtrans->setEnv(true); //true mean sandbox mode , false means live mode
$midtrans->setExchangeRate(74); // if IDR not set as currency
$response = $midtrans->charge_customer([
'amount' => 10,
'title' => 'this is test title',
'description' => 'this is test description',
'ipn_url' => route('payment.instamojo.ipn'), //get route
'order_id' => 56,
'track' => 'asdfasdfsdf',
'cancel_url' => route('payment.failed'),
'success_url' => route('payment.success'),
'email' => '[email protected]',
'name' => 'Ahmed Elkholy',
'payment_type' => 'order',
]);
return $response;
$midtrans->setClientKey('client_key');
$midtrans->setServerKey('server_key');
$midtrans->setEnv(true); //true mean sandbox mode , false means live mode
dd($midtrans->ipn_response());
$razorpay = XgPaymentGateway::razorpay();
$razorpay->setApiKey('rzp_test_SXk7LZqsBPpAkj');
$razorpay->setApiSecret('Nenvq0aYArtYBDOGgmMH7JNv');
$razorpay->setCurrency("EUR");
$razorpay->setEnv(true); //env must set as boolean, string will not work
$razorpay->setExchangeRate(74); // if INR not set as currency
$response = $razorpay->charge_customer([
'amount' => 10,
'title' => 'this is test title',
'description' => 'this is test description',
'ipn_url' => route('payment.instamojo.ipn'), //get route
'order_id' => 56,
'track' => 'asdfasdfsdf',
'cancel_url' => route('payment.failed'),
'success_url' => route('payment.success'),
'email' => '[email protected]',
'name' => 'Ahmed Elkholy',
'payment_type' => 'order',
]);
return $response;
$razorpay = XgPaymentGateway::razorpay();
$razorpay->setApiKey('rzp_test_SXk7LZqsBPpAkj');
$razorpay->setApiSecret('Nenvq0aYArtYBDOGgmMH7JNv');
$razorpay->setEnv(true); //env must set as boolean, string will not work
dd($razorpay->ipn_response());
$mollie = XgPaymentGateway::mollie();
$mollie->setApiKey('api_key');
$mollie->setCurrency("EUR");
$mollie->setEnv(true); //env must set as boolean, string will not work
$mollie->setExchangeRate(74); // if INR not set as currency
$response = $mollie->charge_customer([
'amount' => 10,
'title' => 'this is test title',
'description' => 'this is test description',
'ipn_url' => route('payment.mollie.ipn'), //get route
'order_id' => 56,
'track' => 'asdfasdfsdf',
'cancel_url' => route('payment.failed'),
'success_url' => route('payment.success'),
'email' => '[email protected]',
'name' => 'Ahmed Elkholy',
'payment_type' => 'order',
]);
return $response;
$mollie = XgPaymentGateway::mollie();
$mollie->setApiKey('api_key');
$mollie->setCurrency("EUR");
$mollie->setEnv(true); //env must set as boolean, string will not work
$mollie->setExchangeRate(74); // if INR not set as currency
dd($mollie->ipn_response());
$flutterwave = XgPaymentGateway::flutterwave();
$flutterwave->setPublicKey('FLWPUBK_TEST-86cce2ec43c63e09a517290a8347fcab-X');
$flutterwave->setSecretKey('FLWSECK_TEST-d37a42d8917db84f1b2f47c125252d0a-X');
$flutterwave->setCurrency("USD");
$flutterwave->setEnv(true); //env must set as boolean, string will not work
$flutterwave->setExchangeRate(74); // if NGN not set as currency
$response = $flutterwave->charge_customer([
'amount' => 10,
'title' => 'this is test title',
'description' => 'this is test description',
'ipn_url' => route('payment.instamojo.ipn'), //get route
'order_id' => 56,
'track' => 'asdfasdfsdf',
'cancel_url' => route('payment.failed'),
'success_url' => route('payment.success'),
'email' => '[email protected]',
'name' => 'Ahmed Elkholy',
'payment_type' => 'order',
]);
return $response;
$flutterwave = XgPaymentGateway::flutterwave();
$flutterwave->setPublicKey('FLWPUBK_TEST-86cce2ec43c63e09a517290a8347fcab-X');
$flutterwave->setSecretKey('FLWSECK_TEST-d37a42d8917db84f1b2f47c125252d0a-X');
$flutterwave->setCurrency("USD");
$flutterwave->setEnv(true); //env must set as boolean, string will not work
dd($flutterwave->ipn_response());
$paystack = XgPaymentGateway::paystack();
$paystack->setPublicKey('pk_test_a7e58f850adce9a73750e61668d4f492f67abcd9');
$paystack->setSecretKey('sk_test_2a458001d806c878aba51955b962b3c8ed78f04b');
$paystack->setMerchantEmail('[email protected]');
$paystack->setCurrency("EUR");
$paystack->setEnv(true); //env must set as boolean, string will not work
$paystack->setExchangeRate(74); // if NGN not set as currency
$response = $paystack->charge_customer([
'amount' => 10,
'title' => 'this is test title',
'description' => 'this is test description',
'ipn_url' => route('payment.instamojo.ipn'), //get route
'order_id' => 56,
'track' => 'asdfasdfsdf',
'cancel_url' => route('payment.failed'),
'success_url' => route('payment.success'),
'email' => '[email protected]',
'name' => 'Ahmed Elkholy',
'payment_type' => 'order',
]);
return $response;
$paystack = XgPaymentGateway::paystack();
$paystack->setPublicKey('pk_test_a7e58f850adce9a73750e61668d4f492f67abcd9');
$paystack->setSecretKey('sk_test_2a458001d806c878aba51955b962b3c8ed78f04b');
$paystack->setMerchantEmail('[email protected]');
$paystack->setEnv(true); //env must set as boolean, string will not work
dd($paystack->ipn_response());
namespace App\Http\Middleware;
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
class VerifyCsrfToken extends Middleware
{
/**
* The URIs that should be excluded from CSRF verification.
*
* @var array
*/
protected $except = [
'payfast-ipn'
];
}
$payfast = XgPaymentGateway::payfast();
$payfast->setMerchantId('10024000');
$payfast->setMerchantKey('77jcu5v4ufdod');
$payfast->setPassphrase('testpayfastsohan');
$payfast->setCurrency("ZAR");
$payfast->setEnv(true); //env must set as boolean, string will not work
$payfast->setExchangeRate(74); // if INR not set as currency
$response = $payfast->charge_customer([
'amount' => 10,
'title' => 'this is test title',
'description' => 'this is test description',
'ipn_url' => route('payment.instamojo.ipn'), //get route
'order_id' => 56,
'track' => 'asdfasdfsdf',
'cancel_url' => route('payment.failed'),
'success_url' => route('payment.success'),
'email' => '[email protected]',
'name' => 'Ahmed Elkholy',
'payment_type' => 'order',
]);
return $response;
$payfast = XgPaymentGateway::payfast();
$payfast->setMerchantId('10024000');
$payfast->setMerchantKey('77jcu5v4ufdod');
$payfast->setPassphrase('testpayfastsohan');
$payfast->setCurrency("ZAR");
$payfast->setEnv(true); //env must set as boolean, string will not work
dd($payfast->ipn_response());
$cashfree = XgPaymentGateway::cashfree();
$cashfree->setAppId('app_id');
$cashfree->setSecretKey('secret_key');
$cashfree->setCurrency("USD");
$cashfree->setEnv(true); //true means sandbox, false means live , //env must set as boolean, string will not work
$cashfree->setExchangeRate(74); // if INR not set as currency
$response = $cashfree->charge_customer([
'amount' => 10,
'title' => 'this is test title',
'description' => 'this is test description',
'ipn_url' => route('payment.cashfree.ipn'),
'order_id' => 56,
'track' => 'asdfasdfsdf',
'cancel_url' => route('payment.failed'),
'success_url' => route('payment.success'),
'email' => '[email protected]',
'name' => 'Ahmed Elkholy',
'payment_type' => 'order',
]);
return $response;
$cashfree = XgPaymentGateway::cashfree();
$cashfree->setAppId('app_id');
$cashfree->setSecretKey('secret_key');
$cashfree->setEnv(true); //true means sandbox, false means live //env must set as boolean, string will not work
dd($cashfree->ipn_response());
$instamojo = XgPaymentGateway::instamojo();
$instamojo->setClientId('client_id');
$instamojo->setSecretKey('secret_key');
$instamojo->setCurrency("INR");
$instamojo->setEnv(true); //true mean sandbox mode , false means live mode //env must set as boolean, string will not work
$instamojo->setExchangeRate(74); // if INR not set as currency
$response = $instamojo->charge_customer([
'amount' => 10,
'title' => 'this is test title',
'description' => 'this is test description',
'ipn_url' => route('payment.instamojo.ipn'), //get route
'order_id' => 56,
'track' => 'asdfasdfsdf',
'cancel_url' => route('payment.failed'),
'success_url' => route('payment.success'),
'email' => '[email protected]',
'name' => 'Ahmed Elkholy',
'payment_type' => 'order',
]);
return $response;
$instamojo = XgPaymentGateway::instamojo();
$instamojo->setClientId('client_id');
$instamojo->setSecretKey('secret_key');
$instamojo->setEnv(true); //env must set as boolean, string will not work
dd($instamojo->ipn_response());
$mercadopago = XgPaymentGateway::mercadopago();
$mercadopago->setClientId('client_id');
$mercadopago->setClientSecret('client_secret');
$mercadopago->setCurrency("USD");
$mercadopago->setExchangeRate(82); // if BRL not set as currency, you must have to provide exchange rate for it
$mercadopago->setEnv(true); ////true mean sandbox mode , false means live mode
$response = $mercadopago->charge_customer([
'amount' => 10,
'title' => 'this is test title',
'description' => 'this is test description',
@@ -804,11 +804,11 @@ return $response;
#### ipn_response method example
Route::post('/zitopay-ipn', [\App\Http\Controllers\PaymentLogController::class,'zitopay_ipn'] )->name('payment.zitopay.ipn'); //need to exclude from csrf token varification
namespace App\Http\Middleware;
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
class VerifyCsrfToken extends Middleware
{
/**
* The URIs that should be excluded from CSRF verification.
*
* @var array
*/
protected $except = [
'zitopay-ipn'
];
}
$zitopay = XgPaymentGateway::zitopay();
$zitopay->setUsername('dvrobin4');
$zitopay->setCurrency("USD");
$zitopay->setEnv(true);
$zitopay->setExchangeRate(50); // if INR not set as currency
$args = [
'amount' => 250,
'title' => 'this is test title',
'description' => 'description',
'ipn_url' => route('payment.post.ipn'),
'order_id' => 56,
'track' => 'asdfasdfsdf',
'cancel_url' => route('payment.failed'),
'success_url' => route('payment.success'),
'email' => '[email protected]',
'name' => 'sharifur',
'payment_type' => 'order',
];
$response = $zitopay->charge_customer($args);
return $response;
$zitopay = XgPaymentGateway::zitopay();
$zitopay->setUsername('dvrobin4');
$zitopay->setCurrency("USD");
$zitopay->setEnv(true);
$zitopay->setExchangeRate(50); // if INR not set as currency
dd($zitopay->ipn_response());
>> Toyyibpay supported currency list ["MYR"]
Route::post('/toyyibpay-ipn', [\App\Http\Controllers\PaymentLogController::class,'toyyibpay_ipn'] )->name('payment.toyyibpay.ipn'); //need to exclude from csrf token varification
namespace App\Http\Middleware;
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
class VerifyCsrfToken extends Middleware
{
/**
* The URIs that should be excluded from CSRF verification.
*
* @var array
*/
protected $except = [
'toyyibpay-ipn'
];
}
>> Pagali supported currency list ['MYR','USD','EUR','CVE']
Route::post('/pagali-ipn', [\App\Http\Controllers\PaymentLogController::class,'pagali_ipn'] )->name('payment.pagali.ipn'); //need to exclude from csrf token varification
namespace App\Http\Middleware;
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
class VerifyCsrfToken extends Middleware
{
/**
* The URIs that should be excluded from CSRF verification.
*
* @var array
*/
protected $except = [
'pagali-ipn'
];
}
$pagali = XgPaymentGateway::pagalipay();
$pagali->setPageId('');
$pagali->setEntityId('');
$pagali->setCurrency("MYR");
$pagali->setEnv(true); // this must be type of boolean , string will not work
$pagali->setExchangeRate(74); // if INR not set as currency
$response = $pagali->charge_customer([
'amount' => 10,
'title' => 'this is test title',
'description' => 'this is test description',
'ipn_url' => route('post.ipn'), //get route
'order_id' => 56,
'track' => 'asdfasdfsdf',
'cancel_url' => route('payment.failed'),
'success_url' => route('payment.success'),
'email' => '[email protected]',
'name' => 'Ahmed Elkholy',
'payment_type' => 'order',
]);
$pagali = XgPaymentGateway::pagalipay();
$pagali->setPageId('');
$pagali->setEntityId('');
$pagali->setCurrency("MYR");
$pagali->setEnv(true); // this must be type of boolean , string will not work
dd($pagali->ipn_response());
Route::get('/authorize-ipn', [\App\Http\Controllers\PaymentLogController::class,'authorize_ipn'] )->name('payment.authorize.ipn'); //need to exclude from csrf token varification
$authorize = XgPaymentGateway::authorizenet();
$authorize->setMerchantLoginId('2e8yjNL89kV2');
$authorize->setMerchantTransactionId('65968Gb3DU2ntX2v');
$authorize->setCurrency("USD");
$authorize->setEnv(true); // this must be type of boolean , string will not work
$authorize->setExchangeRate(74); // if INR not set as currency
$response = $authorize->charge_customer([
'amount' => 10,
'title' => 'this is test title',
'description' => 'this is test description',
'ipn_url' => route('get.ipn'), //get route
'order_id' => 56,
'track' => 'asdfasdfsdf',
'cancel_url' => route('payment.failed'),
'success_url' => route('payment.success'),
'email' => '[email protected]',
'name' => 'Ahmed Elkholy',
'payment_type' => 'order',
]);
$authorizenet = XgPaymentGateway::authorizenet();
$authorizenet->setMerchantLoginId('2e8yjNL89kV2');
$authorizenet->setMerchantTransactionId('65968Gb3DU2ntX2v');
$authorizenet->setEnv(true); // this must be type of boolean , string will not work
dd($authorizenet->ipn_response());
>> it support all currency
Route::post('/siteways-ipn', [\App\Http\Controllers\PaymentLogController::class,'siteways_ipn'] )->name('payment.siteways.ipn'); //need to exclude from csrf token verification
namespace App\Http\Middleware;
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
class VerifyCsrfToken extends Middleware
{
/**
* The URIs that should be excluded from CSRF verification.
*
* @var array
*/
protected $except = [
'siteways-ipn'
];
}
$sitesway = XgPaymentGateway::sitesway();
$sitesway->setBrandId("-enter-brand-id-");
$sitesway->setApiKey("--enter-api-key--");
$sitesway->setCurrency("USD");
$sitesway->setEnv(true); // this must be type of boolean , string will not work
$response = $sitesway->charge_customer([
'amount' => 10,
'title' => 'this is test title',
'description' => 'this is test description',
'ipn_url' => route('post.siteways.ipn'), //post route
'order_id' => 56,
'track' => 'asdfasdfsdf',
'cancel_url' => route('payment.failed'),
'success_url' => route('payment.success'),
'email' => '[email protected]',
'name' => 'Ahmed Elkholy',
'payment_type' => 'order',
]);
return $response;
$wipay = XgPaymentGateway::wipay();
$wipay->setAccountNumber("1234567890");
$wipay->setAccountApi("123");
$wipay->setFeeStructure("customer_pay");
$wipay->setCountryCode("TT");
$wipay->setCurrency("USD");
$wipay->setEnv(true); // this must be type of boolean , string will not work
$wipay->setExchangeRate(74); // if INR not set as currency
$response = $wipay->charge_customer([
'amount' => 10.5,
'title' => 'this is test title',
'description' => 'this is test description',
'ipn_url' => route('get.ipn'), //post route
'order_id' => 56,
'track' => 'asdfasdfsdf',
'cancel_url' => route('payment.failed'),
'success_url' => route('payment.success'),
'email' => '[email protected]',
'name' => 'sharifur rahman',
'payment_type' => 'order',
]);
return $response;
$wipay = XgPaymentGateway::wipay();
$wipay->setAccountNumber("1234567890");
$wipay->setAccountApi("123");
$wipay->setFeeStructure("customer_pay");
$wipay->setCountryCode("TT");
$wipay->setCurrency("USD");
$wipay->setEnv(true); // this must be type of boolean , string will not work
$wipay->setExchangeRate(74); // if INR not set as currency
$payment_data = $wipay->ipn_response();
dd($payment_data);
>> TransactionCloud supported currency list ['USD','EUR','PLN','INR','CAD','CNY','AUD','JPY','NOK','GBP','CHF','SGD','BRL','RUB','BGN','CZK','DKK','HUF','RON','SEK','GEL']
$transactionclud = XgPaymentGateway::transactionclud();
$transactionclud->setApiLogin("API_QWGW6TO2N1I5A2L40W");
$transactionclud->setApiPassword("EPKUZU6L7HR8BU5WHH");
$transactionclud->setProductID("TC-PR_APo7g7R");
$transactionclud->setCurrency("USD");
$transactionclud->setEnv(true); // this must be type of boolean , string will not work
$transactionclud->setExchangeRate(74); // if INR not set as currency
$response = $transactionclud->charge_customer([
'amount' => 10.5,
'title' => 'this is test title',
'description' => 'this is test description',
'ipn_url' => route('get.ipn'), //post route
'order_id' => 56,
'track' => 'asdfasdfsdf',
'cancel_url' => route('payment.failed'),
'success_url' => route('payment.success'),
'email' => '[email protected]',
'name' => 'sharifur rahman',
'payment_type' => 'order',
]);
return $response;
$transactionclud = XgPaymentGateway::transactionclud();
$transactionclud->setApiLogin("API_QWGW6TO2N1I5A2L40W");
$transactionclud->setApiPassword("EPKUZU6L7HR8BU5WHH");
$transactionclud->setProductID("TC-PR_APo7g7R");
$transactionclud->setEnv(true); // this must be type of boolean , string will not work
$transactionclud->ipn_response();
namespace App\Http\Middleware;
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
class VerifyCsrfToken extends Middleware
{
/**
* The URIs that should be excluded from CSRF verification.
*
* @var array
*/
protected $except = [
'kineticpay-ipn'
];
}
$kineticpay = XgPaymentGateway::kineticpay();
$kineticpay->setMerchantKey("ede1c5e9f81c9d12bf418629f56a7870");
$kineticpay->setBank("ABMB0212");
$kineticpay->setCurrency("MYR");
$kineticpay->setEnv(true); // this must be type of boolean , string will not work
$kineticpay->setExchangeRate(74); // if INR not set as currency
$response = $kineticpay->charge_customer([
'amount' => 10.5,
'title' => 'this is test title',
'description' => 'this is test description',
'ipn_url' => route('post.ipn'), //post route
'order_id' => 56,
'track' => 'asdfasdfsdf',
'cancel_url' => route('payment.failed'),
'success_url' => route('payment.success'),
'email' => '[email protected]',
'name' => 'sharifur rahman',
'payment_type' => 'order',
]);
return $response;
$kineticpay = XgPaymentGateway::kineticpay();
$kineticpay->setMerchantKey("ede1c5e9f81c9d12bf418629f56a7870");
$kineticpay->setCurrency("MYR");
$kineticpay->setEnv(true); // this must be type of boolean , string will not work
$kineticpay->setExchangeRate(74); // if INR not set as currency
$payment_data = $kineticpay->ipn_response();
namespace App\Http\Middleware;
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
class VerifyCsrfToken extends Middleware
{
/**
* The URIs that should be excluded from CSRF verification.
*
* @var array
*/
protected $except = [
'salt-ipn'
];
}
namespace App\Http\Middleware;
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
class VerifyCsrfToken extends Middleware
{
/**
* The URIs that should be excluded from CSRF verification.
*
* @var array
*/
protected $except = [
'iyzipay-ipn'
];
}