Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    May 2003
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    form with two actions

    Hello,

    I'm stuck on the form processing part.
    If someone can help me, that would be great.

    I have a payment form, (customerinfo.asp), and once the user submits the page, I'd like to do two things:
    1. record that info to my website database, (database.asp)
    2. send that info to the credit card company's payment form to complete the transaction (e.g. http://www.creditcardcompany.com/payment.asp).

    Is there anyway to put 2 actions on one form?

    As another solution, I'm wondering if it's possible to add the action <form action="database.asp"> to the form in customerinfo.asp, then send the info to the credit card company's payment form from the database.asp. But the database.asp doesn't have html, or javascript.
    Without <form> tag, how can I send that info to another asp page?

    Thank you for your time,

  • #2
    Regular Coder
    Join Date
    Jul 2002
    Location
    Las Vegas, NV - USA
    Posts
    104
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yes and No...

    The FORM tag does not have the ability to POS to two action pages at the same time BUT JavaScript can come to the rescue.

    My first question would be do you need client side credit card processing (server redirects to CC site)? It is cleaner and more professional looking to handle all the credit card processing server-to-server but usually, you would need a real merchant account to do this and not a "third party" person-to-person solution (like Paypal). If you are using a real merchant account, I would research doing a server-to-server interface.

    Anyway, back to your question. To perform two actions, you will need to have the initial FORM post the data to your action page. Your page will act on the data and then create a new page with a FORM and HIDDEN fields prepopulated with the original data. Then have and onload event in the BODY tag call document.forms['your_form_name'].submit();

    Now there is a slight security risk in doing this because this new temporary page gets written to the clients HTML cache and it contains the payment information in the clear so I again would seriously consider a cleaner and more secure server-to-server solution...
    Steven Sommers (blog)
    Shift4 Corporation -- www.shift4.com

    Creators of $$$ ON THE NET(tm) payment processing services.

  • #3
    New Coder
    Join Date
    May 2003
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thank you very much for your reply.

    I'm sorry, I'm not familiar with these terminologies, (client-side, server-to-server).
    I collect the customer's data except credit card info on my website, (due to record the customer's data on our database),
    then submit these data to the credit card company. Once the customer gets in the credit card company's site, it's using SSL, so they can enter the credit card information there.

    As you suggested, I added another form and used <onLoad=" "> in the body tag, and it's working perfectly!

    Do you think I should have used SSL when I collect the customer's data (no payment info) on my site?

    Thank you.

  • #4
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Location
    Between DC and Baltimore In a Cave
    Posts
    2,717
    Thanks
    1
    Thanked 94 Times in 88 Posts
    If you are keeping addys, phone numbers, etc I would do it esp. if you are planning on this becoming very popular.

    You should at least encrypt certain items for basic security..

    My 2 Cents

    Eric
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]

  • #5
    Regular Coder
    Join Date
    Jul 2002
    Location
    Las Vegas, NV - USA
    Posts
    104
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by speece
    I'm sorry, I'm not familiar with these terminologies, (client-side, server-to-server)...Do you think I should have used SSL when I collect the customer's data (no payment info) on my site?
    By server-side vs. client-side I am referring to what side initiates the credit card authorization request. Based on your description you are using client-side redirects -- the client's browser is being sent to the credit card processors site and hopefully will be sent back upon success. With server-side, the client POSTs to your side (using SSL) and then your site communicates to the credit card processor directly -- the client's browser never leaves your site.

    Client side can be cheaper initially because you don't need your own SSL certificate and most person-to-person credit card solutions do not have setup or fixed monthly fees BUT this cheapness comes at the expense of your company image and discount rate.
    Last edited by Shift4Sms; 11-17-2003 at 10:48 PM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •