bitmoney/php-api-client

There is no license information available for the latest version (v0.1) of this package.

Bitmoney PHP API client

v0.1 2018-02-21 08:40 UTC

This package is auto-updated.

Last update: 2024-04-15 03:56:52 UTC


README

Installation

Run following command To install stable version of API client for PHP:

php composer.phar require bitmoney/php-api-client

Usage

First of all, you should instantiate Client object:

<?php

$client = new \Bitmoney\Api\Client($clientId, $clientSecret);

Creating new transaction request

To create new transaction request:

<?php

// ... create client

$params = [
    'firstName' => 'John',
    'lastName' => 'Doe',
    'email' => 'john.doe@gmail.com',
    'price' => 10,
    'currency' => 'EUR',
    'wallet' => '1DGeaqRLd7Ko75MXdxtRsMfTuBuduMHANP',
    'merchant' => 'bankcontract',
    'ip' => '65.222.1.139',
];

$newPaymentRequest = \Bitmoney\Api\Request\NewTransactionRequest::build($params);
$newPaymentResponse = $client->newTransaction($newPaymentRequest);

Checking transaction details

To check transaction details:

<?php

// ... create client

$paymentReceipt = $client->transactionDetails($transactionId);

Requesting merchants list

To request list of avaliable merchants:

<?php

// ... create client

$requestMerchantsResponse = $client->paymentMethods();