dayo Posted February 23, 2007 Share Posted February 23, 2007 Hello all I am newbie learning PHP stuff and can anyone please tell me if this scenario is possible on a payment system I am working on. 1) User Selects items from website 2) Information is passed to 3rd party site to process payment including url to a php file on website 3) 3rd party site sends information back to php file 4) Database is updated So far, steps 1 & 2 are sucessful and the payment is processed, but getting the data back from the 3party site and updating the DB is proving difficult. The code below is what is in the php file the 3rd party site is posting variables back to. //Insert Transaction Details into table $tab_list = "mb_date_ordered, mb_pay_to_email, mb_pay_from_email, mb_merchant_id, mb_transaction_id, mb_mbtransaction_id, mb_mbamount, mb_mbcurrency, mb_status, mb_md5sig, mb_zcmd5, mb_amount, mb_currency" $tab_vals = "'date("Y-m-d H:i:s")','$_REQUEST[pay_to_email]', '$_REQUEST[pay_from_email]', '$_REQUEST[merchant_id]', '$_REQUEST[transaction_id]', '$_REQUEST[mb_transaction_id]', '$_REQUEST[mb_amount]', '$_REQUEST[mb_currency]', '$mbStatusText', '$_REQUEST[md5sig]', '$mbZCMD5', '$_REQUEST[amount]', '$_REQUEST[currency]'" $zc_con = mysql_connect("host","u_name","p_word"); mysql_select_db("db_name", $zc_con); $zc_query="INSERT INTO MYTABLE ($tab_list) VALUES ($tab_vals)"); mysql_close($zc_con) The question is whether a site posting info to a php file can trigger this code and if it can, whether I have screwed up in the structure. Thanks for your time Quote Link to comment Share on other sites More sharing options...
dayo Posted February 24, 2007 Author Share Posted February 24, 2007 Seems like CGI is the way to go. Ah well, I better start learning that. Quote Link to comment Share on other sites More sharing options...
fenway Posted February 26, 2007 Share Posted February 26, 2007 I'm not sure what you mean by CGI -- you just need to pass this info to the 3rd party, and get back whatever structure they return (XML, etc.) and parse it accordingly. Any scripting language shoudl be able to handle this. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.