Download the PHP package tamfuldev/payment-gateway without Composer

On this page you can find all versions of the php package tamfuldev/payment-gateway. 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 payment-gateway

Payment Gateway

A unified abstraction for integrating multiple domestic and international payment gateways in Laravel through a single, consistent API:

Instead of learning each provider's signing scheme, endpoints and payload formats, you code against one contract. Adding a new provider means writing one driver — the calling code never changes.


Features

Requirements

Installation

Publish the config file:

Then set your credentials in .env (see .env.example):

Usage

1. Create a payment

ChargeResponse also carries status, method (redirect / QR / card / wallet), an optional qrContent, and a gatewayReference.

Money: always build amounts with Money::ofMajor() (accepts a string/int, never a float) or Money::ofMinor(). The library manages each currency's decimal places for you.

2. Handle webhooks / IPN

The package auto-registers a route: POST /payment/webhook/{gateway}. It verifies the signature, normalizes the payload, and dispatches an event. You listen for the event to record the order:

Available events:

Event When
PaymentCompleted A verified webhook reports a successful payment
PaymentFailed A verified webhook reports a failed/declined payment

An invalid signature returns 400 and dispatches nothing.

3. Change the webhook prefix or middleware

Supported gateways

Group Gateway Status
Vietnam VNPay ✅ charge + webhook verification (reference driver)
Vietnam MoMo, ZaloPay, OnePay, PayOS, VietQR 🔜 planned
International Stripe, PayPal, Paddle, 2Checkout 🔜 planned
Wallet / Crypto Binance Pay, Coinbase Commerce 🔜 planned

The VNPay reference driver focuses on getting charge + webhook verification right (the security-critical core). Refund/query are follow-up work (they require extra fields such as transactionDate / transactionType).

Adding a new gateway

  1. Create src/Gateways/<Name>/<Name>Gateway.php extending AbstractGateway and implementing PaymentGateway (plus capability interfaces like SupportsRefund only if the gateway supports them).
  2. Register a create<Name>Driver() method in PaymentManager.
  3. Add a config block under config/payment.php (read secrets from env() only there).
  4. Verify webhooks with a constant-time comparison (hash_equals).
  5. Write tests first (signing + charge + webhook), mocking HTTP.

See CLAUDE.md for the full architecture and security checklist.

Architecture

Development

This repo ships a Docker toolchain, so you don't need PHP/Composer installed locally.

If you do have PHP/Composer locally, the equivalent composer scripts work too (composer install, composer ci, ...).

Security

If you discover a security issue, please email the maintainer rather than opening a public issue. Key guarantees the library enforces: constant-time signature checks, integer-only money, and secrets sourced exclusively from configuration.

License

Apache-2.0 — see LICENSE.


All versions of payment-gateway with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/support Version ^11.0|^12.0
illuminate/http Version ^11.0|^12.0
illuminate/contracts Version ^11.0|^12.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 tamfuldev/payment-gateway contains the following files

Loading the files please wait ...