Download the PHP package smladeoye/yii2-paystack without Composer

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

yii2-paystack

YII 2 component for paystack payment integration

Latest Stable Version Total Downloads

Installation

The preferred way to install this extension is through composer.

Either run

or

add '"smladeoye/yii2-paystack": "1.0.0"' to the require section of your composer.json file, then run:

Configuration

In your configuration file (web.php) register the component with the necessary configurations, for example:

Usage Example

There are seven operations available that can be performed which have been grouped based on Paystack's own grouping. Each of the operations also have their individual methods that can be called for performing different actions (create, list -- fetchAll, fetch, update,...) which can accept all the necessary parameters as an array.

The following are the available operations and methods (all sample codes are based on the demo configuration above):

  1. customer: To initiatiate any customer operation:

    Distinct methods available to customer:

    • whitelist --> whitelist a particular customer.Example:

    • blacklist --> blacklist a particular customer.Example:
  2. transaction: To initiate a transaction operation:

    Distinct methods available to transaction:

    • initialize --> initialize a transaction; an authorization url is generated from this method after which the redirect method can then be called to redirect to the payment page. Example:

    • verify --> verify a transaction.Example:

    • charge --> charge authorization for recurring transactions.Example:

    • timeline --> timeline for a particular transactions.Example:

    • total --> get total for transactions within a specified range.Example:

    • export --> export a range of transaction details;a url is generated from this method from which the file can be downloaded. To get the path simpley call the path method or call the download method to download the file. Example:

    OR to download the file, call:

  3. subscription: To initiate a subscription operation:

    Distinct methods available to subscription:

    • enable --> enable a customer subscription.Example:

    • disable --> disable a customer subscription.Example:
  4. subaccount: To initiate a subaccount operation:

    Distinct methods available to subaccount:

    • listBank --> list the available bank for creating subaccounts on the system.Example:
  5. plan: To initiate a plan operation:

    Plan operation contains all the basic methods (create,fetch,fetchAll,update);

  6. page: To initiate a page operation:

    Distinct methods available to page:

    • checkAvailability --> check the availability of a particular slug.Example:
  7. settlement: To initiate a settlement operation:

    Distinct methods available to settlement:

    • fetchAll --> fetch all settlements.Example:

The follwing methods are also available:

Handling Events

The component also supports event handling before and after every request. You can read more on YII2 EVENTS [HERE] (http://www.yiiframework.com/doc-2.0/guide-concept-events.html). You can set the event handler by configuring the property beforeSend - (event before sending the request) and the afterSend - (event after sending the request). The event handlers can be set for all operations or for specific operations; event handlers set for specific operations overwrites the one set for all operations. Example:

Using the Paystack Inline Payment Widget

To use the widget, call the widget from your view and set the widget parameters, example:


All versions of yii2-paystack with dependencies

PHP Build Version
Package Version
Requires yiisoft/yii2 Version >2.0.1
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 smladeoye/yii2-paystack contains the following files

Loading the files please wait ....