Total Complexity | 3 |
Total Lines | 45 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | class CompleteAuthoriseAndCaptureRequest extends AbstractRequest |
||
13 | { |
||
14 | /** |
||
15 | * {@inheritdoc} |
||
16 | */ |
||
17 | 1 | public function getData(): array |
|
24 | } |
||
25 | |||
26 | /** |
||
27 | * {@inheritdoc} |
||
28 | */ |
||
29 | 1 | public function sendData($data): ResponseInterface |
|
30 | { |
||
31 | 1 | $this->sendRequest( |
|
32 | 1 | Request::METHOD_POST, |
|
33 | 1 | sprintf( |
|
34 | 1 | '/transaction/%s', |
|
35 | 1 | $this->getTransactionReference() |
|
36 | ), |
||
37 | 1 | $data |
|
38 | ); |
||
39 | |||
40 | 1 | return new CompleteAuthoriseAndCaptureResponse( |
|
41 | 1 | $this, |
|
42 | 1 | $this->getResponseBody() |
|
43 | ); |
||
44 | } |
||
45 | |||
46 | /** |
||
47 | * Get the HttpRequest. |
||
48 | * Note: this is not an API request. |
||
49 | * |
||
50 | * @see Omnipay\Common\Message\AbstractRequest::$httpRequest |
||
51 | * |
||
52 | * @return Request |
||
53 | */ |
||
54 | 2 | public function getHttpRequest(): Request |
|
57 | } |
||
58 | } |
||
59 |