gform_paypalpaymentspro_args_before_send

Description

Allows the transaction arguments to be modified before posted to PayPal.

Usage

add_filter( 'gform_paypalpaymentspro_args_before_send', 'your_function_name', 10, 2 );

Parameters

  • $nvp array

    The transaction arguments.

     
        Array
        (
            [ACCT] => 4111111111111111
            [EXPDATE] => 1232
            [CVV2] => 111
            [STREET] => 
            [BILLTOSTREET2] => 
            [CITY] => 
            [STATE] => 
            [ZIP] => 
            [BILLTOCOUNTRY] => 
            [CURRENCY] => USD
            [FIRSTNAME] => x
            [LASTNAME] => d
            [EMAIL] => dana@rocketgenius.com
            [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

add_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.