inarli / iys-php-client
İleti Yönetim Sistemi (iys.org.tr) Api Servisleri İçin Php Client Kütüphanesi
1.0.7
2021-01-11 14:17 UTC
Requires
- php: >=5.6
- ext-curl: *
- ext-json: *
Requires (Dev)
- symfony/var-dumper: ^5.1
Suggests
- giggsey/libphonenumber-for-php: Telefon numaralarını İleti Yönetim sistemi'nin talep ettiği E164 biçiminde biçimlendirmenize yardımcı olur
README
示例
$apiUri = 'https://api.sandbox.iys.org.tr'; $iysBrandCode = 'YOUR_BRAND_CODE'; $iysCode = 'YOUR_IYS_CODE'; // test account $email = 'YOUR_MAIL'; $password = 'YOUR_PASSWORD'; $iys = new Iys\IysApi($apiUri,$iysCode,$iysBrandCode); // login to iys system $login = $iys->authentication->loginWithOauth2($email, $password); if ($login instanceof \Iys\Auth\Response\Token){ $iys->setToken($login->getAccessToken()); $iys->setRefreshToken($login->getRefreshToken()); } // create a consent $phoneNumber = '+905050000000'; $email = 'dummy@email.com'; $date = date('Y-m-d H:i:s'); $consentModel = $iys->consentManagement->generateConsent($email, Iys\ConsentManagement\Enum\ConsentType::EMAIL, Iys\ConsentManagement\Enum\ConsentSource::WEB, Iys\ConsentManagement\Enum\ConsentStatus::APPROVE, $date, Iys\ConsentManagement\Enum\RecipientType::INDIVIDUAL); $result = $iys->consentManagement->createSingleConsent($consentModel); // All request returns a HttpResponse object. // Typically response looks like this Iys\HttpResponse {#37 -statusCode: 200 -errors: null -errorCode: null -message: null -data: array:2 [ "transactionId" => "e9815a44f852aec77648c0f5e2eec67fda0fdb23b2ff1de72be1a4e80ce04f14" "creationDate" => "2020-08-24 11:46:44" ] }
覆盖的服务
- 认证服务
- 同意管理服务
待办事项
- 测试
- 品牌管理服务
- 零售商管理服务
- 零售商管理服务
- 协议管理服务
- 信息服务