Download the PHP package softscholar/laravel-payments without Composer

On this page you can find all versions of the php package softscholar/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 by SoftScholar

Laravel Payments is a service package for integrating payment gateways into your Laravel application, developed by SoftScholar. This package currently supports the Nagad Payment Gateway, with plans to add support for more gateways in the future.

Note: This package uses Nagad API version 4.0.1.

Table of Contents

Installation

To install the package, run the following command in your Laravel project directory:

Configuration

After installing the package, you need to publish the configuration file to set up credentials for the payment gateways. Run the following command to publish the configuration file:

This will create a configuration file named spayment.php in the config directory of your Laravel project. You can customize this file to configure credentials and settings for the Nagad Payment Gateway or any other gateways that will be supported in the future.

Configuration Options

The configuration file will look something like this:

Setting Environment Variables

To use the Nagad Payment Gateway, add the necessary environment variables to your .env file:

Replace your-merchant-id, your-merchant-secret, your-public-key, your-private-key, and your-callback-url with the actual credentials provided by Nagad.

After setting these variables, the package will be ready to use with the Nagad gateway. Additional gateways can be configured similarly in the future as they are added to the package.

Usage

To use the Laravel Payments package, you can create a new instance of the Payment class and call the purchase method to initiate a payment. Here is an example of how you can use the package to make a payment using the Nagad gateway:

The purchase method will return a redirect URL that you can use to redirect the user to the Nagad payment page. The user will be able to complete the payment on the Nagad website, and once the payment is completed, the user will be redirected back to the callback URL specified in the checkout data.

Callback data example

More detailed documentation will be added in the future as more gateways are added to the package. You can also check the Nagad API Documentation for more information on how to use the Nagad Payment Gateway.

You can get the example application of: Laravel Payments Example You can check the example application to see how to use the package.

Supported Payment Gateways

The Laravel Payments package currently supports the following payment gateways:

License

The Laravel Payments package is open-source software licensed under the MIT license.

Contributing

Open source contributions are welcome! If you would like to contribute to the package, please fork the repository and submit a pull request with your changes.

If you have any questions or need help with the package, please feel free to contact us at SoftScholar or email to Email.


All versions of laravel-payments with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
ext-openssl 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 softscholar/laravel-payments contains the following files

Loading the files please wait ....