cancel
Showing results for 
Search instead for 
Did you mean: 

Customer ID field ID

Hi - My client needs to send a customer ID to Authorize.net via a custom form.  (I'm using gravity forms/wordpress - so the code below is the hook I needed to add to my functions.php in order to pass a new field input to Auth.net.) 

 

I believe I just need to replace "your_field_name" with the actual id of the Customer ID field in authorize.  Any clues where I'd find this or does anyone know?

 

 

add_filter( 'gform_authorizenet_transaction_pre_capture', 'add_custom_field', 10, 5 );
function add_custom_field( $transaction, $form_data, $config, $form, $entry ) {
    if ( $form['id'] == 9 ) {
        $value = rgpost( 'input_9');
        $transaction->setCustomField( 'your_field_name', $value );
    }
 
    return $transaction;
}

 

staceyzav
Member
3 REPLIES 3

 

The field name is cust_id, so in this case you would use:

$transaction->cust_id = $value;

 

zestsms
Member

I want to do the same thing. Gravity Forms gives this example

 

add_filter( 'gform_authorizenet_transaction_pre_capture', 'add_custom_field', 10, 5 );
function add_custom_field( $transaction, $form_data, $config, $form, $entry ) {
if ( $form['id'] == 1 ) {
$value = rgpost( 'input_6');
$transaction->setCustomField( 'Patient_Account_Number', $value );
}

return $transaction;
}

 

Will this pass the patient account number to Authorize?

I want to do the same thing. Gravity Forms gives this example

 

add_filter( 'gform_authorizenet_transaction_pre_capture', 'add_custom_field', 10, 5 );
function add_custom_field( $transaction, $form_data, $config, $form, $entry ) {
if ( $form['id'] == 1 ) {
$value = rgpost( 'input_6');
$transaction->setCustomField( 'Patient_Account_Number', $value );
}

return $transaction;
}

 

Will this pass the patient account number to Authorize?