Filter
rpress_paypal_refund_api_credentials
On this page
Filters the PayPal NVP API credentials used when refunding a payment.
Runs in rpress_refund_paypal_purchase before the refund request body is built. The array holds the API endpoint and the username, password and signature read from the gateway settings for the payment's mode. Use it to supply credentials from a secure location or to change the endpoint.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$credentials | array | Associative array with the keys api_endpoint, api_username, api_password and api_signature. |
$payment | RPRESS_Payment | The payment being refunded. |
Return value#
array. The credentials array; all four keys are read afterwards.
Example#
function my_paypal_refund_credentials( $credentials, $payment ) {
if ( defined( 'MY_PAYPAL_API_SIGNATURE' ) ) {
$credentials['api_signature'] = MY_PAYPAL_API_SIGNATURE;
}
return $credentials;
}
add_filter( 'rpress_paypal_refund_api_credentials', 'my_paypal_refund_credentials', 10, 2 );
Source#
Applied in:
includes/gateways/paypal-standard.php(line 2173), inrpress_refund_paypal_purchase()
See also#
Was this page helpful?
