poslundc
10-20-2004, 11:22 AM
Hi all,
I'm coding a PHP frontend to a CC gateway and could use a couple of pointers... (searched the forums but didn't find anything that seemed to answer them)
1. Is there a preferred technique to preventing multiple form submissions? Right now I am thinking of just locking the user out through JavaScript (by disabling the submit button and changing the onsubmit event handler to cancel any future attempts), but this is problematic if the connection is rejected, and doesn't stop the user from doing a back->submit-again. (JavaScript isn't a problem since the rest of the site is already heavily reliant on it and is pretty much non-functional if the user has it disabled.)
2. I notice that sites like Amazon tend to ask for first and last name in a single field. How do they deal with splitting up names the way it is required by the gateway if there are more than two? Can you make any safe assumptions about the way they will be distributed?
Thanks,
Dan.
I'm coding a PHP frontend to a CC gateway and could use a couple of pointers... (searched the forums but didn't find anything that seemed to answer them)
1. Is there a preferred technique to preventing multiple form submissions? Right now I am thinking of just locking the user out through JavaScript (by disabling the submit button and changing the onsubmit event handler to cancel any future attempts), but this is problematic if the connection is rejected, and doesn't stop the user from doing a back->submit-again. (JavaScript isn't a problem since the rest of the site is already heavily reliant on it and is pretty much non-functional if the user has it disabled.)
2. I notice that sites like Amazon tend to ask for first and last name in a single field. How do they deal with splitting up names the way it is required by the gateway if there are more than two? Can you make any safe assumptions about the way they will be distributed?
Thanks,
Dan.
