gform_paypalpaymentspro_api_before_send

gform_paypalpaymentspro_api_before_send

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.

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注