Download the PHP package marqant-lab/marqant-pay without Composer

On this page you can find all versions of the php package marqant-lab/marqant-pay. 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 marqant-pay

Marquant Pay

This project aims to make it as easy as possible to implement a payment providers into large projects. Inspired by the laravel/cashier package, which is limited to stripe at the moment, we try to bring in more flexibility into the topic by allowing multiple payment providers to coexist.

Installation

Require the package through composer.

Create the migrations for at least one billable model.

Providers

For each payment provider that you want to connect to, you will first have to pull in a payment gateway through composer. For example here we pull in the stripe gateway. Make sure to checkout the documentation of the provider package you want to pull in.

Then you will have to add it to the marqant-pay.php config file. Create it if it doesn't exist yet.

Next you will have to create an entry for it in the database. To do so you can call the following command.

If you also want to remove the providers that are no longer listed in your configuration, then you can add the --delete flag to the command.

Billables

A billable in the context of this package is every model that is prepared to be used as customer - because customers are billable 😉

The setup consists of the database table columns needed to store provider related data and the usage of the Billable trait on the billable model.

To create the needed migrations run the following command but replace the User model if you want another model to be used as customer, eg. a Company model.

Then you can just run the migrations as usual to apply the migrations.

Note that you might need to do the same for the payment gateway package that you pull in, so make sure to checkout the documentation of it.

Plans & Subscriptions

Check out the marqant-lab/marqant-pay-subscriptions package on how to pull in subscriptions functionality into your project.

Tests

To run tests, you first need to set up a sqlite database that we use to get snapshots of the database state. Run the following command from within your project root to create the sqlite database.

Next you will have to add the tests of this package to the phpunit test suite in the phpunit.xml file in the root of your Laravel project.

Then you should be able to just run your tests with the following commands.

If you want to just run a specific test or a method on a test, then you can filter them out like shown below.

If you need to perserve a snapshot of what is going on in the test database, then you can comment out the following line in your phpunit.xml file.

With this line commented out, Laravel will use the database/database.sqlite file to store values.

Development

TODO: Explain setup of development environment.

TODO: Add section for creating new payment providers.

Extending the MarqantPayService

To extend the MarqantPayService class, which is what you use behind the scenes when using the MarqantPay facade , you can create a Macro and attach it in the service provider of your package though the mixin method provided by the Macroable trait.

Note that you have to take care of your extensions, so only one macro of a kind is required. For example if two extensions would provide the macro for MarqantPayService::subscribe method, only one of those would be registered.


All versions of marqant-pay with dependencies

PHP Build Version
Package Version
Requires illuminate/support Version ^6.0|^7.0|^8.0
cviebrock/eloquent-sluggable Version ^6.0|^7.0|^8.0
i-rocky/eloquent-dynamic-relation Version ^1.0
moneyphp/money Version ^3.2
php Version ^7.4
spatie/data-transfer-object Version ^1.13
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 marqant-lab/marqant-pay contains the following files

Loading the files please wait ....