Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // http://www.gravityhelp.com/forums/topic/sending-additional-information-to-authorizenet-via-namevalue-pairs#post-146608
- add_filter('gform_authorizenet_before_single_payment','my_anet_custom_fields', 10, 2);
- function my_anet_custom_fields($transaction, $form_data) {
- # GET DATA FROM FORM INPUT BASED ON FORM ID
- # CREATE MULTIPLE FORM to FIELD MAPPINGS HERE
- # form 75 uses input_3 for the phone number
- if (rgpost('form_id') == 75 {
- $form_data["phone"] = rgpost('input_3');
- }
- # form 14 uses input_17 for the phone number
- else if (rgpost('form_id') == 14 {
- $form_data["phone"] = rgpost('input_17');
- }
- # ADD DATA TO TRANSACTION OBJECT
- $transaction->phone = $form_data["phone"];
- return $transaction;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement