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