Last active
July 26, 2017 14:03
-
-
Save brycejacobson/930b0eaeb1383423bed61bd5424d40bf to your computer and use it in GitHub Desktop.
Send extra info along to Authorize.net from Gravity Forms
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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