www.uburst.com www.uburst.com

"Credit card form"

Go back to the LobbyClick here to Go Back to Main ListingClick here to see helpClick here to Search the Forum

General Questions
Forum Type: Public
Moderator: edmunds
Time Zone: EST
Printer Friendly Format
Original Message
 
"Credit card form"
Posted by dave on Jan-20-03 at 08:33 AM (EST)
Using u-shop 3.50, the standard credit card form.
In the credit card form.
We have been asking the customer to enter the credit card number with a - dash between each set of four numbers the same way it is shown on the card. Most do not seem to want to do this. I agree, I should not be asking them to enter it any special way. Is there a way to make that one field be split in to four, such as, [4444] [4444] [4444] [4444], so that they can type it in without having to enter a dash or space, although, have the field or (form information) be sent to me with a dash or at least a space between four numbers. I am either getting old or it is just hard to read 16 numbers all together with no spaces. Any ideas on this?

Thank you.

Click to Send Alert Message to the Administrator Click to edit this messageClick here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents

 Table of Contents

RE: Credit card form, Bill Weiner, Jan-21-03, (1)
Credit card form, dave, Jan-21-03, (2)
RE: Credit card form, Bill Weiner, Jan-22-03, (3)
Credit Card Form, Ron Harter, Jan-24-03, (4)
RE: Credit Card Form, Bill Weiner, Jan-29-03, (5)

 

 
Click here to goto Click here to goto the Lobby
Messages in this discussion
 
1 . "RE: Credit card form"
Posted by Bill Weiner on Jan-21-03 at 07:50 AM (EST)
Below is a way to modify the ushop.pl script such that it stores the credit card number with dashes every four digits:

STEP 1: Make a backup of your ushop.pl script... just in case.

STEP 2: Open your ushop.pl script with any text editor such as WordPad.

STEP 3: Do a search on the following line:

&validate_credit_card_parameters();

STEP 4: Immediately AFTER that line, add these 8 lines:

if (!($cc_number =~ /-/))
{
$formatted_cc = substr($cc_number,0,4) . "-";
$formatted_cc .= substr($cc_number,4,4) . "-";
$formatted_cc .= substr($cc_number,8,4) . "-";
$formatted_cc .= substr($cc_number,12,4);
$cc_number = $formatted_cc;
}

STEP 5: Save the script...as TEXT if your editor asks... and try it out!

Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents
 
2 . "Credit card form"
Posted by dave on Jan-21-03 at 12:57 PM (EST)
Thank you, that worked slicker than, um, water on ice.
I must say that the customer support here is the best I have seen. How many companies will take the time to write a customer out a special script or take the time to show them something they should learn on their own.

Thanks again

Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents
 
3 . "RE: Credit card form"
Posted by Bill Weiner on Jan-22-03 at 06:20 AM (EST)
Glad that worked for you :^)
Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents
 
4 . "Credit Card Form"
Posted by Ron Harter on Jan-24-03 at 06:45 PM (EST)
Bill,
This works fine if they use no spaces or use a dash (-) between the 4 digits but if they enter a space i.e 4111 1111 1111 1111 it comes out as 4111- 111-1 11-11 1 and drops the last 3 digits. Any way to handle this? I have "no spaces" next to the number entry box but many do it anyway.
Thanks
Ron
Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick to EMail Click here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents
 
5 . "RE: Credit Card Form"
Posted by Bill Weiner on Jan-29-03 at 06:28 AM (EST)
Directly BEFORE the modification described above, you could add a line like this to remove any spaces from the credit card number:

$cc_number =~ s/ //g;

So the IMPROVED modification would actually look like this:

STEP 1: Make a backup of your ushop.pl script... just in case.

STEP 2: Open your ushop.pl script with any text editor such as WordPad.

STEP 3: Do a search on the following line:

&validate_credit_card_parameters();

STEP 4: Immediately AFTER that line, add these 9 lines:

$cc_number =~ s/ //g;
if (!($cc_number =~ /-/))
{
$formatted_cc = substr($cc_number,0,4) . "-";
$formatted_cc .= substr($cc_number,4,4) . "-";
$formatted_cc .= substr($cc_number,8,4) . "-";
$formatted_cc .= substr($cc_number,12,4);
$cc_number = $formatted_cc;
}

STEP 5: Save the script...as TEXT if your editor asks... and try it out!

Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents


Archive This Thread: Admin and Moderator OnlyRemove This Thread: Admin and Moderator Only
Click here to goto Click here to goto the Lobby

 

 

 

 

 

 

 

 

 

 

 

 
Questions or problems regarding this bulletin board should be directed to Webmaster
©1997-1999 by DCScripts. All rights reserved.