2017 © Pedro Peláez
 

library merchant-php-sdk

Cryptonator.com Merchant API SDK for PHP

image

cryptonator/merchant-php-sdk

Cryptonator.com Merchant API SDK for PHP

  • Sunday, October 9, 2016
  • by cryptonator
  • Repository
  • 4 Watchers
  • 20 Stars
  • 2,007 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 7 Forks
  • 1 Open issues
  • 1 Versions
  • 24 % Grown

The README.md

PHP Cryptonator.com Merchant API SDK

Requirements

PHP 5.3 or above, (*1)

  1. Cryptonator MerchantAPI Help Center: Ru, En

Getting started

Installation

  1. Add "cryptonator/merchant-php-sdk": "dev-master" to composer.json of your application or clone repo to your project.
  2. If you are using composer use require_once 'vendor/autoload.php'; otherwise paste the following line php require_once '/path/to/cloned/repo/lib/MerchantAPI.php';

Merchant API

Using Cryptonator MerchantAPI SDK requires the following steps, (*2)

  1. Paste the following code. Note: constants merchant_id and secret you will find in your account settings once you have set up a merchant account with Cryptonator., (*3)

    use cryptonator\MerchantAPI;
    
    $cryptonator = new MerchantAPI(merchant_id, secret);
    
  2. Now you can use Cryptonator MerchantAPI., (*4)

    // start payment
    $url = $cryptonator->startPayment(array(
       'item_name'               => 'Item Name',
       //'order_id'              => 'Order ID',
       //'item_description'      => 'Item Description',
       'invoice_amount'          => 'Invoice Amount',
       'invoice_currency'        => 'Invoice Currency',
       //'success_url'           => 'Success URL',
       //'failed_url'            => 'Failed URL',
       //'language'              => 'Language',
    ));
    
    // create invoice
    $invoice = $cryptonator->createInvoice(array(
        'item_name'               => 'Item Name',
        //'order_id'              => 'Order ID',
        //'item_description'      => 'Item Description',
        'checkout_currency'       => 'Checkout Amount',
        'invoice_amount'          => 'Invoice Amount',
        'invoice_currency'        => 'Invoice Currency',
        //'success_url'           => 'Success URL',
        //'failed_url'            => 'Failed URL',
        //'language'              => 'Language',
     ));
    
    // get invoice
    $invoice = $cryptonator->getInvoice('InvoiceID');
    
    // list invoices
    $invoices = $cryptonator->listInvoices(array(
        //'invoice_status'       => 'Invoice Status',
        //'invoice_currency'     => 'Invoice Currency',
        //'checkout_currency'    => 'Checkout Currency',
    ));
    
    // check annswer
    $check_server = $cryptonator->checkAnswer($_POST);
    

The Versions

09/10 2016

dev-master

9999999-dev

Cryptonator.com Merchant API SDK for PHP

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

php payment merchant sdk cryptonator cryptonator.com