Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

Platforms to show: All Mac Windows Linux Cross-Platform

IsValidCreditCardNumberMBS(Number as String) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
global method Math MBS Util Plugin 11.3 Yes Yes Yes Yes No
Function: Verifies a credit card number.
MsgBox "test 49927398716 gives "+str(IsValidCreditCardNumberMBS("49927398716"))+EndOfLine+_
"test 49927398717 gives "+str(IsValidCreditCardNumberMBS("49927398717"))
This function implements the Luhn algorithm. This is a simple checksum formula used to validate a variety of identification numbers, such as credit card numbers, IMEI numbers, National Provider Identifier numbers in US and Canadian Social Insurance Numbers.
Returns true on success or false on failure.

If this function returns false, you can be sure the number is not valid. But if the function returns true, you may want to check the number online with some database.

Feedback, Comments & Corrections

The items on this page are in the following plugins: MBS Util Plugin.

MBS Xojo Chart Plugins