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;
}
01-30-2018 01:32 PM
The field name is cust_id, so in this case you would use:
$transaction->cust_id = $value;
03-08-2018 11:33 AM
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?
04-24-2019 01:54 PM
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?
04-24-2019 01:56 PM