forked from ebozkurt/huawei-mobile-service
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ekrem BOZKURT
committed
May 18, 2020
1 parent
04f1f97
commit 4e22c94
Showing
3 changed files
with
70 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<?php | ||
|
||
namespace Teknasyon\HuaweiMobileService; | ||
|
||
use Teknasyon\HuaweiMobileService\InAppPurchase\Resource\CancelledPurchases; | ||
use Teknasyon\HuaweiMobileService\InAppPurchase\Resource\PurchasesOrders; | ||
|
||
class OrderPublisher | ||
{ | ||
public $purchases_orders; | ||
public $purchases_subscriptions; | ||
public $cancelled_purchases; | ||
|
||
public $rootUrl; | ||
public $version; | ||
public $serviceName; | ||
private $client; | ||
|
||
/** | ||
* @param $client | ||
* @param string $rootUrl The root URL used for requests to the service. | ||
*/ | ||
public function __construct($client, $rootUrl = null) | ||
{ | ||
$this->client = $client; | ||
$this->rootUrl = $rootUrl ?: 'https://subscr-dre.iap.hicloud.com/'; | ||
$this->version = 'v2'; | ||
$this->serviceName = 'hmsPublisher'; | ||
|
||
$this->purchases_orders = new PurchasesOrders( | ||
$this, | ||
'orders', | ||
array( | ||
'methods' => array( | ||
'get' => array( | ||
'path' => '/applications/purchases/tokens/verify', | ||
'httpMethod' => 'POST', | ||
'parameters' => array(), | ||
), | ||
) | ||
) | ||
); | ||
|
||
$this->cancelled_purchases = new CancelledPurchases( | ||
$this, | ||
'cancelled', | ||
array( | ||
'methods' => array( | ||
'cancelledList' => array( | ||
'path' => '/applications/' . $this->version . '/purchases/cancelledList', | ||
'httpMethod' => 'POST', | ||
'parameters' => array(), | ||
), | ||
) | ||
) | ||
); | ||
} | ||
|
||
public function getClient() | ||
{ | ||
return $this->client; | ||
} | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters