Skip to content

Instantly share code, notes, and snippets.

@brycejacobson
Last active July 26, 2017 14:03
Show Gist options
  • Save brycejacobson/930b0eaeb1383423bed61bd5424d40bf to your computer and use it in GitHub Desktop.
Save brycejacobson/930b0eaeb1383423bed61bd5424d40bf to your computer and use it in GitHub Desktop.
Send extra info along to Authorize.net from Gravity Forms
<?php
// Functions for apending form name to authorize.net invoice
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'] == 3) {
$donation_type = rgar($entry, '6');
$honor_memory = rgar($entry, '10');
$transaction->description = "Donation Type: $donation_type ---- Honor/Memory: $honor_memory";
}
return $transaction;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment