| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 28 | public function sendData($data) |
||
| 29 | { |
||
| 30 | $headers = [ |
||
| 31 | 'Accept' => 'application/json', |
||
| 32 | 'Content-Type' => 'application/json', |
||
| 33 | 'Authorization' => 'Basic ' . $this->getAuthorization(), |
||
| 34 | ]; |
||
| 35 | |||
| 36 | $httpResponse = $this->httpClient->request('POST', $this->getEndpoint('transactions'), $headers, json_encode($data)); |
||
| 37 | |||
| 38 | try { |
||
| 39 | $responseData = json_decode($httpResponse->getBody()->getContents()); |
||
| 40 | } catch (\Exception $exception) { |
||
| 41 | $responseData = []; |
||
| 42 | } |
||
| 43 | |||
| 44 | return $this->response = new RefundResponse($this, $responseData ?? []); |
||
| 45 | } |
||
| 46 | } |