Conditions | 2 |
Paths | 5 |
Total Lines | 13 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
32 | public function capturePayment(string $orderId): ?HttpResponse |
||
33 | { |
||
34 | try { |
||
35 | $request = new OrdersCaptureRequest($orderId); |
||
36 | $request->headers["prefer"] = "return=representation"; |
||
37 | $client = $this->getHttpClient(); |
||
38 | $response = $client->execute($request); |
||
39 | } catch (Exception $e) { |
||
40 | $this->logger->error('Error on PayPal::capturePayment = ' . $e->getMessage()); |
||
41 | return null; |
||
42 | } |
||
43 | |||
44 | return $response; |
||
|
|||
45 | } |
||
68 |