This topic is locked

Pass on data to a form?

12/19/2006 8:49:51 AM
ASPRunnerPro General questions
G
grinningdog author

Having collected data from my add form and updated the database I now want to go to our credit card provider so the customer can make a payment. Previously I've used a simple form (like below) although I've also seen it done as an include file.
I get the feeling there's a straightforward way of doing this in ASPRunner. Can you give me a pointer in the right direction please and I'll investigate further
[codebox]<FORM action=https://xxxx.net/authorize/form.cgi method=post target="_blank">

<input type=hidden name="formref" value="2">

<input type=hidden name="orderref" value="Triathlon Entry">

<input type=hidden name="lastname" value="<% Response.Write Session("LastName") %>">

<input type=hidden name="email" value="<%=request.form("email")%>">

...[/codebox]

Sergey Kornilov admin 12/19/2006

Is that a separate page or you plan to display this form in some Event code?
Where do you plan to get the data to be submitted?

G
grinningdog author 12/19/2006

Ideally I'd like to take the data the user has just entered and pass it to the credit card processor. They would then display the fields on their page and have extra data entry fields (ie credit card details)
Here's what happens now: Triathlon Entry Form You can just click submit without filling in the fields.

Sergey Kornilov admin 12/20/2006

Here is how this can be done in AfterAdd event:

set rstmp = Server.CreateObject("ADODB.Recordset")

rstmp.Open "select * from TableName where ID = (select max(ID) from TableName)", dbConnection
...

Reponse.Write "<input type=hidden name=lastname value=""" & rstmp("LastName") & """>"

Reponse.Write "<input type=hidden name=email value=""" & rstmp("Email") & """>"

...

rstmp.Close

set rstmp = Nothing