MiniVend Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: credit card validation



******    message to minivend-users from Barry Treahy <treahy@mmaz.com>     ******

This is what my page looks like and if someone has a problem they know what it is...

Barry

<HTML>
  <HEAD>
    <TITLE>__COMPANY__ -- Create a new account</TITLE>
    <SCRIPT>
var tmp_cc_data = "XXXX-XXXX-XXXX-XXXX"
function check_required(chkfield, min, max, fieldlabel){
  if (min > 0 && max == -1){ // test only for a minimum requirement
    if (chkfield.value.length < min){
      alert("The field "+fieldlabel+" is a required field.");
      return false;
    } else {
      return true;
    }
  } else {
    if (chkfield.value.length < min){
      alert("The field "+fieldlabel+" must be atleast "+min+" characters long.");
      return false;
    } else {
      if (chkfield.value.length > max){
        alert("The field "+fieldlabel+" is limited to "+max+" characters.");
        return false;
      }
      return true;
    }
  }
}

function check_element(chkjump, chkfield, chkvalue, clearfield, jumpfield){
  if (chkfield.value != chkvalue) {
    clearfield.value = "";
    jumpfield.focus();
    return;
  }
  clearfield.focus();
  return;
}

function check_c_requirements(inform) {
  if (check_required(inform.mv_credit_card_type[inform.mv_credit_card_type.selectedIndex], 2, -1, 'CARD
TYPE')) {
    if (check_required(inform.mv_credit_card_holdername, 3, -1, 'NAME')) {
      if (check_required(inform.mv_credit_card_exp_month[inform.mv_credit_card_exp_month.selectedIndex],
1, -1, 'EXPIRATION MONTH')) {
        if (check_required(inform.mv_credit_card_exp_year[inform.mv_credit_card_exp_year.selectedIndex],
2, 2, 'EXPIRATION YEAR')) {
          return true;
        }
      }
    }
  }
  return false;
}

function check_form(inform) {
  if (! check_c_requirements(inform)){return false};
  inform.submit();
  return true;
}
    </SCRIPT>
  </HEAD>

[body 1]
    <CENTER><A HREF="__INDEXURL__"><IMG BORDER="0" SRC="__LOGO__" ALT="__COMPANY__ Logo"></A></CENTER>

    <H3>Enter Credit Information for a new account: [value mv_username]</H3>
    <DIV ALIGN="CENTER">

[set Cancel Request]
  mv_doit=refresh
  mv_todo=return
  mv_nextpage=login
  [userdb function=logout]
  mv_username=""
  mv_password=""
[/set]
[set Temporary Save CC]
  mv_doit=refresh
  mv_todo=return
  mv_failpage=new_cc
  mv_nextpage=new_cc
  [value name=mv_tmp_cc_card set="[value mv_credit_card_number]"]
[/set]
[set Save New Account]
  mv_doit=refresh
  mv_todo=return
  mv_failpage=new_cc
  mv_nextpage=save_account
  [value name=mv_credit_card_number set="[value mv_tmp_cc_data]"]
[/set]

[if value mv_credit_card_valid][then]
      <TABLE WIDTH="60%">
        <TR>
          <TD ALIGN="CENTER">
            You credit card information appears to be valid and will be reconfirmed at time of
shipment.  This is just a subtle reminder that credit card fraud is a felony and will be prosecuted to
the full extent of the law.
          </TD>
        </TR>
        <TR>
          <TD ALIGN="CENTER">
            <FORM ACTION="[process-target]" METHOD="POST">
              <input type="submit" name="mv_click" value="Save New Account">
            </FORM>
          </TD>
        </TR>
      </TABLE>
      <SCRIPT>
        tmp_cc_card = "[value mv_tmp_cc_card]";
        mv_tmp_cc_data = tmp_cc_card.substring(0, 5) + tmp_cc_data.substring(5, 10) +
tmp_cc_card.substring(15, 4);
        setTimeout("document.forms[0].submit();", 15000);
      </SCRIPT>
[/then][else]
    <FORM ACTION="[process-target]" METHOD="POST" NAME="CC">
        <INPUT TYPE="hidden" NAME="mv_doit" VALUE="refresh">
        <INPUT TYPE="hidden" NAME="mv_orderpage" VALUE="new_cc">
        <INPUT TYPE="hidden" NAME="mv_failpage" VALUE="new_cc">

        <TABLE ALIGN="CENTER">
        <TR>
          <TD ALIGN="RIGHT"><IMG WIDTH="12" HEIGHT="12" SRC="redball.gif"> Credit Card Type:</TD>
          <TD>
            <SELECT NAME="mv_credit_card_type" VALUE="[value mv_credit_card_type]">
            <OPTION VALUE="VISA" SELECTED="SELECTED"> VISA </OPTION>
            <OPTION VALUE="MC" SELECTED="SELECTED"> MasterCard </OPTION>
            </SELECT>
          </TD>
        </TR>
        <TR>
          <TD ALIGN="RIGHT"><IMG WIDTH="12" HEIGHT="12" SRC="redball.gif"> Card Holder Name:</TD>
          <TD><INPUT NAME="mv_credit_card_holdername" VALUE="[value mv_credit_card_holdername]"
SIZE="32" MAXLENGTH="32"></TD>
        </TR>
        <TR>
          <TD ALIGN="RIGHT"><IMG WIDTH="12" HEIGHT="12" SRC="redball.gif"> Expiration Month:</TD>
          <TD>
            <SELECT NAME="mv_credit_card_exp_month" VALUE="[value mv_credit_card_exp_month]">
            <OPTION VALUE="" SELECTED="SELECTED"> Please select your Month of Expiration</OPTION>
            <OPTION VALUE="1"> 01 - January </OPTION>
            <OPTION VALUE="2"> 02 - February </OPTION>
            <OPTION VALUE="3"> 03 - March </OPTION>
            <OPTION VALUE="4"> 04 - April </OPTION>
            <OPTION VALUE="5"> 05 - May </OPTION>
            <OPTION VALUE="6"> 06 - June </OPTION>
            <OPTION VALUE="7"> 07 - July </OPTION>
            <OPTION VALUE="8"> 08 - August </OPTION>
            <OPTION VALUE="9"> 09 - September </OPTION>
            <OPTION VALUE="10"> 10 - October </OPTION>
            <OPTION VALUE="11"> 11 - November </OPTION>
            <OPTION VALUE="12"> 12 - December </OPTION>
            </SELECT>
          </TD>
        </TR>
        <TR>
          <TD ALIGN="RIGHT"><IMG WIDTH="12" HEIGHT="12" SRC="redball.gif"> Expiration Year:</TD>
          <TD>
            <SELECT NAME="mv_credit_card_exp_year" VALUE="[value mv_credit_card_exp_year]">
            <OPTION VALUE="" SELECTED="SELECTED"> Please select your Year of Expiration</OPTION>
            <OPTION VALUE="99"> 1999 </OPTION>
            <OPTION VALUE="00"> 2000 </OPTION>
            <OPTION VALUE="01"> 2001 </OPTION>
            <OPTION VALUE="02"> 2002 </OPTION>
            <OPTION VALUE="03"> 2003 </OPTION>
            <OPTION VALUE="04"> 2004 </OPTION>
            <OPTION VALUE="05"> 2005 </OPTION>
            <OPTION VALUE="06"> 2006 </OPTION>
            </SELECT>
          </TD>
        </TR>
        <TR>
          <TD ALIGN="RIGHT"><IMG WIDTH="12" HEIGHT="12" SRC="redball.gif"> Card Number:</TD>
          <TD>
            <input type="hidden" NAME="mv_click" value="Temporary Save CC">
            <INPUT NAME="mv_credit_card_number" VALUE="[value mv_credit_card_number]" SIZE="32"
MAXLENGTH="32" ONCHANGE="if (check_form(document.forms.CC)){submit(document.forms.CC)};"><BR>
            <FONT SIZE="-1" COLOR="RED">You card number will be encrypted immediately</FONT>
          </TD>
        </TR>
      </TABLE>
      <br>
      <img width="12" height="12" src="redball.gif"> Indicates a REQUIRED field.<br>
[if value mv_credit_card_valid][then]
[/then][else][if value mv_credit_card_error]
      <TABLE WIDTH="60%"><TR><TD ALIGN="CENTER">
      An error occured while trying to accept and valid your credit card.  A possible cause is <FONT
COLOR="RED">[value mv_credit_card_error]</FONT> but regardless, it will be necessary for you to re-enter
your qualifying data.  We are sorry for any inconvience.  If this difficulty persists, please call (602)
922-3998 for Technical Aid
      </TD></TR></TABLE>
[/if][/else][/if]
      <input type="BUTTON" NAME="dummy" value="Enter Data">
      <input type="submit" NAME="mv_click" value="Cancel Request">
      </FORM>
[/else][/if]
    </DIV>
  </BODY>
</HTML>


jojo wrote:

> ******    message to minivend-users from jojo <hans-joachim.leidinger@home.gelsen-net.de>     ******
>
> Dear list,
>
> hmmm...are there a way, to give visitor more information, why credit
> card is not valid?
> I have seen, some people type his card number two or more times and they
> have not realize the wrong date. It will be nice, to give visitor
> information about wrong number or wrong date or wrong cardtype. It this
> possible?
>
> With friendly greeting
>
> Joachim
>
> Larry Leszczynski wrote:
> >
> > ******    message to minivend-users from Larry Leszczynski <larryl@furph.com>     ******
> >
> > Hi Eric -
> >
> > > I just had a complaint about mvend returning a 'you must validate your
> > > creditcard'... I am at a loss as to what could be causing this problem.
> > > I have set everything a 'loose' as it can go... including using
> > > mv_credit_card_force=1
> >
> > There are a number of reasons that particular message shows up, for
> > instance if the credit card number fails the checksum test, or if the
> > expiration date is in the past.  I wonder if maybe they were using a good
> > card number but not checking that the expiration date was set correctly.
> >
> > Maybe you could add an order profile test that catches a card expiration
> > date set in the past, and head off that problem.
> >
> > Larry Leszczynski
> > larryl@furph.com
> > --
> >   furph, Inc.   WWW/Unix/Windows Solutions      734-513-7763 (voice)
> > info@furph.com     http://www.furph.com         734-513-7759 (FAX)
> >
> > -
> > To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
> > email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
> > Archive of past messages: http://www.minivend.com/minivend/minivend-list
>
> --
> Hans-Joachim Leidinger      hans-joachim.leidinger@home.gelsen-net.de
>
> -
> To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
> email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
> Archive of past messages: http://www.minivend.com/minivend/minivend-list



-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: