public function PayPalCheckoutClient::capturePayment in Commerce PayPal 7.2
Captures an authorized payment, by ID.
Parameters
$authorization_id: The PayPal-generated ID for the authorized payment to capture.
array $parameters: (optional An array of parameters to pass as the request body.
Return value
string[] The API response JSON converted to an associative array.
File
- modules/
checkout/ lib/ PayPalCheckoutClient.php, line 250 - Defines a class for consuming the PayPal Checkout API.
Class
- PayPalCheckoutClient
- Defines the PayPalCheckoutClient class.
Code
public function capturePayment($authorization_id, array $parameters = array()) {
return $this
->submitRequest('POST', sprintf('v2/payments/authorizations/%s/capture', $authorization_id), $parameters);
}