Skip to content

maxiPago! Smart Payments - Credit card validation scripts (luhn check)

Notifications You must be signed in to change notification settings

maxipago/sdk-card-validation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PORTUGUÊS

O algorítmo Luhn é usado por todas as grandes bandeiras internacionais de cartão para validar números de cartões de crédito. O algorítmo usa o próprio número de cartão para se auto-validar, portanto não há nenhum dígito verificador como acontece no CPF.

Passar o cartão de crédito por uma validação de Luhn é extramente útil para empresas que vendem online, pois assim é possível identificar erros de digitação por parte do comprador que, se forem enviados para a operadora de cartão, voltarão com uma resposta de Cartão Negado.

Neste repositório colocamos à disposição scripts de validação Luhn em Java, JavaScript e PHP. Os scripts não são de nossa autoria, mas foram testados pela maxiPago!.

O site Rosetta Code, fonte destes scripts, possui validações em mais de 30 linguagens e pode ser acessado aqui.

ENGLISH

The Luhn algorithm is used by all major credit card brands to validate the card numbers. The algorithm uses the card number itself for auto-validation, so there is no verification digit or anything similar.

Validating the credit card number through a Luhn check is extremely useful for online retailers, as it's possible to identify and avoid typing errors from the buyer, which if sent to the acquirer will result in a Declined transaction.

This repository has Luhn validation scripts in Java, JavaScript and PHP. They were not written by us though we have tested them.

The Rosetta Code website, source of these scripts, has validations in over 30 languages which can be seen here.

About

maxiPago! Smart Payments - Credit card validation scripts (luhn check)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published