Reply
Member
Posts: 9
Registered: ‎07-03-2019

Credict card validation using accept.js

Hi, 

When using Accept.js with my own html form, I build it like this:

 

<form id="paymentForm"
method="POST"
action="https://YourServer/PathToExistingPaymentProcessingScript" >
<input type="text" name="cardNumber" id="cardNumber" placeholder="cardNumber"/> <br><br>
<input type="text" name="expMonth" id="expMonth" placeholder="expMonth"/> <br><br>
<input type="text" name="expYear" id="expYear" placeholder="expYear"/> <br><br>
<input type="text" name="cardCode" id="cardCode" placeholder="cardCode"/> <br><br>
<input type="hidden" name="dataValue" id="dataValue" />
<input type="hidden" name="dataDescriptor" id="dataDescriptor" />
<button type="button" onclick="sendPaymentDataToAnet()">Pay</button>
</form>

 

I have read that "Accept.js contains built-in data type validation for these fields. While Accept.js validates the data, it doesn’t do any authorization of the card number or any check to see if the expiration date, postal code, or card code are correct for that card. Those steps will happen later in the process when you submit the payment nonce as part of a transaction request."

 

The question is, how can I get this validations responses to print them on my form? Is there any example?

And, is it possible to get those validations responses in spanish?