Download the PHP package sdkcodes/lara-paystack without Composer

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

LaraPaystack

A laravel 5 sdk to interface with paystack endpoints

About


This package abstracts Paystack's endpoints into simple methods

You can find all paystack's endpoints at https://developers.paystack.co/reference

Requirements

Installation

Features

How payment on Paystack works

In order to collect payments with paystack from your customers, this is how the flow generally looks like:

  1. You initialize a transaction with paystack by sending certain to the paystack api, this data usually contains things like the [amount and email (and also name and phone number of the customer)]
  2. Paystack responds with a payment url (or authorization url) which is a page on paystack's site that you must redirect your customer to. The actual payment will happen on this page
  3. Once payment is complete and successful on this page (i.e your customer has been debited by paystack), paystack redirects the customer back to your site (to a url [callback url] you already specified while initiating transaction from step 1). When redirecting the customer back to your site, paystack will also send the transaction reference of the just concluded transaction as a query parameter.
  4. On your callback url now, you should then use the transaction reference returned to verify if the transaction was actually genuine or not before you then proceed to give value to the customer.

Basic Usage

$paystack->initializeTransaction($data)->redirectNow();

Below is a sample route and controller that uses the LaraPaystack package to make and verify payment

More

As it stands, here are some of the things you can do with this package:

I plan to keep updating the package and as time permits, cover all of Paystack's endpoints.

You're welcome to contribute as well.

Expectations

LaraPaystack requires some environment variables be set, and it uses the appropriate paystack key based on your enviroment

The PAYSTACK_LIVE_SECRET_KEY will be automatically used if your APP_ENV matches any of the following values: production

However, you can easily override the environment values by setting a USE_ENV_AS variable in your .env

USE_ENV_AS can have either values of production to simulate production environment or testing to simulate test environment

Examples

Bulk Transfer

To use the package for Paystack's bulk transfer, you need to first disable OTP from your paystack dashboard.

You will use the doBulkTransfer(array $recipients, string $currency="NGN", string $source="balance") method to carry out bulk transfer.

Note: Only the first argument to the method is required

TODO

Complete documentation

Inspiration

This package was highly inspired by @Unicodeveloper's Laravel Paystack package

License

The package is as free as a bird.

A star of the repo would highly be appreciated


All versions of lara-paystack with dependencies

PHP Build Version
Package Version
Requires laravel/framework Version >=5.4
illuminate/support Version >=5.4
guzzlehttp/guzzle Version ~6.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 sdkcodes/lara-paystack contains the following files

Loading the files please wait ....