| Total Complexity | 2 |
| Total Lines | 23 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class SubscriptionVerificationRequest extends AbstractVerificationRequest |
||
| 8 | { |
||
| 9 | const API_VERSION = 'v2'; |
||
| 10 | const VERIFICATION_URL_MASK = '/sub/applications/%s/purchases/get'; |
||
| 11 | |||
| 12 | public function do(): ResponseInterface |
||
| 13 | { |
||
| 14 | $url = $this->getUrl(); |
||
| 15 | |||
| 16 | $jsonBody = [ |
||
| 17 | 'subscriptionId' => $this->purchaseData->getSubscriptionId(), |
||
| 18 | 'purchaseToken' => $this->purchaseData->getPurchaseToken(), |
||
| 19 | ]; |
||
| 20 | |||
| 21 | return $this->httpClient->request('POST', $url, [ |
||
| 22 | 'headers' => $this->headers, |
||
| 23 | 'json' => $jsonBody, |
||
| 24 | ]); |
||
| 25 | } |
||
| 26 | |||
| 27 | protected function getUrl(): string |
||
| 30 | } |
||
| 31 | } |
||
| 32 |