You are here

public function PayPalCheckoutClient::voidPayment in Commerce PayPal 7.2

Voids, or cancels, an authorized payment, by ID.

Parameters

$authorization_id: The PayPal-generated ID of the authorized payment to void.

File

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

Class

PayPalCheckoutClient
Defines the PayPalCheckoutClient class.

Code

public function voidPayment($authorization_id) {
  return $this
    ->submitRequest('POST', sprintf('v2/payments/authorizations/%s/void', $authorization_id));
}