inarli / iys-php-client
İleti Yönetim Sistemi (iys.org.tr) Api Servisleri İçin Php Client Kütüphanesi
Installs: 1 657
Dependents: 0
Suggesters: 0
Security: 0
Stars: 12
Watchers: 1
Forks: 8
Open Issues: 0
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
Example:
$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" ] }
Covered services
- Authentication Service
- Consent Management Service
Todos
- Tests
- Brand Management Service
- Retailer Management Service
- Retailer Management Service
- Agreement Management Service
- Info Services