Download the PHP package ma-lara/payments without Composer

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

GitHub License Packagist Downloads GitHub Release

MA Lara Payment

A unified Laravel payment package for integrating multiple payment gateways through a consistent API, including Paymob subscriptions.

Documentation   •   Quick Start   •   Version   •   Testing   •   Contributing   •   License


What is this package?

ma-lara/payments gives Laravel applications one API for multiple payment providers, plus a subscription API for Paymob:

Provider-specific API calls, authentication, response mapping, and callback handling stay isolated inside each gateway. The backend is frontend-agnostic — an optional Stripe Blade card component is included but never required.


Capabilities

Not implemented: capture, void, Stripe subscriptions, charging a stored card through the package API, and persisted recurring (renewal) transactions. See 1. Introduction for the full list.


Supported gateways

Gateway Card Wallet Retry Refund Webhook / Callback Subscription
Stripe ✅ ❌ ✅ ✅ ✅ Signed ❌
Paymob ✅ ✅ ✅ ✅ ✅ HMAC ✅

Subscriptions are exposed by gateways that implement SubscrptionableInterface:


Requirements

Requirement Version
PHP >=8.1
Laravel >=9.0 <14.0
JSON ext-json
cURL ext-curl
Stripe SDK stripe/stripe-php

Installation

Then set your provider credentials in .env and expose your own callback routes — the package does not register routes for you.

Full instructions, including the queue worker requirement and the subscription webhook URL: 2. Installation.


Quick Start

More: 3. Quick Start — including a minimal subscription example.


Documentation

The documentation is organized by what you are trying to do. Start here:

# Chapter You will find
1 Introduction What the package does, capabilities, supported gateways, requirements, what is intentionally not implemented
2 Installation Composer install, configuration, migrations, callback routes, subscription webhook URL, queue worker
3 Quick Start The minimum steps for a normal payment and for a Paymob subscription
4 Payments Creating a Payment · Payment Response · Payment Status · Payment Callbacks / Webhooks · Retry Payment · Refunds · Transactions · Saved Cards
5 Subscriptions Subscription Overview · Creating a Subscription Plan · Listing Plans · Updating a Plan · Suspending/Resuming a Plan · Creating a Subscription · Subscription Lifecycle · Updating a Subscription · Subscription Callbacks / Webhooks · Subscription Transactions
6 Gateway Architecture How gateways are resolved, the public contracts, and $payment->subscription()
7 Configuration Every config file, environment variable, publish tag, and capability requirement
8 Troubleshooting Real errors thrown by the package and how to resolve them
9 Advanced / Developer Documentation Architecture, DTOs, value objects, repositories, webhook internals, testing, extending gateways, adding another subscription implementation

A short answer for the most common questions:

Question Answer
How do I install the package? 2. Installation
How do I make a payment? 4. Payments
How do I create a subscription plan? 5. Subscriptions → Creating a Subscription Plan
How do I create a subscription? 5. Subscriptions → Creating a Subscription
How do I suspend or resume it? 5. Subscriptions → Subscription Lifecycle
How do refunds, retries, and callbacks work? 4. Payments
Where do I find implementation details? 9. Advanced / Developer Documentation

Key subscription methods at a glance

Method names are reproduced exactly as implemented (findSubscrptionByLocalId, paginateLocalSubscrptions). $gatewayPlanId / $gatewaySubscriptionId are Paymob IDs; the ...ByLocalId methods take local database IDs.


Version

These documents describe v2.1.0.

v2.1.0 is a backward-compatible feature release that introduces Paymob subscription support. Existing payment behaviour, public methods, configuration keys, and previously existing database tables are unchanged.

Schema additions in this release:

Only version references related to this release were updated. Historical release notes are not maintained in this repository.


Testing


Contributing

Contributions are welcome.

When adding or modifying functionality:

  1. follow the existing architecture;
  2. keep gateway-specific code inside its gateway directory;
  3. avoid changing the shared payment workflow unnecessarily;
  4. add or update tests and run composer test;
  5. update the documentation and the capability tables;
  6. preserve backward compatibility.

Security


Author

Mohamed Allam

License

MIT © Mohamed Allam


All versions of payments with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
laravel/framework Version >=9.0 <14.0
stripe/stripe-php Version *
ext-json Version *
ext-curl Version *
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 ma-lara/payments contains the following files

Loading the files please wait ...