Filter
rpress_paypal_refund_body_args
On this page
Filters the body fields sent to PayPal when refunding a payment.
Runs in rpress_refund_paypal_purchase after the credentials are resolved. The body is the NVP parameter array: USER, PWD, SIGNATURE, VERSION, METHOD (RefundTransaction), TRANSACTIONID and REFUNDTYPE (Full). Add or change fields to send extra data with the refund request.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$body | array | NVP request fields keyed by parameter name. |
$payment | RPRESS_Payment | The payment being refunded. |
Return value#
array. The request body to send.
Example#
function my_paypal_refund_body( $body, $payment ) {
$body['NOTE'] = 'Refund for order ' . $payment->ID;
return $body;
}
add_filter( 'rpress_paypal_refund_body_args', 'my_paypal_refund_body', 10, 2 );
Source#
Applied in:
includes/gateways/paypal-standard.php(line 2183), inrpress_refund_paypal_purchase()
See also#
Was this page helpful?
