gform_paypalpaymentspro_api_before_send

Note: This add-on is no longer supported and is no longer available for download. We recommend the PayPal Checkout Add-On instead. See Migrating From Legacy PayPal Add-Ons to the PayPal Checkout Add-On.

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.