ezlocate/ezlocate-php-sdk

用于EZ Locate API v1的PHP SDK

0.2.7 2022-01-17 16:33 UTC

This package is auto-updated.

Last update: 2024-09-17 22:06:35 UTC


README

PHP SDK for EZ Locate API.

安装

$ composer require ezlocate/ezlocate-php-sdk

用法

use \EZLocate\EZLocate;
use \EZLocate\Order;

const EZL_USERNAME = 'YOUR_EZL_USERNAME';
const EZL_ACCESS_TOKEN = 'YOUR_EZL_ACCESS_TOKEN';

$ezl = new EZLocate(EZL_USERNAME, EZL_ACCESS_TOKEN);

$data = [
    'notes' => 'My order notes',
    'ref' => 'XXXX',
    'ref_2' => 'YYYY',
    'person' => [
        'firstname' => 'John',
        'lastname' => 'Doe',
        'ssn' => 'XXXX'
    ]
];

$order = $ezl->createOrder($data);
print_r($order);

许可证

MIT许可证下发布。请参阅LICENSE文件。