nickescobedo / microbilt-php
Microbilt 网络服务 API 的 PHP 客户端。
v1.1
2022-08-17 14:48 UTC
Requires
- guzzlehttp/guzzle: ^6.3
Requires (Dev)
- mockery/mockery: ^1.2
- phpunit/phpunit: ^7.5
This package is auto-updated.
Last update: 2024-09-20 00:26:10 UTC
README
Microbilt 网络服务 API 的 PHP 客户端。
https://developer.microbilt.com
安装
composer require nickescobedo/microbilt-php
快速开始
$client = new \NickEscobedo\MicroBilt\Client([
'client_id' => '',
'client_secret' => '',
]);
$transUnionReport = $client->transUnion(['your data parameters here']);
配置
client_id
必须提供
client_secret
必须提供
mode
可选(默认为 live)。其他选项是 sandbox。
用法
查看 https://developer.microbilt.com 获取每个函数所需的必要参数。数据应作为数组传递。数组在发送到他们的 API 之前被转换为 JSON。
$client = new \NickEscobedo\MicroBilt\Client([
'client_id' => '',
'client_secret' => '',
]);
// Data structure taken from https://developer.microbilt.com/transunion/apis/post/GetReport
$response = $client->transUnion([
"PersonInfo"=> [
"PersonName"=> [
"FirstName"=> '',
"LastName"=> '',
"MiddleName"=> '',
],
"ContactInfo"=> [
"PostAddr"=> [
"StreetNum"=> '',
"StreetName"=> '',
"City"=> '',
"StateProv"=> '',
"PostalCode"=> '',
]
],
"TINInfo"=> [
"TINType"=> '1',
"TaxId"=> '',
]
]
])