Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

capturing the response of a php page

Status
Not open for further replies.

btween

Programmer
Joined
Aug 7, 2003
Messages
338
Location
US
I'm having a problem with a payment gateway that takes form data and returns a string.

Most processors that I've worked with have a redirect url that you can specify in the initial form that you can use to capture the data.

This is the first time I have to work in PHP and there is no return url. The PHP page simply displays a bunch of values.

How could I go about capturing these in my application?

The tech support team said that it's done through TCP/IP but they didn't elaborate:

For example I pass this querystring:
Wong&cardnumber=4000000000000010&cvv=123&cardtype=Mastercard&expmonth=03&expyear=04&amount=19.95&address=6 Lyon Park Road&city=North Ryde&state=NSW&country=AUS&zip=2113&email=weiyuanw@opentec.com.au


The page transaction.php replies with this:

D","OP500","Exceeded Trans No. in this month","1378067"

How can I capture this information in some variables using VB / ASP or PHP.

Thanks for your help.
 
Pass your query string not through the client's browser but have your PHP script use cURL or a socket connection to access the payment system. The response then will be recevied by your script and you can handle the returned parameters.
You can then display to the client whatever you want.

 
Is there a way to do this with ASP, or are there any prewritten scripts that can do this since I'm not familiar with PHP. I just need to be able to get that string into a variable.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top