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.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package paymentgateway

XGenious Payment Gateway

A Laravel package to manage multiple payment gateways with a unified API.


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:

  1. charge_customer(array $data) — initiates payment, returns redirect response
  2. ipn_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

PHP Build Version
Package Version
Requires php Version ^8.2
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
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package xgenious/paymentgateway contains the following files

Loading the files please wait ...