Merge pull request #3296 from ianschmitz/patch-1

Update stripe.d.ts
This commit is contained in:
Basarat Ali Syed
2014-12-14 18:00:51 +11:00
+5 -3
View File
@@ -1,16 +1,16 @@
// Type definitions for stripe
// Type definitions for stripe
// Project: https://stripe.com/
// Definitions by: Eric J. Smith <https://github.com/ejsmith/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
interface StripeStatic {
setPublishableKey(key: string);
createToken(data: StripeTokenData, responseHandler: (status: number, response: StripeTokenResponse) => void);
validateCardNumber(cardNumber: string): boolean;
validateExpiry(month: string, year: string): boolean;
validateCVC(cardCVC: string): boolean;
cardType(cardNumber: string): string;
getToken(token: string, responseHandler: (status: number, response: StripeTokenResponse) => void);
card: StripeCardData;
}
interface StripeTokenData {
@@ -57,6 +57,8 @@ interface StripeCardData {
address_state?: string;
address_zip?: string;
address_country?: string;
createToken(data: StripeTokenData, responseHandler: (status: number, response: StripeTokenResponse) => void);
}
declare var Stripe: StripeStatic;
declare var Stripe: StripeStatic;