aestron / aestron-openapi-sdk

Aestron openapi sdk for PHP - 在您的PHP项目中使用Aestron openapi sdk客户端

1.0 2020-12-08 02:42 UTC

This package is auto-updated.

Last update: 2024-09-25 17:26:26 UTC


README

在您的PHP项目中使用Aestron openapi sdk客户端

安装

composer require aestron/aestron-openapi-sdk

演示

<?php
use AestronSdk\Sms\SmsClient;
use AestronSdk\Exception\ClientException;

SmsClient::setAppId('z3i0plp74s22rj');
SmsClient::setCertificate('yRC3vrpUFgpSpw');
try {
    $res = SmsClient::send([
        'to' => '8615826666666',
        'content' => 'Do not go gentle into that good night.',
        'from' => 'BIGO',
        'type' => 'OTP',
        'session' => '168201771',
    ]);
    var_export($res);
} catch (\Exception $e) {
    var_export($e->getMessage());
    var_export(SmsClient::getLastRequestParam());
}