unitylink / remitone
dev-main
2021-12-06 17:07 UTC
Requires
- guzzlehttp/guzzle: ^7.3
This package is auto-updated.
Last update: 2024-09-06 23:16:07 UTC
README
此包是用于与Unity Link的Remitone API交互的包装器
安装
> composer require unitylink/remitone
用法
use Unitylink\Remitone\Client;
$baseUrl = 'https://*****.remitone.com/ws/';
$group = '******'; //eg. rates
$method = '*******'; // eg. getRates
$path = "$group/$method";
$credentials = ['pin' => '******', 'username' => '***', 'password' => '****' ];
$parameters=[]; // eg. ['dest_country' => 'Ghana']
$client = new Client($baseUrl,$credentials);
echo $client->makeRequest($path,$parameters);
响应
该库以JSON格式返回结果
例如。
{
"responseId": "25579159",
"status": "SUCCESS",
"result": {
"rate": {
"account": "6.5",
"cash_collection": "7.9621",
"card": "6.5",
"home_delivery": "5.95111111",
"utility_bill": "6.5",
"mobile_transfer": "6.5"
},
"source_country": "United Kingdom",
"source_currency": {},
"dest_country": "Ghana",
"dest_currency": {}
}
}