Download the PHP package xgenious/paymentgateway without Composer
On this page you can find all versions of the php package xgenious/paymentgateway. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download xgenious/paymentgateway
More information about xgenious/paymentgateway
Files in xgenious/paymentgateway
Package paymentgateway
Short Description A Laravel package to manage multiple payment gateways with a unified API
License MIT
Homepage https://github.com/XgeniousLLC/paymentgateway
Informations about the package paymentgateway
XGenious Payment Gateway
A Laravel package to manage multiple payment gateways with a unified API.
- Package:
xgenious/paymentgateway - Author: Sharifur Rahman
- License: MIT
- PHP: ^8.2
- Laravel: ^12.x
Supported Payment Gateways
| # | Gateway | # | Gateway |
|---|---|---|---|
| 1 | PayPal | 2 | Stripe |
| 3 | Paytm | 4 | Midtrans |
| 5 | Razorpay | 6 | Mollie |
| 7 | Flutterwave | 8 | Paystack |
| 9 | Payfast | 10 | Cashfree |
| 11 | Instamojo | 12 | Mercado Pago |
| 13 | SquarePay | 14 | CinetPay |
| 15 | PayTabs | 16 | BillPlz |
| 17 | Zitopay | 18 | Toyyibpay |
| 19 | Pagali | 20 | Authorize.Net |
| 21 | SitesWay | 22 | TransactionCloud |
| 23 | WiPay | 24 | KineticPay |
| 25 | Senangpay | 26 | SaltPay |
| 27 | Iyzipay | 28 | Paymob |
| 29 | PowertranzPay | 30 | AwdPay |
| 31 | YooMoney | 32 | CoinPayments |
| 33 | SSLCommerz | 34 | Xendit |
| 35 | Adyen | 36 | Airwallex |
Installation
Step 3 — Publish the config file:
This creates config/paymentgateway.php.
Basic Usage
Every gateway follows the same two-method pattern:
charge_customer(array $data)— initiates payment, returns redirect responseipn_response()— handles the webhook/IPN callback
Common charge_customer parameters
Gateway Setup Examples
Stripe
IPN Route:
PayPal
IPN Route:
Paytm
Midtrans
IPN Route:
Midtrans Test Cards:
Razorpay
Mollie
IPN Route:
Flutterwave
IPN Route:
Flutterwave Test Cards:
Paystack
Payfast
Cashfree
Instamojo
Mercado Pago
CinetPay
See detailed setup: CinetPay.md
Authorize.Net
Adyen
See detailed setup: AdyenPay.md
Other Gateways
The following gateways follow the same charge_customer / ipn_response pattern. Refer to the individual gateway class in src/Base/Gateways/ for available setter methods:
| Facade Method | Gateway |
|---|---|
XgPaymentGateway::squareup() |
SquarePay |
XgPaymentGateway::paytabs() |
PayTabs |
XgPaymentGateway::billplz() |
BillPlz |
XgPaymentGateway::zitopay() |
ZitoPay |
XgPaymentGateway::toyyibpay() |
Toyyibpay |
XgPaymentGateway::pagalipay() |
Pagali |
XgPaymentGateway::sitesway() |
SitesWay |
XgPaymentGateway::transactionclud() |
TransactionCloud |
XgPaymentGateway::wipay() |
WiPay |
XgPaymentGateway::kineticpay() |
KineticPay |
XgPaymentGateway::senangpay() |
Senangpay |
XgPaymentGateway::saltpay() |
SaltPay |
XgPaymentGateway::iyzipay() |
Iyzipay |
XgPaymentGateway::paymob() |
Paymob |
XgPaymentGateway::powertranz() |
PowertranzPay |
XgPaymentGateway::awdPay() |
AwdPay |
XgPaymentGateway::yoomoney() |
YooMoney |
XgPaymentGateway::coinpayments() |
CoinPayments |
XgPaymentGateway::sslcommerz() |
SSLCommerz |
XgPaymentGateway::xendit() |
Xendit |
XgPaymentGateway::airwallex() |
Airwallex |
XgPaymentGateway::adyen() |
Adyen |
Developer Guide: Adding a New Gateway
This guide walks through adding a new payment gateway to the package.
Architecture Overview
Every gateway class must extend PaymentGatewayBase and implement six abstract methods.
Step 1 — Create the Gateway Class
Create src/Base/Gateways/YourGatewayPay.php:
Step 2 — Register the Gateway in PaymentGatewayHelpers
Open src/Base/PaymentGatewayHelpers.php and add:
The facade (XgPaymentGateway) proxies all calls to this class, so the method is immediately available:
Step 3 — Add Credentials to the Config (optional)
If the gateway needs credentials from .env, add a block to config/paymentgateway.php:
And add the corresponding keys to .env:
Step 4 — Add a Blade View (if redirect-based)
Some gateways (e.g. Stripe, Razorpay) render a Blade view instead of a direct redirect. If your gateway needs one, create:
Return it from charge_customer:
Step 5 — Add an IPN Route
In your application's routes/web.php (or the consuming app), register the callback route:
Then in the controller:
Available Traits
| Trait | Methods provided |
|---|---|
PaymentEnvironment |
setEnv(bool), getEnv() |
CurrencySupport |
setCurrency(string), getCurrency(), setExchangeRate(float), getExchangeRate() |
ConvertUsdSupport |
get_amount_in_usd(float) — converts any amount to USD using the exchange rate |
IndianCurrencySupport |
Converts to INR |
IDRCurrencySupport |
Converts to IDR |
NigeriaCurrencySupport |
Converts to NGN |
verified_data() Return Format
ipn_response() must return an array. On success, use $this->verified_data([...]) which auto-merges status => complete:
Recurring Payment Support (optional)
If the gateway supports subscriptions, implement the RecurringSupport interface:
Running Tests
Static Analysis
Contributing
See Contribution.md for guidelines.
License
MIT © XgeniousLLC
All versions of paymentgateway with dependencies
laravel/framework Version ^12.13.0 || ^13.0
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 ^3.1.0 || ^4.1
mercadopago/dx-php Version ^3.7.1
square/square Version 37.1.0.20240604
paytabscom/laravel_paytabs Version dev-master
authorizenet/authorizenet Version ^2.0
psr/http-factory Version ^1.1
iyzico/iyzipay-php Version ^2.0
stevebauman/location Version ^7.1
yoomoney/yookassa-sdk-php Version ^3.0