VP-ASP :: Shopping Cart Software

Shopping Cart Software Solutions for anywhere in the World

US/Canada(Toll Free): +1 888 587 2278
Europe/UK: +44 (020) 7193 9408
Australia/New Zealand: +61 3 9016 4497

VP-ASP Shopping Cart Customer Forum

Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VPCart Forum
 General help me questions
 Credit card number format
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

dandlyin
VP-ASP New User

USA
73 Posts

Posted - December 09 2006 :  04:50:41  Show Profile  Visit dandlyin's Homepage  Reply with Quote
Those who manually process credit card charges may encounter a minor annoyance caused by the customer entering the number in a form that contains non-numeric characters- eg. xxxx-xxxx-xxxx-xxxx .
The current scripts accept such an entry, which is fine, but I believe the merchant is better served if the non-numeric characters are stripped before storing the number in the database. That way, he/she can drag/drop the number from VP-ASP to the virtual terminal form, which may require only numeric input.
To do so, edit shopcheckout.asp:
Find these lines near the end of the script:
Sub GetFormFields
strOcardtype = Request.Form("strOcardtype")
strOcardno = Request.Form("strOcardno")
.
add this line after the third line above
.
strOcardno=trimtodigits(strOcardno)
.
The new text will look like this:
Sub GetFormFields
strOcardtype = Request.Form("strOcardtype")
strOcardno = Request.Form("strOcardno")
strOcardno=trimtodigits(strOcardno)
.
trimtodigits is a function that is defined in shopvalidatecreditcards.asp. It removes all characters in an input string except 0-9.
.
If you are using sslshopcheckout.asp, the change is the same but trimtodigits is contained within the main script.
.
As always, comments are welcome.
Dan Dotson
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000