isValidCardNumber
- Method
SlimCD.Validate.isValidCardNumber
Purpose
Checks the cardnumber argument to insure it matches the MOD-10 algorithm.
Description
xxx.
Business Rules
Argument List
Name Required Usage isValidCardNumberRequest Required Object containing properties for the request timeout Optional Integer wait time, in seconds, before timeout response is generated callback* Optional Function to call upon completion of asynchronous request * for JavaScript only
isValidCardNumber Request Fields
field string required n/a descr 1footnote.
Reply Fields
reply outer tag for the reply data bloc response Success, FAIL, Error Reply Hierarchy
- one
- 1
- 2
- 3
- 4
Remarks
xxx.
- one
- Include
123<script src="https://trans.slimcd.com/soft/json/slimcd.js" type="text/javascript"></script>
Method
123function Validate.isValidCardNumber (cardnumber)request
123cardnumberReply
123True or FalseSample Code
12345678910111213<script src="https://trans.slimcd.com/soft/json/slimcd.js" type="text/javascript"></script><script type="text/javascript">// <![CDATA[{var valid_creditcard = '4444333322221111';if (SlimCD.Validate.isValidCardNumber(valid_creditcard) === true) {alert('valid credit card number');}else {alert('invalid credit card number');}}// ]]></script>Downloads
- Method
123code
request
123codeReply
123codeSample Code
1234567$SlimCD =new SlimCD() ;if ($SlimCD->Validate_isValidCardNumber('4444555577778888') )   echo 'Valid Card';else   echo 'Not a Valid Card';Downloads
- Include
123using SlimCD;
Method
123public bool isValidCardNumber(string creditCardNumber);Request
123456789public class CloseBatchRequest{public string username { get; set; }public string password { get; set; }public int siteid { get; set; }public string batchnumber { get; set; }}Reply
12345678910public class CloseBatchReply{public string response { get; set; }public string responsecode { get; set; }public string description { get; set; }public string responseurl { get; set; }public string datablock { get; set; }}Sample
12345678910111213using SlimCD.Transact;CloseBatchRequest request = new CloseBatchRequest();CloseBatchReply reply = new CloseBatchReply();request.username = "R6UT8C6M";reply = CloseBatch(request, 600);if (reply.response=="Success"){...} else {MessageBox.show (reply.description);}Downloads
- Method
123public async Task<CloseBatchReply> CloseBatch(CloseBatchRequest request, int timeout = 600)
Request
123456789public class CloseBatchRequest{public string username { get; set; }public string password { get; set; }public int siteid { get; set; }public string batchnumber { get; set; }}Reply
12345678910public class CloseBatchReply{public string response { get; set; }public string responsecode { get; set; }public string description { get; set; }public string responseurl { get; set; }public string datablock { get; set; }}Sample
123456789using SlimCD.Transact;CloseBatchRequest request = new CloseBatchRequest();CloseBatchReply reply = new CloseBatchReply();request.username = "1032";request.password = "289075";request.siteid = 0;reply = await CloseBatch(request, 600);Downloads
- Include
123#import "SlimCD.h"
Method
123- (BOOL) validateIsValidCardNumber:(NSString*)theString;Reply
123YES or NOSample Code
1234567891011SlimCD *api = [[SlimCD alloc] init];if ([api validateIsValidCardNumber:@"4444555566669999"]){NSLog(@"Card number is valid.");}else{NSLog(@"Card number is NOT valid.");} - Method
123code
request
123codeReply
123codeSample Code
123codeDownloads