Conditions | 2 |
Paths | 2 |
Total Lines | 19 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
33 | public function sendData($data) |
||
34 | { |
||
35 | $body = $data ? http_build_query($data, '', '&') : null; |
||
36 | $response = $this->httpClient->request( |
||
37 | $this->getHttpMethod(), |
||
38 | $this->getEndpoint(), |
||
39 | [ |
||
40 | 'SDK-TYPE' => 'Omnipay-SDK', |
||
41 | 'SDK-VERSION' => $this->sdkVersion, |
||
42 | 'Authorization' => 'Basic '.base64_encode($this->getApiKey().':'), |
||
43 | 'Content-Type' => 'application/x-www-form-urlencoded' |
||
44 | ], |
||
45 | $body |
||
46 | ); |
||
47 | |||
48 | $data = json_decode($response->getBody(), true); |
||
49 | |||
50 | return $this->createResponse($data); |
||
51 | } |
||
52 | |||
66 |