1 | <?php |
||
2 | |||
3 | namespace Srmklive\PayPal\Traits\PayPalAPI\Orders; |
||
4 | |||
5 | use Throwable; |
||
6 | |||
7 | trait Helpers |
||
8 | { |
||
9 | /** |
||
10 | * Confirm payment for an order. |
||
11 | * |
||
12 | * @param string $order_id |
||
13 | * @param string $processing_instruction |
||
14 | * |
||
15 | * @throws Throwable |
||
16 | * |
||
17 | * @return array|\Psr\Http\Message\StreamInterface|string |
||
18 | */ |
||
19 | public function setupOrderConfirmation(string $order_id, string $processing_instruction = '') |
||
20 | { |
||
21 | $body = [ |
||
22 | 'processing_instruction' => $processing_instruction, |
||
23 | 'application_context' => $this->experience_context, |
||
24 | 'payment_source' => $this->payment_source, |
||
25 | ]; |
||
26 | |||
27 | return $this->confirmOrder($order_id, $body); |
||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||
28 | } |
||
29 | } |
||
30 |