public function PayPalCheckoutClient::refundPayment in Commerce PayPal 7.2
Refunds a captured payment, by ID.
Parameters
$capture_id: The PayPal-generated ID for the captured payment to refund.
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 280 - Defines a class for consuming the PayPal Checkout API.
Class
- PayPalCheckoutClient
- Defines the PayPalCheckoutClient class.
Code
public function refundPayment($capture_id, array $parameters = array()) {
return $this
->submitRequest('POST', sprintf('v2/payments/captures/%s/refund', $capture_id), $parameters);
}