gform_paypalpaymentspro_args_before_send

gform_paypalpaymentspro_args_before_send

DescriptionUsageParametersExamplesSource Code

Description
Allows the transaction arguments to be modified before posted to PayPal.
Usage
1add_filter( 'gform_paypalpaymentspro_args_before_send', 'your_function_name', 10, 2 );

Parameters

$nvp array
The transaction arguments.
12345678910111213141516171819202122232425Array(    [ACCT] => 4111111111111111    [EXPDATE] => 1232    [CVV2] => 111    [STREET] =>     [BILLTOSTREET2] =>     [CITY] =>     [STATE] =>     [ZIP] =>     [BILLTOCOUNTRY] =>     [CURRENCY] => USD    [FIRSTNAME] => x    [LASTNAME] => d    [EMAIL] => [email protected]    [DESC] =>     [L_NAME0] => T-Shirt    [L_DESC0] =>     [L_AMT0] => 20    [L_NUMBER0] => 1    [L_QTY0] => 2    [AMT] => 40    [TENDER] => C    [TRXTYPE] => S)

$form_id int
The ID of the current form.

Examples
12345add_filter( 'gform_paypalpaymentspro_args_before_send', 'change_args', 10, 2 );function change_args( $nvp, $form_id ){    $nvp['LASTNAME'] = 'Testing';    return $nvp;}
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.

發表回覆

您的郵箱地址不會被公開。 必填項已用 * 標註