Download the PHP package hngx/moneywave-php without Composer

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

moneywave-php

Latest Stable Version Total Downloads License Latest Unstable Version

PHP wrapper for the Moneywave API Please consult the official documentation for more details.

Contents

Configuration

To carry out a transaction or access a resource, you will need an instance of the moneywave client This will be used for your API calls.

Usage: Dispatching Transactions/Resources

Performing Transactions

To perform a transaction, there are 3 simple steps:

  1. Create the transaction. All transactions take the moneywave client instance as a constructor argument. The WalletToAccountTransaction and BulkWalletToAccountTransaction transactions also take a second parameter: the wallet password

  2. Set the appropriate details All the fields listed for each transaction in the docs are available as properties on the transaction class (via magic methods), so you can set them individually. Alternatively, you could use the setDetails() function to set them in one go. Caution: be sure to use the exact parameter names (including capitalisation) as described at https://moneywave.flutterwave.com/api. The following fields are automatically set for you on each transaction:

    Field Default
    apiKey the API key used when creating the Moneywave client
    secret the secret key used when creating the Moneywave client
    currency "NGN"
    lock (for WalletToAccountTransaction and BulkWalletToAccountTransaction) the wallet password supplied in the constructor
  3. Dispatch the transaction by calling dispatch()

Here is an example:

Available Transaction Types

Available bank codes

Here is the list of banks currently supported by the Moneywave API. Their codes are available as constants in the \HngX\Moneywavw\Bank class:

Accessing a Resource

The same 3 steps apply:

  1. Create the resource. All resources take the moneywave client instance as their only constructor argument.

  2. Set the appropriate details, if any. The GetWalletBalance do not need any extra data All the fields listed for each resource in the docs are available as properties on the resource class (via magic methods), so you can set them individually. Alternatively, you could use the setDetails() function to set them in one go. Caution: be sure to use the exact parameter names (including capitalisation) as described at https://moneywave.flutterwave.com/api. The following fields are automatically set for you on each resource:

    Field Default
    apiKey the API key used when creating the Moneywave client
    secret the secret key used when creating the Moneywave client
  3. Dispatch the resource by calling dispatch().

Here is an example:

Available Resource Types

Usage: Handling Responses

After dispatching a transaction or resource, you may access the full response by calling getResponse() on the object.

You can also find out the status alone by calling getStatus().

You may also call successful() directly to test if the status of the response was success: Caution: According to Moneywave, "success" does not neccessarily mean The transaction has gone through. Consult the official docs for more details

Validating Transactions

According to the docs, the two transaction types AccountToAccountTransaction and CardToAccountTransaction may also need validation after being dispatched. To do that, simply call validate() on the transaction object with the appropriate data:

Note: after this, calling getResponse() or getStatus() will return the response or status for the validation process

Usage: Errors

You will get an instance of \HngX\MoneywaveException if you do anything naughty.

Installation

Bugs

If you notice any bugs, please create a new issue. We will attend to it promptly.


All versions of moneywave-php with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4
guzzlehttp/guzzle Version ^6.2
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 hngx/moneywave-php contains the following files

Loading the files please wait ....