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