www.uburst.com www.uburst.com

"Credit Card additional field"

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

Programmer Tips
Forum Type: Public
Moderator: edmunds
Time Zone: EST
Printer Friendly Format
Original Message
 
"Credit Card additional field"
Posted by Pete Burford on Jun-10-02 at 08:48 AM (EST)
In the UK, we have a type of debit card (Switch) which needs the Start date as well as all the other normal CC fields. WHere do I modify the .pl files to accomodate this. I have already modified the Creditcard template.html file.
Click 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

 Table of Contents

RE: Credit Card additional field, Bill Weiner, Jun-11-02, (1)
Start Date, Pete Burford, Jun-12-02, (2)

 

 
Click here to goto Click here to goto the Lobby
Messages in this discussion
 
1 . "RE: Credit Card additional field"
Posted by Bill Weiner on Jun-11-02 at 04:35 AM (EST)
The creditcard_template.html file currently allows for 5 credit card fields:

1. cc_type
2. cc_name_on_card
3. cc_number
4. cc_expiration
5. cc_issue

Are you already utilizing the "cc_issue" number field? If not, that would be the easiest thing to do. Just add that "cc_issue" field to your template and give it any label you want.

Otherwise, if you are already using the "cc_issue" number to collect the switch number or issue number, then there are a couple options... both of which try to avoid adding an additional field to the data format because that would open a whole can of worms.

Option 1: The easiest thing to do would be to just change the label of one of your fields on the creditcart_template.html file to collect the additional "start date". For example, you could change the "Expiration Date" label to something like:

"Start Date & Expiration Date:"

... possible with some format instructions such as (MM/YYYY - MM/YYYY):

"Start Date & Expiration Date: (MM/YYYY - MM/YYYY)"

... then the customer would just know to enter both dates in that cc_expiration field. And no changes to the CGI script would be required.

Option 2: A second (more complicated option) would be to add an additional field for the "cc_start_date" to the creditcard_template.html file... and then modify the script to append the additional field onto the cc_expiration date. (The reason for this appending again is to avoid adding an additional field to the data format of the order file.) Here more details on how to do that:

(Assuming that the new field on your creditcard_template has a "name" of "cc_start_date")

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

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

STEP 3: Do a search on the following line:

sub validate_credit_card_parameters

(This will get you to the start of the subroutine that processes the credit card fields.)

STEP 4: Within that subroutine, locate the following line:

$cc_issue = &validate_string($cc_issue);

STEP 5: Immediately AFTER that "$cc_issue = &validate_string($cc_issue);" line, add these three lines:

$cc_start_date = $form_text{'cc_start_date'};
$cc_start_date = &validate_string($cc_start_date);
$cc_expiration .= ", $cc_start_date";

(Those three lines will get and validate the "cc_start_date" field from the form and then append the value onto the expiration field.)

STEP 6: 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 . "Start Date"
Posted by Pete Burford on Jun-12-02 at 05:54 AM (EST)
Didn't work had to change this:
$cc_expiration .= ", $cc_start_date";
to this:
$cc_expiration .= "| $cc_start_date";
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


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.