Download the PHP package codejutsu1/laravel-paystack-transfer without Composer

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

Laravel Paystack Transfer

Latest Version on Packagist GitHub Tests Action Status License Total Downloads

A Laravel package to make single and bulk transfers with Paystack.

Installation

PHP 8.2+ and Composer are required.

Compatible with Laravel 9, 10, 11.

Usage

Open your .env file and add your public and secret API keys.

Table of Contents

Payment Flow

  1. To make a transfer, either single or in bulk using this package, you need to provide an array of four parameters:

    • amount - Amount to be sent.
    • reference (Transfer Reference) - A unique identifier which will be used to track your transactions. This package provides a helper function, generateTransferReference(), which returns a UUID you can use as a unique reference.
    • recipient (Transfer Recipient) - A transfer recipient is a beneficiary that you can send money to. To create a transfer recipient, you need to collect their details first.
    • reason - Reason for the transfer.
    • currency - (Optional) NGN by default but you can specify your currency.
  2. Each request returns a response as an object containing:
    • status (boolean)
    • message (string)
    • data (array)
    • meta (array)

Transfer Recipient

Create Single Transfer Recipient

To create a single transfer recipient:

[!IMPORTANT] Store the recipient_code in your database alongside the recipient. For more information, visit Paystack Create Transfer Recipient.

Create Bulk Transfer Recipient

You can create multiple transfer recipient no matter the number of batches. To create multiple transfer recipient:

[!NOTE] For more information, visit Paystack Bulk Create Transfer Recipient

List Transfer Recipients

To list all transfer recipients:

You can also provide query parameters as an array:

[!NOTE] For more information, visit Paystack List Transfer Recipients.

Fetch a Transfer Recipient

To fetch a transfer recipient, you need to provide the id or recipient code of the recipient:

[!NOTE] For more information, visit Paystack Fetch Transfer Recipient.

Update a Transfer Recipient

To update a transfer recipient details, you need to provide the id or recipient code of the recipient alongside the details to be updated (name and/or email):

[!NOTE] For more information, visit Paystack Update Transfer Recipient.

Delete a Transfer Recipient

To delete a transfer recipient, you need to provide the id or recipient code of the recipient:

[!NOTE] For more information, visit Paystack Delete Transfer Recipient.

Banks

Get Banks API

To get lists of banks in Nigeria:

You can also provide query parameters as an array:

[!NOTE] For more information, visit Paystack List Banks API.

Get Bank Code

To get a bank code, you need to provide the bank name from the get bank API:

Verify Account Number

To confirm the account belongs to the right customer, you need to provide the account number and the bank code of the customer as both strings:

[!NOTE] For more information, visit Paystack Resolve Account.

Transfers

Single Transfers

To make a single transfers, you need these provide four parameters as an array:

The currency is NGN by default. You can override the default currency by adding it to the array. For the source, we took care of that by merging the array with a value of balance.

[!NOTE] For more information, visit Paystack Single Transfers.

Finalize a Transfer

After making a single transfer with OTP enabled, you will have to finalized your transfer by providing the OTP and the transfer code as both strings:

[!NOTE] For more information, visit Paystack Finalize Transfers.

Bulk Transfers

To send money to multiple recipients, you need to make request in batches. A batch is an array of arrays containing the transfer parameters. A batch should not contain more than 100 arrays.

If the batch should contain more than 100 arrays, it should be broken down into batches, each containing 100 arrays and each batch should be sent every 5 seconds.

But you don't have to worry about that, just pass the batch (even if its contains more than 100 arrays) as a parameter in the batchTransfer method. This package will proceed to break it down into batches, each containing not more than 100 arrays and will make a request every 5 seconds.

[!Note] It will return an array of response instead of an object for each request being made.

[!Note] You need to set up webhooks to keep track of your transfers. For more information, visit Paystack Bulk Transfers.

List Transfers

Paystack gives you the option to get the list of all your transfers:

You can also provide query parameters as an array:

[!NOTE] For more information, visit Paystack List Transfers.

Fetch a Transfer

Get details of a transfer. You need to provide transfer id.

[!NOTE] For more information, visit Paystack Fetch Transfers.

Verify a Transfer

Verify the status of a transfer. You need to provide transfer reference.

[!NOTE] For more information, visit Paystack Verify Transfers.

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Feel free to submit Issues (for bugs or suggestions) and Pull Requests(to the dev branch).

Security Vulnerabilities

If you discover a security vulnerability within this package, please send an email to Daniel Dunu at [email protected]. All security vulnerabilities will be promptly addressed..

TODO

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-paystack-transfer with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/contracts Version ^9.0 ||^10.0||^11.0
laravel/framework Version ^9.0 || ^10.0 || ^11.0
saloonphp/saloon Version ^3.8
spatie/laravel-package-tools Version ^1.16
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 codejutsu1/laravel-paystack-transfer contains the following files

Loading the files please wait ....