5

I am using authorize.net {aim} for my payment gateway.

But my client needs to validate the cvv [Card Verification Value] using jquery. How can this be done?

Thanks in advance...

4

1 回答 1

5

试试这个功能,

     function validate_cvv(cvv){

         var myRe = /^[0-9]{3,4}$/;
         var myArray = myRe.exec(cvv);
         if(cvv!=myArray)
          {
            alert("Invalid cvv number"); //invalid cvv number
            return false;
         }else{
             return true;  //valid cvv number
            }

         }
于 2013-05-22T12:03:53.367 回答