From 10c786fdb910cf1746ee7bf85ce100e73507806d Mon Sep 17 00:00:00 2001 From: Alex P Date: Wed, 9 Feb 2022 16:27:23 +0200 Subject: [PATCH] Add final_capture=true --- modules/ppcp-api-client/src/Endpoint/PaymentsEndpoint.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/ppcp-api-client/src/Endpoint/PaymentsEndpoint.php b/modules/ppcp-api-client/src/Endpoint/PaymentsEndpoint.php index f27719de9..e470dba46 100644 --- a/modules/ppcp-api-client/src/Endpoint/PaymentsEndpoint.php +++ b/modules/ppcp-api-client/src/Endpoint/PaymentsEndpoint.php @@ -158,7 +158,9 @@ class PaymentsEndpoint { $bearer = $this->bearer->bearer(); $url = trailingslashit( $this->host ) . 'v2/payments/authorizations/' . $authorization_id . '/capture'; - $data = array(); + $data = array( + 'final_capture' => true, + ); if ( $amount ) { $data['amount'] = $amount->to_array(); }