forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjquery.payment.d.ts
More file actions
26 lines (22 loc) · 766 Bytes
/
Copy pathjquery.payment.d.ts
File metadata and controls
26 lines (22 loc) · 766 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Type definitions for jQuery.payment
// Project: https://github.com/stripe/jquery.payment
// Definitions by: Eric J. Smith <https://github.com/ejsmith/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
interface JQuery {
payment(validatorName: string);
}
interface JQueryStatic {
payment: JQueryPayment;
}
interface JQueryPayment {
validateCardNumber(cardNumber: string) : boolean;
validateCardExpiry(year: string, month: string) : boolean;
validateCardExpiry(expiry: any) : boolean;
validateCardCVC(cvc: string, type: string) : boolean;
cardType(cardNumber: string): string;
cardExpiryVal(monthYear: string): JQueryPaymentExpiryInfo;
}
interface JQueryPaymentExpiryInfo {
month: number;
year: number;
}