You are here

public function PayPalCheckoutClient::captureOrder in Commerce PayPal 7.2

Capture payment for order.

Parameters

$remote_id: The PayPal order ID.

Return value

string[] The API response JSON converted to an associative array.

File

modules/checkout/lib/PayPalCheckoutClient.php, line 235
Defines a class for consuming the PayPal Checkout API.

Class

PayPalCheckoutClient
Defines the PayPalCheckoutClient class.

Code

public function captureOrder($remote_id) {
  return $this
    ->submitRequest('POST', sprintf('v2/checkout/orders/%s/capture', $remote_id));
}