| Conditions | 2 |
| Paths | 2 |
| Total Lines | 18 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 12 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 35 | 2 | public function sendData($data): ResponseInterface |
|
| 36 | { |
||
| 37 | 2 | if (empty($this->getTransactionReference())) { |
|
| 38 | 1 | throw new InvalidRequestException('Transaction reference missing for refund request.'); |
|
| 39 | } |
||
| 40 | |||
| 41 | 1 | $this->sendRequest( |
|
| 42 | 1 | Request::METHOD_POST, |
|
| 43 | 1 | sprintf( |
|
| 44 | 1 | '/transaction/%s/refund', |
|
| 45 | 1 | $this->getTransactionReference() |
|
| 46 | ), |
||
| 47 | 1 | $data |
|
| 48 | ); |
||
| 49 | |||
| 50 | 1 | return new RefundResponse( |
|
| 51 | 1 | $this, |
|
| 52 | 1 | $this->getResponseBody() |
|
| 53 | ); |
||
| 56 |