PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Sending Additional Information to Authorize.net via Name/Value pairs

  1. reeserved
    Member

    I'm trying to send additional information from my GF to AN. The form is for an athletic registration, and we want to include the player's name on the receipt. Below is all the information authorize.net provides of this subject. I'm hoping someone more clever than them can point me in the right direction for setting it up. Any thoughts would be appreciated!

    "Yes, you can create and submit merchant-defined fields. To do this, simply send your own name value pairs. Authorize.Net will return the value in the transaction response as well as include the value on the merchant e-mail receipt"

    Posted 7 years ago on Friday August 31, 2012 | Permalink
  2. dave k
    Member

    This situation is similar to this forum entry => "Enough Data is not passing on from the Form to Authorize.net"

    The Transactions Settings Page is a powerful tool. Perhaps this logical layout could be expanded to accommodate more Auth.net fields.

    For example, the taxable y/n field could be mapped, hidden, and set to 'n' and that would solve another issue I saw on this forum. (I am having the same issue. Auth.net defaults to 'y')

    Essentially, one could list all the Auth.net fields(although that could be redundant for some fields like the credit card info) on the Transactions Settings page and just map to them manually.

    I recall there being user defined fields in the Auth.net dictionary... don't hold me to this... I has been a while since is really looked.

    User defined mapping like this could solve 'reeserved's request and many others and further strengthen this developer add-on.

    Posted 7 years ago on Wednesday November 14, 2012 | Permalink
  3. Here is the topic being referred to:
    http://www.gravityhelp.com/forums/topic/enough-data-is-not-passing-on-from-the-form-to-authorizenet

    There have been no additions to the Authorize.net plugin since that topic was last answered by Alex Cancado.

    Posted 6 years ago on Saturday December 22, 2012 | Permalink
  4. tex77
    Member

    Hi, I had a similar issue. I wanted to send additional data to Authorize.net from my form. Here's how I did it. I found a hook in the add-on (in plugins/gravityformsauthorizenet/authorizenet.php), which makes it very easy to modify the data sent to Authorize.net.

    GravityForms Authorize.net Add-on Transaction Data Filter
    http://pastebin.com/XceGeuBF

    That just goes in my functions.php. It works for standard fields in the AIM api -- even those that the GF-AuthNet add-on is not already sending. But it does NOT seem to work for custom fields (which would be created by setCustomField() in the AIM php sdk.

    So you can set a Customer ID, an Invoice Number, or use the Description field any way you want (though it might have a character limit). For a list of all standard fields, see plugins/gravityformsauthorizenet/api/lib/AuthorizetNetAIM.php, line 81.

    Posted 6 years ago on Wednesday February 6, 2013 | Permalink
  5. Thank you for posting the function. I'm sure it will be useful to many.

    Posted 6 years ago on Wednesday February 6, 2013 | Permalink
  6. Thanks for your help Tex.

    I'm using your code to pass the phone number to Authorize.net. Here's my code: http://pastebin.com/KZJSE0rR.

    Here's my problem: I need to do this for multiple forms, but the name of the phone field is different each time. On one form it's "input_3", on another it's "input_17" and so on.

    How would I modify the code to accomodate multiple forms?

    Posted 6 years ago on Wednesday February 13, 2013 | Permalink
  7. I think I would add a conditional before you assign the input to the $form_data["phone"]. It would look something like this: http://pastebin.com/Mfh0YLuA

    Posted 6 years ago on Wednesday February 13, 2013 | Permalink
  8. In reply to tex77 regarding the statement about Customer Defined Fields not working - I just implemented your code and gave the 'custom fields' a try just to see what would happen and it (quite happily) worked for me.

    Thanks for the code, tex77!

    Posted 6 years ago on Tuesday April 9, 2013 | Permalink
  9. Thanks for the update jpollock. Glad that worked for you.

    Posted 6 years ago on Tuesday April 9, 2013 | Permalink