[solved] After upgrade, values are not recognized by Authori
Posted: Wed Dec 15, 2010 12:41 am
I upgraded a site that takes donations from 1.6 to 1.9.1. We are using a UDT to process the donations through Authorize.net's AIM method. I am using Form Builder's "Call a UDT with Form Results" field to process the UDT. Everything worked fine until the upgrade: after the upgrade, the values are no longer being transmitted to Authorize.net. If I print the params, they are recognized - but if I echo the info that Authorize.net received, nothing is received.
----------------------------------------------
Cms Version: 1.9.1
Modules:
* FormBuilder: 0.6.4
* FormBrowser: 0.3
Config Information:
* php_memory_limit:
* process_whole_template: false
* output_compression: false
* max_upload_size: 10000000
* default_upload_permission: 664
* url_rewriting: none
* page_extension:
* query_var: page
* image_manipulation_prog: GD
* auto_alias_content: true
* locale:
* default_encoding: utf-8
* admin_encoding: utf-8
* set_names: true
Php Information:
* phpversion: 5.2.12
* md5_function: On (True)
* gd_version: 2
* tempnam_function: On (True)
* magic_quotes_runtime: Off (False)
* E_STRICT: 0
* memory_limit: 32M
* max_execution_time: 300
* output_buffering: On
* safe_mode: Off (False)
* file_uploads: On (True)
* post_max_size: 10M
* upload_max_filesize: 10M
* session_save_path: /tmp (1777)
* session_use_cookies: On (True)
* xml_function: On (True)
Server Information:
* Server Api: cgi
* Server Db Type: MySQL (mysql)
* Server Db Version: 5.0.83
----------------------------------------------
Here's my UDT:
Any suggestions as to what is going on here?
----------------------------------------------
Cms Version: 1.9.1
Modules:
* FormBuilder: 0.6.4
* FormBrowser: 0.3
Config Information:
* php_memory_limit:
* process_whole_template: false
* output_compression: false
* max_upload_size: 10000000
* default_upload_permission: 664
* url_rewriting: none
* page_extension:
* query_var: page
* image_manipulation_prog: GD
* auto_alias_content: true
* locale:
* default_encoding: utf-8
* admin_encoding: utf-8
* set_names: true
Php Information:
* phpversion: 5.2.12
* md5_function: On (True)
* gd_version: 2
* tempnam_function: On (True)
* magic_quotes_runtime: Off (False)
* E_STRICT: 0
* memory_limit: 32M
* max_execution_time: 300
* output_buffering: On
* safe_mode: Off (False)
* file_uploads: On (True)
* post_max_size: 10M
* upload_max_filesize: 10M
* session_save_path: /tmp (1777)
* session_use_cookies: On (True)
* xml_function: On (True)
Server Information:
* Server Api: cgi
* Server Db Type: MySQL (mysql)
* Server Db Version: 5.0.83
----------------------------------------------
Here's my UDT:
Code: Select all
// Get params:
$amount=$params['Amount'];
$firstname=$params['First Name'];
$lastname=$params['Last Name'];
$address=$params['Address'];
$city=$params['City'];
$state=$params['State'];
$zip=$params['Zip'];
$ccnumber=$params['Credit Card Number'];
$expiration=$params['Expiration'];
$email=$params['Email'];
$phone=$params['Phone'];
$referencenumber=$params['Reference Number'];
$post_url = "https://secure.authorize.net/gateway/transact.dll";
$post_values = array(
// the API Login ID and Transaction Key must be replaced with valid values
"x_login" => "xxxxxx",
"x_tran_key" => "xxxxxxxx",
"x_version" => "3.1",
"x_delim_data" => "TRUE",
"x_delim_char" => "|",
"x_relay_response" => "FALSE",
"x_type" => "AUTH_CAPTURE",
"x_method" => "CC",
"x_card_num" => "$ccnumber",
"x_exp_date" => "$expiration",
"x_amount" => "$amount",
"x_invoice_num" => "$referencenumber",
"x_first_name" => "$firstname",
"x_last_name" => "$lastname",
"x_address" => "$address",
"x_city" => "$city",
"x_state" => "$state",
"x_zip" => "$zip",
"x_email" => "$email",
"x_phone" => "$phone",
);
// This section takes the input fields and converts them to the proper format
// for an http post. For example: "x_login=username&x_tran_key=a1B2c3D4"
$post_string = "";
foreach( $post_values as $key => $value )
{ $post_string .= "$key=" . urlencode( $value ) . "&"; }
$post_string = rtrim( $post_string, "& " );
$request = curl_init($post_url); // initiate curl object
curl_setopt($request, CURLOPT_HEADER, 0); // set to 0 to eliminate header info from response
curl_setopt($request, CURLOPT_RETURNTRANSFER, 1); // Returns response data instead of TRUE(1)
curl_setopt($request, CURLOPT_POSTFIELDS, $post_string); // use HTTP POST to send form data
curl_setopt($request, CURLOPT_SSL_VERIFYPEER, FALSE); // uncomment this line if you get no gateway response.
$post_response = curl_exec($request); // execute curl post and store results in $post_response
// additional options may be required depending upon your server configuration
// you can find documentation on curl options at http://www.php.net/curl_setopt
curl_close ($request); // close curl object
// This line takes the response and breaks it into an array using the specified delimiting character
$response_array = explode($post_values["x_delim_char"],$post_response);
// The results are output to the screen in the form of an html numbered list.
echo "<OL>\n";
foreach ($response_array as $value)
{
echo "<LI>" . $value . " </LI>\n";
$i++;
}
echo "</OL>\n";
Any suggestions as to what is going on here?