Download the PHP package mykholy/paymentgateway without Composer
On this page you can find all versions of the php package mykholy/paymentgateway. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mykholy/paymentgateway
More information about mykholy/paymentgateway
Files in mykholy/paymentgateway
Package paymentgateway
Short Description a laravel package to manage multiple payment gateway
License MIT
Homepage https://github.com/mykholy/paymentgateway
Informations about the package paymentgateway
paymentgateway
General information about this package.
Installation For laravel 10x,9x
Configure Your Composer.json file to install this package
add below code to your composer.json
file
run below command to install this package from your command promt or terminal `
if this payment package asked you for username and password here is it or generate your own token.
Information about the installation procedure for this package. it's recommended to everyone to use the 4x version and upgrade laravel version to 10x
use Version 4.1.0 for laravel 10x, use Version 3.x for laravel 9x
Supported Payment Gateway List
- Paytm
- PayPal
- Stripe
- Midtrans
- Razorpay
- Mollie
- FlutterwaveRave
- Paystack
- Payfast
- Cashfree
- Instamojo
- Mercado pago
- Squareup
- Cinetpay
- PayTabs
- BillPlz
- Zitopay
- Toyyibpay
- Pagali
- Autorize.Net
- SitesWay
- TransactionCloud
- WiPay
- KineticPay
- Senangpay
- SaltPay
- Iyzipay
- Paymob
- PowertranzPay
- Awdpay
- YooMoney
- CoinPayments
- Sslcommerz
Setup For Paytm
route and middleware code will be same as version ^1.0, version ^2.0 will change only customer_charge and ipn_response method
charge_customer method example
ipn_response method example
CinetPay
Checkout CinetPay Setup Documentation
Paytm ipn route example
you must have to excluded cinetpay ipn route from csrf token verify, go to `app/Http/Middleware`
VerifyCsrfTokenMiddleware add your route path here in
$except`` array
``
2.0 Setup For Cinetpay
Cinetpay payment gateway is only supported in version > v2.x
charge_customer method example
ipn_response method example
CinetPay test credentials
2.0 Setup For Paypal
route and middleware code will be same as version ^1.0, version ^2.0 will change only customer_charge and ipn_response method
charge_customer method example
ipn_response method example
2.0 Setup For Stripe
route and middleware code will be same as version ^1.0, version ^2.0 will change only customer_charge and ipn_response method
charge_customer method example
ipn_response method example
2.0 Setup For Midtrans
route and middleware code will be same as version ^1.0, version ^2.0 will change only customer_charge and ipn_response method
charge_customer method example
ipn_response method example
Midtrans ipn route example
``
Midtrans Test Cards
2.0 Setup For Razorpay
Checkout Razorpay Setup Documentation route and middleware code will be same as version ^1.0, version ^2.0 will change only customer_charge and ipn_response method
charge_customer method example
ipn_response method example
2.0 Setup For Mollie
Checkout Mollie Setup Documentation route and middleware code will be same as version ^1.0, version ^2.0 will change only customer_charge and ipn_response method
Mollie ipn route example
``
charge_customer method example
ipn_response method example
FlutterwaveRave
[Checkout Flutterwave Setup Documentation]()
FlutterwaveRave ipn route example
``
Test Cards
`
2.0 Setup For Flutterwave
route and middleware code will be same as version ^1.0, version ^2.0 will change only customer_charge and ipn_response method
charge_customer method example
ipn_response method example
Paystack
[Checkout Paystack Setup Documentation]()
Here is Test Credentials For Paystack
Paystack ipn route example
``
Note: paystack does not support multiple ipn route, it supports only one webhook you can add in paystack dashboard. you can use $arg['payment_type'] data for check which kind of payment processed
route and middleware code will be same as version ^1.0, version ^2.0 will change only customer_charge and ipn_response method
charge_customer method example
ipn_response method example
Payfast
[Checkout Payfast Setup Documentation]()
Here is Test Credentials For Payfast
Payfast ipn route example
you must have to excluded Payfast ipn route from csrf token verify, go to `app/Http/Middleware`
VerifyCsrfTokenMiddleware add your route path here in
$except`` array
`` route and middleware code will be same as version ^1.0, version ^2.0 will change only customer_charge and ipn_response method
charge_customer method example
ipn_response method example
Cashfree
Checkout Cashfree Setup Documentation
Cashfree ipn route example
``
route and middleware code will be same as version ^1.0, version ^2.0 will change only customer_charge and ipn_response method
charge_customer method example
ipn_response method example
Instamojo
[Checkout Instamojo Setup Documentation]()
Instamojo Pago only works with INR currency
Instamojo ipn route example
``
Test Credentials for Instamojo
`
2.0 Setup For Instamojo
route and middleware code will be same as version ^1.0, version ^2.0 will change only customer_charge and ipn_response method
charge_customer method example
ipn_response method example
Mercadopago
Checkout Mercadopago Setup Documentation
Mercado Pago only works with BRL currency
Mercado ipn route example
``
Test Credentials for Mercadopago
`
2.0 Setup For Instamojo
route and middleware code will be same as version ^1.0, version ^2.0, will change only customer_charge and ipn_response method
charge_customer method example
php $mercadopago = XgPaymentGateway::mercadopago(); $mercadopago->setClientId('client_id'); $mercadopago->setClientSecret('client_secret'); $mercadopago->setEnv(true); dd($mercadopago->ipn_response());
apacheconf access_token = 'EAAAEOuLQObrVwJvCvoio3H13b8Ssqz1ighmTBKZvIENW9qxirHGHkqsGcPBC1uN' location_id = 'LE9C12TNM5HAS' ` Mastercard 5105 1051 0510 5100 CVC: 111 Date: any future date
Discover
6011 0000 0000 0004
CVC: 111
Date: any future date
Diners Club 3000 000000 0004
CVC: 111
Date: any future date
JCB 3569 9900 1009 5841 CVC: 111 Date: any future date
Name: Test Email: [email protected] ` Number Scheme CVV 3D enrolled
4000000000000002 Visa 123 Yes 4111111111111111 Visa 123 No 4012001036983332 Visa 530 Yes 5498383801606532 MasterCard 977 Yes 5200000000000007 MasterCard 977 Yes 5200000000000114 MasterCard 977 No ` Number: 5111111111111118 Expiry Month: May Expiry Year: 2025 CVV: 100 Card Name: anything
php $iyzipay = XgPaymentGateway::iyzipay(); $iyzipay->setSecretKey('sandbox-QsgXTUpizlCZzHaypMJwkL8YTMGsYMBM'); $iyzipay->setApiKey('sandbox-wtyih1LNnlN1FtCei29rVjbZRKfqVeUC'); $iyzipay->setEnv(true); $iyzipay->setCurrency('TRY'); $payment_data = $iyzipay->ipn_response();
dd($payment_data); php
paymob supported currency list ['EGP', 'USD', 'EUR', 'GBP'] `php Route::match(['get','post'],'/paymob-ipn', [\App\Http\Controllers\PaymentLogController::class,'paymob_ipn'] )->name('payment.paymob.ipn');
`php 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 = [ 'paymob-ipn' ]; } php $paymob = XgPaymentGateway::paymob(); $paymob->setApiKey('='); $paymob->setIntegrationId(''); $paymob->setIframeId(''); //this payment gateway support mulple payment option. here is example of 4, // $paymob->setGatewayType('accept-valu'); $paymob->setGatewayType('accept-online'); // $paymob->setGatewayType('accept-kiosk'); // $paymob->setGatewayType('accept-wallet'); // $paymob->setWalletMobileNumber('01010101010'); //require wallet mobile number, is you set gateway type "accept-wallet", this is user wallet number;
$paymob->setSecretKey(''); $paymob->setPublicKey(''); $paymob->setHmacSecret(''); $paymob->setEnv(true); $paymob->setCurrency('EGP'); $response = $paymob->charge_customer([ 'amount' => 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;
php $paymob = XgPaymentGateway::paymob(); $paymob->setApiKey('ZXlKaGJHY2lPaUpJVXpVeE1pSXNJblI1Y0NJNklrcFhWQ0o5LmV5SmpiR0Z6Y3lJNklrMWxjbU5vWVc1MElpd2ljSEp2Wm1sc1pWOXdheUk2T0RVNU5UY3pMQ0p1WVcxbElqb2lhVzVwZEdsaGJDSjkuSzZ3WUliNDN3MzdfNVpLVm9yQjdkYXo5bmh3UGtiVGNUUnlfNGhoVXVzWmYyYzJyMnpEb2VMWVRuMXZDSmtPcE1NWkdpNURmYU5mdHBmc3ZtdGlUeEE='); $paymob->setIntegrationId('4036562'); $paymob->setIframeId('775086'); // $paymob->setGatewayType('accept-valu'); $paymob->setGatewayType('accept-online'); // $paymob->setGatewayType('accept-kiosk'); // $paymob->setGatewayType('accept-wallet'); // $paymob->setWalletMobileNumber('01010101010'); //require wallet mobile number, is you set gateway type "accept-wallet", this is user wallet number;
$paymob->setSecretKey('egy_sk_live_fccc02d55ad9719c077a8344b83d87a45a2babfadd750fd64ecc22e023196f9b'); $paymob->setPublicKey('egy_pk_live_9ojAlERxBdcEuO7bZDyzx00xJNvi12Q5'); $paymob->setHmacSecret('02D16CFDC2F224AE0E12416CC7FFEF9F'); $paymob->setEnv(true); $paymob->setCurrency('EGP'); $payment_data = $paymob->ipn_response(); dd($payment_data); php
Powertranz supported currency list ['EGP', 'USD', 'EUR', 'GBP'] `php Route::post('/powertranz-ipn', [\App\Http\Controllers\PaymentLogController::class,'powertranz_ipn'] )->name('payment.powertranz.ipn');
`php 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 = [ 'powertranz-ipn' ]; } php $powertranz = XgPaymentGateway::powertranz(); $powertranz->setMerchantId('88803448'); $powertranz->setMerchantProcessingPassword('SqroVVlPemN4gvlAKCbl7l5tvHzjOypnfqdYXMYv9ze4GsW3OaCABO'); $powertranz->setGatewayKey(''); $powertranz->setEnv(true); $powertranz->setCurrency('USD'); $response = $powertranz->charge_customer([ 'amount' => 5.2, '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; php $powertranz = XgPaymentGateway::powertranz(); $powertranz->setMerchantId('88803448'); $powertranz->setMerchantProcessingPassword('SqroVVlPemN4gvlAKCbl7l5tvHzjOypnfqdYXMYv9ze4GsW3OaCABO'); $powertranz->setGatewayKey(''); $powertranz->setEnv(true); $powertranz->setCurrency('USD'); $payment_data = $powertranz->ipn_response(); dd($payment_data); php
Awdpay supported currency list ['USD', 'EUR', 'XOF'] `php Route::post('/awdpay-ipn', [\App\Http\Controllers\PaymentLogController::class,'awdpay_ipn'] )->name('payment.awdpay.ipn');
`php 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 = [ 'awdpay-ipn' ]; } php $awdpay = XgPaymentGateway::awdpay(); $awdpay->setPrivateKey('---'); $awdpay->setLogoUrl('---'); $awdpay->setEnv(true); $awdpay->setCurrency('USD'); $response = $awdpay->charge_customer([ 'amount' => 5.2, '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; php $awdpay = XgPaymentGateway::awdpay(); $awdpay->setPrivateKey('---'); $awdpay->setLogoUrl('---'); $awdpay->setEnv(true); $awdpay->setCurrency('USD'); $payment_data = $awdpay->ipn_response(); dd($payment_data); php
YooMoney supported currency list ['RUB'] `php Route::post('/yoomoney-ipn', [\App\Http\Controllers\PaymentLogController::class,'yoomoney_ipn'] )->name('payment.yoomoney.ipn');
`php 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 = [
'yoomoney-ipn'
];
}
php
$yoomoney = XgPaymentGateway::yoomoney();
$yoomoney->setShopId('');
$yoomoney->setSecretKey('');
$yoomoney->setCurrency("RUB");
$yoomoney->setEnv(true); // this must be type of boolean , string will not work
$yoomoney->setExchangeRate(74); // if RUB not set as currency
$response = $yoomoney->charge_customer([
'amount' => 10,
'title' => 'this is test title',
'description' => 'this is test description',
'ipn_url' => route('post.ipn'), //post route
'order_id' => Str::random(6),
'track' => 'asdfasdfsdf',
'cancel_url' => route('payment.failed'),
'success_url' => route('payment.success'),
'email' => '[email protected]',
'name' => 'Ahmed Elkholy',
'payment_type' => 'order',
]);
return $response;
php
$yoomoney = XgPaymentGateway::yoomoney();
$yoomoney->setShopId('');
$yoomoney->setSecretKey('');
$yoomoney->setCurrency("RUB");
$yoomoney->setEnv(true); // this must be type of boolean , string will not work
$yoomoney->setExchangeRate(74); // if INR not set as currency
\Log::info(print_r($yoomoney->ipn_response(),true));
php
CoinPayments supported currency list [ "USD",'LTCT','ZEN','ZEC','XVG','XMR','XEM','USDT.TRC20', 'USDT.SOL','USDT','USDC.TRC20','USDC.SOL','TUSD.TRC20', 'TRX','SYS','SOL','RVN','QTUM','PIVX','OMNI','MSOL.SOL', 'MNDE.SOL','MATIC.POLY','MAID','MAD','JST.TRC20','ISLM.EVM', 'FTN.BAHAMUT','FIRO','ETH','ETC','DOGE','DGB','DASH','CNHT.TRC20', 'BXN','BUSD.TRC20','BTT.TRC20','BNB.BSC','BNB','VLX.Native','VLX', 'LTC','BCH','BTC.LN','BTC' ]
php Route::post('/coinpayments-ipn', [\App\Http\Controllers\PaymentLogController::class,'coinpayments_ipn'] )->name('payment.coinpayments.ipn');
php 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 = [
'coinpayments-ipn'
];
}
php
$coinpayment = XgPaymentGateway::coinpayments();
$coinpayment->setMerchant('');
$coinpayment->setCurrency("USD");
$coinpayment->setAllowCurrencies("LTCT,BTC,ETH"); // you can set multiple currencies
$coinpayment->setIpnPin("");
$coinpayment->setEnv(true); // this must be type of boolean , string will not work
$coinpayment->setExchangeRate(74);
$response = $coinpayment->charge_customer([
'amount' => 10,
'title' => 'this is test title',
'description' => 'this is test description',
'ipn_url' => route('post.ipn'), //post route
'order_id' => Str::random(6),
'track' => 'asdfasdfsdf',
'cancel_url' => route('payment.failed'),
'success_url' => route('payment.success'),
'email' => '[email protected]',
'name' => 'Ahmed Elkholy',
'payment_type' => 'order',
]);
return $response;
php
$coinpayment = XgPaymentGateway::coinpayments();
$coinpayment->setMerchant('');
$coinpayment->setCurrency("USD");
$coinpayment->setAllowCurrencies("LTCT,BTC,ETH"); // you can set multiple currencies
$coinpayment->setIpnPin("");
$coinpayment->setEnv(true); // this must be type of boolean , string will not work
$coinpayment->setExchangeRate(74); // if INR not set as currency
\Log::info(print_r($coinpayment->ipn_response(),true));
php
Sslcommerz supported currency list ["USD",'BDT','EUR']
php Route::post('/sslcommerz-ipn', [\App\Http\Controllers\PaymentLogController::class,'sslcommerz_ipn'] )->name('payment.sslcommerz.ipn');
php 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 = [
'sslcommerz-ipn'
];
}
php
$sslcommerz = XgPaymentGateway::sslcommerz();
$sslcommerz->setStoreId('xgeni65bceeafdfb1e');
$sslcommerz->setStorePasswd('xgeni65bceeafdfb1e@ssl');
$sslcommerz->setCurrency("BDT");
$sslcommerz->setEnv(true); // this must be type of boolean , string will not work
$sslcommerz->setExchangeRate(74); // if BDT not set as currency
$response = $sslcommerz->charge_customer([
'amount' => 10,
'title' => 'this is test title',
'description' => 'this is test description',
'ipn_url' => route('post.ipn'), //post route
'order_id' => Str::random(6),
'track' => 'asdfasdfsdf',
'cancel_url' => route('payment.failed'),
'success_url' => route('payment.success'),
'email' => '[email protected]',
'name' => 'Ahmed Elkholy',
'payment_type' => 'order',
]);
return $response;
php
$sslcommerz = XgPaymentGateway::sslcommerz();
$sslcommerz->setStoreId('xgeni65bceeafdfb1e');
$sslcommerz->setStorePasswd('xgeni65bceeafdfb1e@ssl');
$sslcommerz->setCurrency("BDT");
$sslcommerz->setEnv(true); // this must be type of boolean , string will not work
$sslcommerz->setExchangeRate(74); // if BDT not set as currency
\Log::info(print_r($sslcommerz->ipn_response(),true));
Using this package
Information about using this package
Contributing
Information about contributing to this package. Owner Of Package @sharifur Bug Fix and minor Contributor
All versions of paymentgateway with dependencies
laravel/framework Version ^10.10
stripe/stripe-php Version ^13.10.0
srmklive/paypal Version ~3.0
midtrans/midtrans-php Version ^2.5
razorpay/razorpay Version 2.*
mollie/laravel-mollie Version ^2.0
unicodeveloper/laravel-paystack Version 1.1.*
mercadopago/dx-php Version ^2.6.2
tzsk/payu Version ^7.0.0
square/square Version 37.1.0.20240604
cinetpay/cinetpay-php Version ^1.9
paytabscom/laravel_paytabs Version dev-master
jomweb/billplz-laravel Version ^v3.3.0
sharifur/payfast Version ^v2.0.1
authorizenet/authorizenet Version ^2.0
php-http/message Version ^1.16
php-http/message-factory Version ^1.1
iyzico/iyzipay-php Version ^2.0
stevebauman/location Version ^7.1
yoomoney/yookassa-sdk-php Version ^3.0