2017 © Pedro Peláez
 

library mnpy-php-api-sdk

PHP SDK for the MNPY API.

image

mnpy/mnpy-php-api-sdk

PHP SDK for the MNPY API.

  • Sunday, March 18, 2018
  • by mnpy
  • Repository
  • 1 Watchers
  • 0 Stars
  • 20 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

MNPY - PHP API SDK

MNPY | Documentation, (*1)

Start accepting over hundreds cryptocurrencies without minimum costs, fixed contracts and hidden costs. At MNPY you pay for successful transactions only. Read more at MNPY., (*2)

Requirements

It's easy to start using MNPY, you need;, (*3)

  • PHP >7.0
  • A MNPY account
  • A Ethereum wallet, preferably ERC20 compliant

Installation

You are encouraged to install the PHP SDK using Composer., (*4)

$ composer require mnpy/mnpy-php-api-sdk

Optionally, you can checkout the git repository and manually load the required files., (*5)

Getting started

Require the autoloader generated by Composer (or build your own) and initialize one of the resources. In this example we will use the Transaction resource., (*6)

$transaction = new Transaction('API_KEY');

optinally, you can set the API key by calling the setApiKey method on the resource like so;, (*7)

$transaction->setApiKey('API_KEY');

Now you can create a transaction by calling the create method. The method signature is as following:, (*8)

public function create(string $merchant_name, float $price, string $address, string $redirect_url, array $options);

Where the options are all the additional parameters as defined in the documentation. When taking this in account we can create a transaction like so;, (*9)

$tx = $transaction->create(
   'MNPY Store',
   100,
   '0x960819D261AbaF8df1F7cc0b8Cb5CaA30410cC6f',
   'https://mnpy.io/',
   [
        'fee'  => 5,
        'code' => 'VEN'
   ]
);

If succesful, $tx will now contain all the required transaction data., (*10)

To retrieve a transaction, you can simply do;, (*11)

$tx = $transaction->get($tx->uuid);

echo $tx->status;

License

BSD (Berkeley Software Distribution) License. Copyright © 2018 MNPY, (*12)

The Versions

18/03 2018

dev-master

9999999-dev

PHP SDK for the MNPY API.

  Sources   Download

The Requires

 

The Development Requires

18/03 2018

v0.1.0

0.1.0.0

PHP SDK for the MNPY API.

  Sources   Download

The Requires

 

The Development Requires

18/03 2018

dev-release/0.1.0

dev-release/0.1.0

PHP SDK for the MNPY API.

  Sources   Download

The Requires

 

The Development Requires