Download the PHP package matscode/paystack-laravel-sdk without Composer

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

Paystack Laravel SDK

A modern, maintainable, and extensible Paystack integration for Laravel, built on top of the matscode/paystack-php-sdk. Feel free to reference the main SDK to see other available api method/property


Features


Requirements


Installation

Install via Composer:


Configuration

Optionally, publish the config file:

Set your Paystack secret key in your .env file:


Usage

You can use the Paystack SDK in Laravel via:

Note:

Access Style Facade (Paystack) DI (app(...)) Helper (paystack())
Method call ✅ Yes ✅ Yes ✅ Yes
Property access ❌ No ✅ Yes ✅ Yes
  • For the Facade, you must use static method calls for resources, such as Paystack::transaction(). Property access like Paystack::transaction will not work.
  • For DI and the helper, both method calls (->transaction()) and property access (->transaction) are supported.
  • Always use the method call syntax for maximum compatibility.

Transaction Resource

Initialize Transaction

Initializes a new transaction and returns an authorization URL for the customer to complete payment. The response contains the transaction reference and other details.

List Transactions

Retrieves a list of all transactions carried out on your Paystack account. Returns an array of transaction objects.

Verify Transaction

Verifies the status of a transaction using its reference. Returns the transaction details if found.

Check if Transaction is Successful

Checks if a transaction was successful using its reference. Returns true if successful, otherwise false.

Example: Initializing a Transaction with the Paystack Facade (Laravel)

You can use the Paystack facade with method chaining to initialize a transaction and get the payment authorization URL:

If you want to use the array method (amount in kobo):


Bank Resource

List Banks

Retrieves a list of all supported banks for your Paystack account. Useful for populating bank selection dropdowns in forms.

Resolve Account Information

Resolves and validates a Nigerian bank account number and bank code. Returns the account name and other details if valid.


Note: More resources (Customers, Plans, Subscription, Transfers, etc.) may be added as the SDK evolves. For the latest, see the PHP SDK documentation.


License

This library is licensed under the GNU General Public License v3.0 (GPL-3.0). See the LICENSE file for the full license text.


All versions of paystack-laravel-sdk with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
illuminate/support Version >=9.0
matscode/paystack-php-sdk Version ^2.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 matscode/paystack-laravel-sdk contains the following files

Loading the files please wait ....