@idonatedev/idonate-sdk 1.0.16 → 1.1.0-dev0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -0
- package/dist/apple-pay.d.ts +0 -1
- package/dist/apple-pay.js +32 -62
- package/dist/cloudflare-challenge-handler.d.ts +2 -2
- package/dist/cloudflare-challenge-handler.js +65 -92
- package/dist/config-handler.d.ts +3 -0
- package/dist/config-handler.js +16 -11
- package/dist/constants.d.ts +1 -0
- package/dist/constants.js +66 -2
- package/dist/google-pay.d.ts +0 -1
- package/dist/google-pay.js +65 -78
- package/dist/idonate-client.d.ts +6 -19
- package/dist/idonate-client.js +165 -192
- package/dist/index.js +40 -11
- package/dist/recaptcha.d.ts +0 -1
- package/dist/recaptcha.js +40 -49
- package/dist/shared.js +8 -9
- package/dist/test-utils.d.ts +81 -0
- package/dist/test-utils.js +110 -0
- package/dist/tokenize/CardConnectTokenizer.d.ts +43 -0
- package/dist/tokenize/CardConnectTokenizer.js +620 -0
- package/dist/tokenize/SpreedlyTokenizer.d.ts +85 -0
- package/dist/tokenize/SpreedlyTokenizer.js +952 -0
- package/dist/tokenize/Tokenizer.d.ts +32 -0
- package/dist/tokenize/Tokenizer.js +183 -0
- package/dist/tokenize/iats.js +11 -13
- package/dist/tokenize/index.d.ts +5 -3
- package/dist/tokenize/index.js +43 -6
- package/dist/tokenize/spreedly-secure.d.ts +8 -0
- package/dist/tokenize/spreedly-secure.js +43 -0
- package/dist/tokenize/styles.d.ts +3 -0
- package/dist/tokenize/styles.js +42 -0
- package/dist/tokenize/tokenizer-constants.d.ts +62 -0
- package/dist/tokenize/tokenizer-constants.js +65 -0
- package/dist/tokenize/tokenizer-utils.d.ts +19 -0
- package/dist/tokenize/tokenizer-utils.js +156 -0
- package/dist/tokenize/types.d.ts +149 -0
- package/dist/tokenize/types.js +30 -0
- package/dist/typeAdapters.d.ts +3 -2
- package/dist/typeAdapters.js +39 -48
- package/dist/types.d.ts +48 -41
- package/dist/types.js +12 -24
- package/dist/util.d.ts +2 -2
- package/dist/util.js +30 -33
- package/package.json +41 -18
- package/umd/idonate-sdk.js +1 -1
- package/dist/tokenize/cardconnect.d.ts +0 -3
- package/dist/tokenize/cardconnect.js +0 -16
- package/dist/tokenize/spreedly.d.ts +0 -48
- package/dist/tokenize/spreedly.js +0 -208
package/dist/recaptcha.js
CHANGED
|
@@ -1,27 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.
|
|
3
|
+
exports.RecaptchaElement = void 0;
|
|
4
|
+
exports.injectScript = injectScript;
|
|
5
|
+
exports.wrapElement = wrapElement;
|
|
15
6
|
function resolveLib() {
|
|
16
|
-
|
|
17
|
-
return new Promise(
|
|
7
|
+
const startWait = new Date();
|
|
8
|
+
return new Promise((resolve, reject) => {
|
|
18
9
|
function poll() {
|
|
19
10
|
if (window.grecaptcha !== undefined &&
|
|
20
11
|
window.grecaptcha.render !== undefined) {
|
|
21
12
|
resolve(window.grecaptcha);
|
|
22
13
|
}
|
|
23
14
|
else {
|
|
24
|
-
|
|
15
|
+
const elapsedMs = new Date().valueOf() - startWait.valueOf();
|
|
25
16
|
if (elapsedMs > 15000) {
|
|
26
17
|
reject(new Error('grecaptcha not loaded after 15 seconds'));
|
|
27
18
|
}
|
|
@@ -37,68 +28,68 @@ function injectScript(callback) {
|
|
|
37
28
|
if (window.grecaptcha !== undefined) {
|
|
38
29
|
throw new Error('grecaptcha is already defined');
|
|
39
30
|
}
|
|
40
|
-
|
|
31
|
+
const script = document.createElement('script');
|
|
41
32
|
script.src = 'https://www.google.com/recaptcha/api.js?render=explicit';
|
|
42
33
|
script.async = true;
|
|
43
34
|
script.defer = true;
|
|
44
35
|
script.onload = callback || null;
|
|
45
|
-
if (document.readyState === 'interactive' ||
|
|
36
|
+
if (document.readyState === 'interactive' ||
|
|
37
|
+
document.readyState === 'complete') {
|
|
46
38
|
document.body.appendChild(script);
|
|
47
39
|
}
|
|
48
40
|
else {
|
|
49
|
-
window.addEventListener('DOMContentLoaded',
|
|
41
|
+
window.addEventListener('DOMContentLoaded', () => {
|
|
50
42
|
document.body.appendChild(script);
|
|
51
43
|
});
|
|
52
44
|
}
|
|
53
45
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
function RecaptchaElement(container, params) {
|
|
46
|
+
class RecaptchaElement {
|
|
47
|
+
constructor(container, params) {
|
|
57
48
|
this.container = container;
|
|
58
49
|
this.params = params;
|
|
59
50
|
this.executeResolveQueue = [];
|
|
60
51
|
}
|
|
61
|
-
|
|
62
|
-
var _this = this;
|
|
52
|
+
render() {
|
|
63
53
|
if (this.widgetId !== undefined) {
|
|
64
54
|
console.warn('rendering an already-rendered widget');
|
|
65
55
|
}
|
|
66
|
-
return resolveLib().then(
|
|
67
|
-
|
|
56
|
+
return resolveLib().then((lib) => {
|
|
57
|
+
this.widgetId = lib.render(this.container, Object.assign(Object.assign({}, this.params), { callback: (token) => {
|
|
68
58
|
var _a;
|
|
69
|
-
|
|
70
|
-
(_a =
|
|
71
|
-
}, 'expired-callback':
|
|
72
|
-
|
|
59
|
+
this.resolvedToken = token;
|
|
60
|
+
(_a = this.executeResolveQueue.pop()) === null || _a === void 0 ? void 0 : _a(token);
|
|
61
|
+
}, 'expired-callback': () => {
|
|
62
|
+
this.resolvedToken = undefined;
|
|
73
63
|
} }));
|
|
74
64
|
});
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
if (
|
|
81
|
-
|
|
82
|
-
return response
|
|
65
|
+
}
|
|
66
|
+
resolveToken() {
|
|
67
|
+
return new Promise((resolve, reject) => {
|
|
68
|
+
resolveLib()
|
|
69
|
+
.then((lib) => {
|
|
70
|
+
if (this.params.size !== 'invisible') {
|
|
71
|
+
const response = lib.getResponse();
|
|
72
|
+
return response
|
|
73
|
+
? resolve(response)
|
|
74
|
+
: reject(new Error('checkbox recaptcha is not checked'));
|
|
83
75
|
}
|
|
84
|
-
|
|
85
|
-
if (
|
|
86
|
-
|
|
87
|
-
lib.reset(
|
|
76
|
+
this.executeResolveQueue.push(resolve);
|
|
77
|
+
if (this.resolvedToken !== undefined) {
|
|
78
|
+
this.resolvedToken = undefined;
|
|
79
|
+
lib.reset(this.widgetId);
|
|
88
80
|
}
|
|
89
|
-
lib.execute(
|
|
90
|
-
})
|
|
81
|
+
lib.execute(this.widgetId);
|
|
82
|
+
})
|
|
83
|
+
.catch((e) => {
|
|
91
84
|
reject(e);
|
|
92
85
|
});
|
|
93
86
|
});
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
}());
|
|
87
|
+
}
|
|
88
|
+
}
|
|
97
89
|
exports.RecaptchaElement = RecaptchaElement;
|
|
98
90
|
function wrapElement(container, sitekey, extraParams) {
|
|
99
|
-
|
|
100
|
-
|
|
91
|
+
const params = Object.assign(Object.assign({}, (extraParams || {})), { sitekey });
|
|
92
|
+
const captcha = new RecaptchaElement(container, params);
|
|
101
93
|
captcha.render();
|
|
102
94
|
return captcha;
|
|
103
95
|
}
|
|
104
|
-
exports.wrapElement = wrapElement;
|
package/dist/shared.js
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createPaymentMethod =
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
exports.createPaymentMethod = createPaymentMethod;
|
|
4
|
+
const typeAdapters_1 = require("./typeAdapters");
|
|
5
|
+
const constants_1 = require("./constants");
|
|
6
|
+
const util_1 = require("./util");
|
|
7
7
|
function createPaymentMethod(paymentMethod, config) {
|
|
8
|
-
|
|
9
|
-
return fetch(config.embedApiBaseUrl
|
|
8
|
+
const payload = (0, typeAdapters_1.buildCreatePaymentMethodPayload)(paymentMethod);
|
|
9
|
+
return fetch(`${config.embedApiBaseUrl}/payment/payment-methods`, {
|
|
10
10
|
method: 'POST',
|
|
11
11
|
headers: constants_1.CLIENT_HEADERS,
|
|
12
12
|
body: JSON.stringify(payload),
|
|
13
13
|
})
|
|
14
|
-
.then(
|
|
15
|
-
.then(
|
|
14
|
+
.then((response) => (0, util_1.parseResponse)(response, { throwErrors: true }))
|
|
15
|
+
.then((response) => (0, typeAdapters_1.buildCreatePaymentMethodResult)(response));
|
|
16
16
|
}
|
|
17
|
-
exports.createPaymentMethod = createPaymentMethod;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
export declare const createMockFetch: (response: any, options?: {
|
|
2
|
+
ok?: boolean;
|
|
3
|
+
status?: number;
|
|
4
|
+
}) => jest.Mock<any, any, any>;
|
|
5
|
+
export declare const createMockFetchError: (message: string) => jest.Mock<any, any, any>;
|
|
6
|
+
export declare const createMockFetchWithImplementation: (implementation: (url: string, options?: any) => Promise<any>) => jest.Mock<any, any, any>;
|
|
7
|
+
export declare const setupFetchMock: () => jest.Mock<any, any, any>;
|
|
8
|
+
export declare const setupDocumentMock: () => {
|
|
9
|
+
mockScript: {
|
|
10
|
+
src: string;
|
|
11
|
+
async: boolean;
|
|
12
|
+
defer: boolean;
|
|
13
|
+
};
|
|
14
|
+
mockAppendChild: jest.Mock<any, any, any>;
|
|
15
|
+
mockCreateElement: jest.Mock<any, [], any>;
|
|
16
|
+
};
|
|
17
|
+
export declare const setupApplePayEnvironment: (options?: {
|
|
18
|
+
canMakePayments?: boolean;
|
|
19
|
+
supportsVersion?: boolean;
|
|
20
|
+
}) => {
|
|
21
|
+
mockSession: {
|
|
22
|
+
begin: jest.Mock<any, any, any>;
|
|
23
|
+
abort: jest.Mock<any, any, any>;
|
|
24
|
+
completeMerchantValidation: jest.Mock<any, any, any>;
|
|
25
|
+
completePayment: jest.Mock<any, any, any>;
|
|
26
|
+
};
|
|
27
|
+
ApplePaySessionMock: any;
|
|
28
|
+
};
|
|
29
|
+
export declare const setupGooglePayEnvironment: (options?: {
|
|
30
|
+
autoLoad?: boolean;
|
|
31
|
+
}) => {
|
|
32
|
+
mockPaymentsClient: {
|
|
33
|
+
isReadyToPay: jest.Mock<any, any, any>;
|
|
34
|
+
loadPaymentData: jest.Mock<any, any, any>;
|
|
35
|
+
};
|
|
36
|
+
googlePayMock: {
|
|
37
|
+
payments: {
|
|
38
|
+
api: {
|
|
39
|
+
PaymentsClient: jest.Mock<{
|
|
40
|
+
isReadyToPay: jest.Mock<any, any, any>;
|
|
41
|
+
loadPaymentData: jest.Mock<any, any, any>;
|
|
42
|
+
}, [], any>;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
export declare const setupRecaptchaEnvironment: () => {
|
|
48
|
+
render: jest.Mock<any, any, any>;
|
|
49
|
+
reset: jest.Mock<any, any, any>;
|
|
50
|
+
execute: jest.Mock<any, any, any>;
|
|
51
|
+
getResponse: jest.Mock<any, any, any>;
|
|
52
|
+
};
|
|
53
|
+
export declare const createTestContact: (overrides?: {}) => {
|
|
54
|
+
salutation: string;
|
|
55
|
+
firstName: string;
|
|
56
|
+
lastName: string;
|
|
57
|
+
company: string;
|
|
58
|
+
email: string;
|
|
59
|
+
primaryPhone: string;
|
|
60
|
+
};
|
|
61
|
+
export declare const createTestAddress: (overrides?: {}) => {
|
|
62
|
+
address1: string;
|
|
63
|
+
address2: string;
|
|
64
|
+
city: string;
|
|
65
|
+
state: string;
|
|
66
|
+
zip: string;
|
|
67
|
+
country: string;
|
|
68
|
+
};
|
|
69
|
+
export declare const createTestCreditCard: (overrides?: {}) => {
|
|
70
|
+
cardNumber: string;
|
|
71
|
+
expirationMonth: string;
|
|
72
|
+
expirationYear: string;
|
|
73
|
+
verificationValue: string;
|
|
74
|
+
};
|
|
75
|
+
export declare const createTestBankAccount: (overrides?: {}) => {
|
|
76
|
+
accountNumber: string;
|
|
77
|
+
routingNumber: string;
|
|
78
|
+
accountType: "checking";
|
|
79
|
+
accountHolderType: "personal";
|
|
80
|
+
};
|
|
81
|
+
export declare const cleanupWindowMocks: () => void;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.cleanupWindowMocks = exports.createTestBankAccount = exports.createTestCreditCard = exports.createTestAddress = exports.createTestContact = exports.setupRecaptchaEnvironment = exports.setupGooglePayEnvironment = exports.setupApplePayEnvironment = exports.setupDocumentMock = exports.setupFetchMock = exports.createMockFetchWithImplementation = exports.createMockFetchError = exports.createMockFetch = void 0;
|
|
13
|
+
const createMockFetch = (response, options = {}) => {
|
|
14
|
+
return jest.fn().mockResolvedValue({
|
|
15
|
+
ok: options.ok !== false,
|
|
16
|
+
status: options.status || 200,
|
|
17
|
+
json: () => __awaiter(void 0, void 0, void 0, function* () { return response; }),
|
|
18
|
+
text: () => __awaiter(void 0, void 0, void 0, function* () { return JSON.stringify(response); }),
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
exports.createMockFetch = createMockFetch;
|
|
22
|
+
const createMockFetchError = (message) => {
|
|
23
|
+
return jest.fn().mockRejectedValue(new Error(message));
|
|
24
|
+
};
|
|
25
|
+
exports.createMockFetchError = createMockFetchError;
|
|
26
|
+
const createMockFetchWithImplementation = (implementation) => {
|
|
27
|
+
return jest.fn().mockImplementation(implementation);
|
|
28
|
+
};
|
|
29
|
+
exports.createMockFetchWithImplementation = createMockFetchWithImplementation;
|
|
30
|
+
const setupFetchMock = () => {
|
|
31
|
+
const mockFetch = jest.fn();
|
|
32
|
+
global.fetch = mockFetch;
|
|
33
|
+
return mockFetch;
|
|
34
|
+
};
|
|
35
|
+
exports.setupFetchMock = setupFetchMock;
|
|
36
|
+
const setupDocumentMock = () => {
|
|
37
|
+
const mockScript = {
|
|
38
|
+
src: '',
|
|
39
|
+
async: false,
|
|
40
|
+
defer: false,
|
|
41
|
+
};
|
|
42
|
+
const mockAppendChild = jest.fn();
|
|
43
|
+
const mockCreateElement = jest.fn(() => mockScript);
|
|
44
|
+
Object.defineProperty(document, 'createElement', {
|
|
45
|
+
value: mockCreateElement,
|
|
46
|
+
writable: true,
|
|
47
|
+
});
|
|
48
|
+
Object.defineProperty(document.body, 'appendChild', {
|
|
49
|
+
value: mockAppendChild,
|
|
50
|
+
writable: true,
|
|
51
|
+
});
|
|
52
|
+
return { mockScript, mockAppendChild, mockCreateElement };
|
|
53
|
+
};
|
|
54
|
+
exports.setupDocumentMock = setupDocumentMock;
|
|
55
|
+
const setupApplePayEnvironment = (options = {}) => {
|
|
56
|
+
const mockSession = {
|
|
57
|
+
begin: jest.fn(),
|
|
58
|
+
abort: jest.fn(),
|
|
59
|
+
completeMerchantValidation: jest.fn(),
|
|
60
|
+
completePayment: jest.fn(),
|
|
61
|
+
};
|
|
62
|
+
const ApplePaySessionMock = jest.fn(() => mockSession);
|
|
63
|
+
ApplePaySessionMock.canMakePayments = jest.fn(() => options.canMakePayments !== false);
|
|
64
|
+
ApplePaySessionMock.supportsVersion = jest.fn(() => options.supportsVersion !== false);
|
|
65
|
+
window.ApplePaySession = ApplePaySessionMock;
|
|
66
|
+
return { mockSession, ApplePaySessionMock };
|
|
67
|
+
};
|
|
68
|
+
exports.setupApplePayEnvironment = setupApplePayEnvironment;
|
|
69
|
+
const setupGooglePayEnvironment = (options = {}) => {
|
|
70
|
+
const mockPaymentsClient = {
|
|
71
|
+
isReadyToPay: jest.fn(),
|
|
72
|
+
loadPaymentData: jest.fn(),
|
|
73
|
+
};
|
|
74
|
+
const googlePayMock = {
|
|
75
|
+
payments: {
|
|
76
|
+
api: {
|
|
77
|
+
PaymentsClient: jest.fn(() => mockPaymentsClient),
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
};
|
|
81
|
+
if (options.autoLoad) {
|
|
82
|
+
window.google = googlePayMock;
|
|
83
|
+
}
|
|
84
|
+
return { mockPaymentsClient, googlePayMock };
|
|
85
|
+
};
|
|
86
|
+
exports.setupGooglePayEnvironment = setupGooglePayEnvironment;
|
|
87
|
+
const setupRecaptchaEnvironment = () => {
|
|
88
|
+
const mockGrecaptcha = {
|
|
89
|
+
render: jest.fn().mockReturnValue(123),
|
|
90
|
+
reset: jest.fn(),
|
|
91
|
+
execute: jest.fn(),
|
|
92
|
+
getResponse: jest.fn().mockReturnValue(null),
|
|
93
|
+
};
|
|
94
|
+
return mockGrecaptcha;
|
|
95
|
+
};
|
|
96
|
+
exports.setupRecaptchaEnvironment = setupRecaptchaEnvironment;
|
|
97
|
+
const createTestContact = (overrides = {}) => (Object.assign({ salutation: 'Mr', firstName: 'John', lastName: 'Doe', company: 'Test Corp', email: 'test@example.com', primaryPhone: '555-1234' }, overrides));
|
|
98
|
+
exports.createTestContact = createTestContact;
|
|
99
|
+
const createTestAddress = (overrides = {}) => (Object.assign({ address1: '123 Test St', address2: 'Suite 100', city: 'Test City', state: 'NY', zip: '10001', country: 'US' }, overrides));
|
|
100
|
+
exports.createTestAddress = createTestAddress;
|
|
101
|
+
const createTestCreditCard = (overrides = {}) => (Object.assign({ cardNumber: '4111111111111111', expirationMonth: '12', expirationYear: '2025', verificationValue: '123' }, overrides));
|
|
102
|
+
exports.createTestCreditCard = createTestCreditCard;
|
|
103
|
+
const createTestBankAccount = (overrides = {}) => (Object.assign({ accountNumber: '1234567890', routingNumber: '021000021', accountType: 'checking', accountHolderType: 'personal' }, overrides));
|
|
104
|
+
exports.createTestBankAccount = createTestBankAccount;
|
|
105
|
+
const cleanupWindowMocks = () => {
|
|
106
|
+
delete window.ApplePaySession;
|
|
107
|
+
delete window.google;
|
|
108
|
+
delete window.grecaptcha;
|
|
109
|
+
};
|
|
110
|
+
exports.cleanupWindowMocks = cleanupWindowMocks;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Tokenizer } from './Tokenizer';
|
|
2
|
+
import { PaymentData, PaymentToken, ValidationResult, PaymentGateway, TokenizerContainer } from './types';
|
|
3
|
+
import { TokenizeCardConnectBankAccountResult } from '../types';
|
|
4
|
+
import ConfigHandler from '../config-handler';
|
|
5
|
+
export declare class CardConnectTokenizer extends Tokenizer {
|
|
6
|
+
private iframeUrl;
|
|
7
|
+
private containerId;
|
|
8
|
+
private iframe;
|
|
9
|
+
private messageHandler?;
|
|
10
|
+
private expectedOrigin;
|
|
11
|
+
private isReady;
|
|
12
|
+
private currentValidationState;
|
|
13
|
+
private containerEl?;
|
|
14
|
+
private routingNumberEl?;
|
|
15
|
+
private accountNumberEl?;
|
|
16
|
+
private accountTypeEl?;
|
|
17
|
+
private enableTestMode;
|
|
18
|
+
private cachedTokenResult?;
|
|
19
|
+
private constructor();
|
|
20
|
+
static create(gateway: PaymentGateway, container: TokenizerContainer, config?: {
|
|
21
|
+
organizationId: string;
|
|
22
|
+
embedId: string;
|
|
23
|
+
}): Promise<CardConnectTokenizer>;
|
|
24
|
+
private createInternalElements;
|
|
25
|
+
private createCreditCardFields;
|
|
26
|
+
private createBankAccountFields;
|
|
27
|
+
private init;
|
|
28
|
+
tokenize(paymentData: PaymentData): Promise<PaymentToken>;
|
|
29
|
+
private tokenizeCardInternal;
|
|
30
|
+
private tokenizeBankAccountInternal;
|
|
31
|
+
validate(): Promise<ValidationResult>;
|
|
32
|
+
private validateCardInternal;
|
|
33
|
+
private validateBankAccountInternal;
|
|
34
|
+
clear(): void;
|
|
35
|
+
focus(field: 'cardNumber' | 'cvv' | 'expiry' | 'routingNumber' | 'accountNumber'): void;
|
|
36
|
+
destroy(): void;
|
|
37
|
+
private handleMessage;
|
|
38
|
+
private handleValidationMessage;
|
|
39
|
+
private static generateIframeUrl;
|
|
40
|
+
private static createIframe;
|
|
41
|
+
private static generateCardConnectCss;
|
|
42
|
+
static tokenizeBankAccount(routingNumber: string, accountNumber: string, config: ConfigHandler): Promise<TokenizeCardConnectBankAccountResult>;
|
|
43
|
+
}
|