Commerce First Data Module I am working with Drupal Commerce to create an e-Commerce store. However, I am having some trouble with my client's gateway of choice, First Data. 

I have everything set up as directed (I believe) but when I try to submit an order the page times out and I am given this error message. (This happens if I am testing a transaction live, test authorized, or test denied)

PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: 

INSERT INTO {watchdog} (uid, type, message, variables, severity, link, location,
referer, hostname, timestamp) VALUES (:db_insert_placeholder_0,
:db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3,
:db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6,
:db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9);
Array ( [:db_insert_placeholder_0] =&gt; 0 [:db_insert_placeholder_1] =&gt; php
[:db_insert_placeholder_2] =&gt; %type: !message in %function (line %line of %file).
[:db_insert_placeholder_3] =&gt; a:6
{s:5:"%type";s:6:"Notice";s:8:"!message";s:27:"Undefined index:
order_num";s:9:"%function";s:33:"firstdata_cc_submit_form_submit()";s:5:"%file";s
87:"/home/betads/public_html/sites/all/modules/commerce_firstdata/commerce_firstd
ta.module";s:5:"%line";i:380;s:14:"severity_level";i:5;}
[:db_insert_placeholder_4] =&gt; 5 [:db_insert_placeholder_5] =&gt;
[:db_insert_placeholder_6] =&gt; https://beta.designsenseinc.net/checkout/7/review
[:db_insert_placeholder_7] =&gt; https://beta.designsenseinc.net/checkout/7/review
[:db_insert_placeholder_8] =&gt; 166.147.79.6 [:db_insert_placeholder_9] =&gt;
1330630525 ) in dblog_watchdog() (line 157 of
/home/betads/public_html/modules/dblog/dblog.module).


Any idea what could be the issue? To test for yourself, you can visit http://beta.designsenseinc.net/product/853 and add the product to cart.

Any help appreciated.
watchdog is trying to save an error log and database fails (probably too many error logs ?).
you might try to select showing errors on screen or sending them to syslog - you would probably get rid of the rying database and could diagnose the original problem :).

the original error seems to be undefined index on line 380 of commerce_firstd
ta.module