DescriptionUsageParametersExamplesPlacementSource Code
Description
Allows the API information to be modified before sending to PayPal Payments Pro.
Usage
add_filter( 'gform_paypalpaymentspro_api_before_send', 'your_function_name', 10, 2 );
Parameters
$api_info array
The API information: API_Endpoint, API_UserName, API_Password, Vendor, Partner.
$form_id int
The current form id.
Examples
add_filter( 'gform_paypalpaymentspro_api_before_send', 'change_paypal_endpoint', 10, 2 );
function change_paypal_endpoint ( $api_info, $form_id ){
$api_info['API_Endpoint'] = 'https://pilot-payflowpro.paypal.com';
return $api_info;
}
Placement
This code should be placed in the functions.php file of your active theme.
Source Code
This filter is located in GFPayPalPaymentsPro::post_to_payflow() in class-gf-paypalpaymentspro.php.