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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Response goes back to another script

Status
Not open for further replies.

thillside

IS-IT--Management
Jan 27, 2004
7
US
Here is my situation.


Client fills out form and sends it to perl script (S1) on my server.

S1 sends info off to "foreign" server (a credit card processor).

The foreign server is configured to send approvals to one script (call it S2) with approval and another script (S3) with a disapproval.

Now how do I get from S2 or S3 back to the user?

I suppose I could have S1 (which has the connection to the user) wait until it sees something from S2 or S3, but I hate that kind of token system, it is difficult and prone to error. (I do some MySQL in this system, so I could use that I suppose.) I understand that PHP can handle this by somehow keeping the connection, but I don't want to re-write stuff.

 
How are you sending info to this foreign server, through a url? And would it work to redirect your client's browser there using the url?

Paypal does something like this. You redirect the client to paypal along with some parameters in the url (like who to pay and how much). Then they do their payment on paypal's site. If everthing's accepted it then redirects the user's browser to a certain page on your site and if there's a problem it redirects them to another page on your site. Is this how your credit card processor works?

 
I Post the data to the foreign server. I could use their own web interfact, but that is not what my client wants, he wants the users to use his forms. I just can't figure out how scripts 2 or 3 can talk to the user.

 
Then what happens when you Post to the foreign server? Does it do its processing and send back a redirect to either script 2 or script 3? If so, maybe your script 1 could just Post the info to the server and check the redirect that gets sent back to see if the transaction was successful.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top