| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 31 | public function getTransaction($transactionCode, $isSimple = false) |
||
| 32 | { |
||
| 33 | $client = new Client([ |
||
| 34 | 'base_uri' => $this->env->getUri(), |
||
| 35 | //'http_errors' => false |
||
| 36 | ]); |
||
| 37 | |||
| 38 | $xml = $client->get("/v3/transactions/{$transactionCode}", ['query' => [ |
||
| 39 | 'email' => $this->env->getCredential(), |
||
| 40 | 'token' => $this->env->getToken() |
||
| 41 | ]])->getBody()->getContents(); |
||
| 42 | $doc = new \DOMDocument(); |
||
| 43 | $doc->loadXML($xml); |
||
| 44 | return !$isSimple ? $doc : $xml; |
||
| 45 | } |
||
| 66 | } |