Download the PHP package allanadan05/laravel-payments without Composer

On this page you can find all versions of the php package allanadan05/laravel-payments. 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 laravel-payments

Laravel Payments

Packagist

A small, gateway-agnostic payment integration module for Laravel. It ships with a working Braintree driver, but calling code never talks to Braintree directly — everything goes through the PaymentGateway contract, so adding Stripe, Authorize.Net, etc. later is a new driver class + a config entry, not a rewrite of your controllers.

Features

Requirements

Installation

Laravel's package auto-discovery registers the service provider and Payment facade automatically — no manual registration needed.

Configuration

Add credentials to .env:

PAYMENT_GATEWAY selects the default entry from the gateways array in the published config/payments.php.

Braintree account setup

Usage

You can also resolve a specific named gateway (useful once a second provider is configured): Payment::gateway('braintree').

Dependency-inject the contract instead of the facade if you prefer:

(Bind PaymentGateway::class to Payment::gateway() in a service provider if you want constructor injection app-wide.)

Optional capabilities

Not every gateway supports subscriptions, webhooks, etc., so those live outside the core PaymentGateway contract as separate, optional interfaces. BraintreeGateway implements all of them; a driver for a simpler provider can skip any it doesn't support. Check with instanceof before calling:

Interface Methods Purpose
SupportsSubscriptions subscribe(), findSubscription(), updateSubscription(), cancelSubscription() Recurring billing
SupportsWebhooks verifyWebhook(), parseWebhook() Handle async gateway events
SupportsStoredPaymentMethods addPaymentMethod(), listPaymentMethods(), defaultPaymentMethod(), deletePaymentMethod() Manage a customer's vaulted cards/accounts
SupportsReporting findTransaction(), searchTransactions() Look up / search past transactions
SupportsCustomerListing findCustomer(), listCustomers() Look up / list vaulted customers

searchTransactions() and listCustomers() take a flat criteria array; BraintreeGateway supports exact-match lookups on a fixed set of keys (see the docblocks on searchTransactions()/listCustomers() in src/Gateways/BraintreeGateway.php) and throws on unknown keys rather than silently ignoring them.

Adding another gateway

  1. Implement Payments\Contracts\PaymentGateway (see src/Gateways/BraintreeGateway.php for the shape).
  2. Add a config/payments.php entry under gateways with a driver key.
  3. Register the driver, typically in your AppServiceProvider::boot():

No changes needed to PaymentManager, the facade, or any calling code.

Roadmap

Planned drivers, in priority order:

  1. Stripe — closest 1:1 fit to the existing contract; PaymentIntents, Subscriptions, Webhooks, and SetupIntents map directly onto PaymentGateway and all five optional capability interfaces.
  2. PayMongo — Stripe-shaped API (PaymentIntents-style flow) that also happens to be the practical way to accept GCash and Maya in the Philippines, since it aggregates both under one integration instead of needing a separate driver per wallet.
  3. Maya (PayMaya) — direct integration for merchants who want Maya as a primary gateway rather than going through PayMongo. Supports charge/webhooks; no native equivalent of Stripe/Braintree's subscription or stored-payment-method vaulting yet, so it likely won't implement SupportsSubscriptions or SupportsStoredPaymentMethods at first.
  4. PayPal — standalone REST API integration for merchants who don't want to route PayPal through Braintree. Billing agreements back SupportsSubscriptions; webhooks map cleanly.

Testing

If you have PHP + Composer installed locally:

Or via Docker (no local PHP/Composer needed)

(No make? Run the underlying commands directly: docker compose build, then docker compose run --rm app composer install, then docker compose run --rm app vendor/bin/phpunit.) Requires Docker Desktop (or another Docker engine) running.

tests/Unit/PaymentManagerTest.php uses Orchestra Testbench to boot a minimal Laravel app and exercises the manager/facade without hitting Braintree's API. DataTransferObjectsTest.php covers the plain-PHP value objects with no framework bootstrap needed.

Contributing

Issues and PRs are welcome.

  1. Fork the repo and create a branch off main.
  2. Run the test suite (make test or vendor/bin/phpunit) before and after your change — see Testing above.
  3. Keep new gateway drivers behind the PaymentGateway contract; don't add gateway-specific methods to PaymentManager or the facade.
  4. Open a PR describing the change and why it's needed.

License

MIT — see LICENSE. Free to use, modify, and redistribute, including commercially, by any company or individual.


All versions of laravel-payments with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/support Version ^9.0|^10.0|^11.0
braintree/braintree_php Version ^6.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 allanadan05/laravel-payments contains the following files

Loading the files please wait ...