PHP code example of remitano / remitano-php
1. Go to this page and download the library: Download remitano/remitano-php library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
remitano / remitano-php example snippets
$client = new Remitano\Api\RemitanoClient([
'apiKey' => 'your-api-key',
'apiSecret' => 'your-api-secret',
'authenticatorSecret' => 'your-authenticator-secret'
]);
$merchant_charges = new Remitano\Api\Merchant\Charge($client);
$merchant_charges->get($id);
$merchant_charges->create([
"coin_currency" => "usdt",
"coin_amount" => 10.99,
"cancelled_or_completed_callback_url" =>"https://example.com/payments/callback?id=example",
"description" => "Example charge"
]);
$merchant_charges->create([
"fiat_currency" => "AUD",
"fiat_amount" => 100.99,
"cancelled_or_completed_callback_url" =>"https://example.com/payments/callback?id=example",
"description" => "Example charge"
]);
$merchant_withdrawals = new Remitano\Api\Merchant\Withdrawal($client);
$merchant_withdrawals->get($id);
$merchant_withdrawals->create([
"merchant_withdrawal_ref" => "123",
"coin_currency" => "btc",
"coin_amount" => 1,
"receiver_pay_fee" => true,
"cancelled_or_completed_callback_url" => "http://sample.com/123/callback",
"coin_address" => "3CpwViK5RAMzT8AmaMFHVHyfoyQSwNPB6y"
]);
$merchant_withdrawals->create([
"merchant_withdrawal_ref" => "123",
"coin_currency" => "btc",
"coin_amount" => 1,
"receiver_pay_fee" => true,
"cancelled_or_completed_callback_url" => "http://sample.com/123/callback",
"remitano_username" => "receiver123",
"remitano_phone_number" => "+234 1 123 4567"
]);
$client->get('users/coin_accounts');
$client->post('offers/best', [
"country_code" => "my",
"offer_type" => "buy",
"coin_currency" => "btc",
"coin_amount" => 1
]);
bash
$ composer