PHP code example of teknasyon / huawei-mobile-service
1. Go to this page and download the library: Download teknasyon/huawei-mobile-service library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
teknasyon / huawei-mobile-service example snippets
$client = new HuaweiClient($this->credentials);
if ($logger != null) {
$client->setLogger($logger);
}
if ($redis != null) {
$client->setRedis($redis);
}
$publisherService = new Publisher($client);
$subcriptionGetRequest = new SubscriptionGetRequest();
$subcriptionGetRequest->setSubscriptionId($subscriptionId);
$subcriptionGetRequest->setPurchaseToken($purchaseToken);
$purchase = $publisherService->purchases_subscriptions->get($subcriptionGetRequest);