Link to home
Start Free TrialLog in
Avatar of ststesting
ststesting

asked on

read a "cgi post back to my server"

I am setting up a payment confirmation/fail page and asked the processing vendor for some sample code for retrieving the transaction details and this is the response I got.

"Here is an example of a CGI response post back to the merchant.  

{status=DUPLICATE&failReason=The+order+already+exists+in+the+database.&OID=1339768581&OID=1339768581&ttime=06%2f15%2f12+02%3a39%3a47+PM&merchant=Hardin+Solutions&merchantphone=123-456-29003&merchantemail=Jeff.koenig%commercebank.com.com&txnorg=eci&subtotal=9.00&chargetotal=9.00&cardnumber=(Visa)++....1111&expmonth=01&expyear=2013&bname=Mike+Snide&baddr1=1245+S.+Todd+St.&City%2c+State%2c+Zip%3a=Wichita%2c+KS%2c+67207&bcountry=US&userid=A33AE3E33079&bcity=Wichita&suppressTitle=true&__VIEWSTATE=%2fwEPDwUJLTc0ODU2OTMzZGQ%3d&cctype=V&invoice_number=1339768581&bzip=67207&bstate=KS}
"

I really can't figure out how to access that in php,  but even in anything would steer me in the right direction.  Thanks in advance for any help/tips....
ASKER CERTIFIED SOLUTION
Avatar of gr8gonzo
gr8gonzo
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ststesting
ststesting

ASKER

Thanks, that's perfect for making it accessible for this test.

What would I set your first line $response = to in the actual code?
I'm not sure, that depends on your merchant / vendor. Usually it comes back as a response from the charge submission.

e.g.

$response = try_to_charge($creditcardnumber,$other_details,$apikey);
My charge submission is a form that redirects to their site, then the user is redirected to the confirmation page....
Usually in that model, the user is redirected back to the final page with the variables in the URL. If you don't see the variables in the URL, you'll have to ask the vendor how you can get them with the redirect approach.
Taking it back to the support guy (who is terrible, or I wouldn't be on here...).

Thanks for the quick, quality response.  Have a good one!