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

Recapturing Form Field Info after Gateway Process

Status
Not open for further replies.

JordanR

Technical User
Oct 3, 2002
182
US
Hello,
I am needing help understanding how to recapture form field info after a form has been submitted to a gateway to process a credit card. I need the clients information to also send to another form (API) to include in another process. I have tried to combine the process but to no avail.
Is the information unretrievable after the first process?
Can someone lead me in the right direction?
 
What gateway are you using for processing the credit cards? If it's a third party like VeriSign, they send back a few of the fields. But they support user fields i.e. user1, user2, user3, etc.. Please refer to the 3rd party's guide.

Another solution would be sending the data to your API first, then sending it to the gateway after the API is finished.

 
you might find some success in setting these values to session variables or cookies if possible, so that this data will still be there when the client returns to your site. This would either involve an intermediary page on which to set these values, or you could use some client-side javascript to set the data to a cookie on the page just before they leave for the gateway process as they are hitting the submit button...

If the gateway service you are using supports alternate methods of interaction, such as allowing you to post client details via an XML stream or through a supplied API, you wouldn't have to leave the page at all, but that of course depends on the gateway service.

good luck to you!
-f!
 
Funka,
I have a Hyprid XML/ASP Script that a form hits.
This script is what sends the user information and creditcard to the payment gateway. The user never leaves my site.
In this script I can set a redirect once it processes but that's all I know at this point.

Where should the session start before the gateway script or on the same page?

I don't know XML that much.

Denoxis,
I thought about having the form hit the API first but then the user will have a free domain if the gateway script is hit second and the credit card wasn't charged for some problem.
 
Session values can be set at any time -- it is of note, however, that the cookies that get set by IIS when creating/instantiating a session get sent before any client output occurs.

If you never leave the page though, then all of that client data is still current, and if all you want is that the next page that they see to have access to this data, you might find the Server.Transfer() statement to be of some value.

The suggestion to use Session variables would still work in this case; they would not be perfectly ideal for a few minor reasons, but would be a good solution if you had to leave your site in order to complete the transaction. Your scenario is better in that you don't have to leave your site, so the user's state is still nicely preserved.

But wait! after re-reading your post again, I realize that if you do not have access to change the script you're using, go for the Session variables. set them at the top of the page for best measure, then have your "followup" page access these.
Code:
'set a sessionvar
Session("username") = "Funka!"
' retrieve it later
Response.Write "Hello, " & Session("username")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top