@stripe/stripe-js 10.0.0-rc.2 → 10.0.0-rc.4
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/dist/index.js +8 -61
- package/dist/index.mjs +8 -61
- package/dist/pure.js +8 -61
- package/dist/pure.mjs +8 -61
- package/dist/stripe-js/elements/base.d.mts +0 -3
- package/dist/stripe-js/elements/base.d.ts +0 -3
- package/dist/stripe-js/elements/index.d.mts +0 -1
- package/dist/stripe-js/elements/index.d.ts +0 -1
- package/dist/stripe-js/elements-group.d.mts +0 -25
- package/dist/stripe-js/elements-group.d.ts +0 -25
- package/dist/stripe-js/payment-intents.d.mts +39 -1
- package/dist/stripe-js/payment-intents.d.ts +39 -1
- package/dist/stripe-js/payment-request.d.mts +1 -4
- package/dist/stripe-js/payment-request.d.ts +1 -4
- package/dist/stripe-js/setup-intents.d.mts +1 -1
- package/dist/stripe-js/setup-intents.d.ts +1 -1
- package/dist/stripe-js/stripe.d.mts +18 -0
- package/dist/stripe-js/stripe.d.ts +18 -0
- package/package.json +1 -1
- package/src/shared.ts +1 -1
- package/dist/stripe-js/elements/payment-request-button.d.mts +0 -151
- package/dist/stripe-js/elements/payment-request-button.d.ts +0 -151
package/dist/index.js
CHANGED
|
@@ -18,42 +18,6 @@ function _typeof(obj) {
|
|
|
18
18
|
return _typeof(obj);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
22
|
-
try {
|
|
23
|
-
var info = gen[key](arg);
|
|
24
|
-
var value = info.value;
|
|
25
|
-
} catch (error) {
|
|
26
|
-
reject(error);
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
if (info.done) {
|
|
31
|
-
resolve(value);
|
|
32
|
-
} else {
|
|
33
|
-
Promise.resolve(value).then(_next, _throw);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
function _asyncToGenerator(fn) {
|
|
38
|
-
return function () {
|
|
39
|
-
var self = this,
|
|
40
|
-
args = arguments;
|
|
41
|
-
return new Promise(function (resolve, reject) {
|
|
42
|
-
var gen = fn.apply(self, args);
|
|
43
|
-
|
|
44
|
-
function _next(value) {
|
|
45
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
function _throw(err) {
|
|
49
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
_next(undefined);
|
|
53
|
-
});
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
|
|
57
21
|
var RELEASE_TRAIN = 'endive';
|
|
58
22
|
|
|
59
23
|
var runtimeVersionToUrlVersion = function runtimeVersionToUrlVersion(version) {
|
|
@@ -107,7 +71,7 @@ var registerWrapper = function registerWrapper(stripe, startTime) {
|
|
|
107
71
|
|
|
108
72
|
stripe._registerWrapper({
|
|
109
73
|
name: 'stripe-js',
|
|
110
|
-
version: "10.0.0-rc.
|
|
74
|
+
version: "10.0.0-rc.4",
|
|
111
75
|
startTime: startTime
|
|
112
76
|
});
|
|
113
77
|
};
|
|
@@ -188,29 +152,12 @@ var loadScript = function loadScript(params) {
|
|
|
188
152
|
});
|
|
189
153
|
};
|
|
190
154
|
|
|
191
|
-
var retryableLoad =
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
return _context.abrupt("return", load()["catch"](function (error) {
|
|
198
|
-
stripePromise$1 = null;
|
|
199
|
-
return Promise.reject(error);
|
|
200
|
-
}));
|
|
201
|
-
|
|
202
|
-
case 1:
|
|
203
|
-
case "end":
|
|
204
|
-
return _context.stop();
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
}, _callee);
|
|
208
|
-
}));
|
|
209
|
-
|
|
210
|
-
return function retryableLoad() {
|
|
211
|
-
return _ref.apply(this, arguments);
|
|
212
|
-
};
|
|
213
|
-
}(); // Resets stripePromise on error
|
|
155
|
+
var retryableLoad = function retryableLoad() {
|
|
156
|
+
return load()["catch"](function (error) {
|
|
157
|
+
stripePromise$1 = null;
|
|
158
|
+
return Promise.reject(error);
|
|
159
|
+
});
|
|
160
|
+
}; // Resets stripePromise on error
|
|
214
161
|
|
|
215
162
|
|
|
216
163
|
return retryableLoad()["catch"](function () {
|
|
@@ -234,7 +181,7 @@ var initStripe = function initStripe(maybeStripe, args, startTime) {
|
|
|
234
181
|
var expectedVersion = RELEASE_TRAIN;
|
|
235
182
|
|
|
236
183
|
if (isTestKey && version !== expectedVersion) {
|
|
237
|
-
console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("10.0.0-rc.
|
|
184
|
+
console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("10.0.0-rc.4", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
|
|
238
185
|
}
|
|
239
186
|
|
|
240
187
|
var stripe = maybeStripe.apply(undefined, args);
|
package/dist/index.mjs
CHANGED
|
@@ -14,42 +14,6 @@ function _typeof(obj) {
|
|
|
14
14
|
return _typeof(obj);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
18
|
-
try {
|
|
19
|
-
var info = gen[key](arg);
|
|
20
|
-
var value = info.value;
|
|
21
|
-
} catch (error) {
|
|
22
|
-
reject(error);
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
if (info.done) {
|
|
27
|
-
resolve(value);
|
|
28
|
-
} else {
|
|
29
|
-
Promise.resolve(value).then(_next, _throw);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
function _asyncToGenerator(fn) {
|
|
34
|
-
return function () {
|
|
35
|
-
var self = this,
|
|
36
|
-
args = arguments;
|
|
37
|
-
return new Promise(function (resolve, reject) {
|
|
38
|
-
var gen = fn.apply(self, args);
|
|
39
|
-
|
|
40
|
-
function _next(value) {
|
|
41
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
function _throw(err) {
|
|
45
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
_next(undefined);
|
|
49
|
-
});
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
|
|
53
17
|
var RELEASE_TRAIN = 'endive';
|
|
54
18
|
|
|
55
19
|
var runtimeVersionToUrlVersion = function runtimeVersionToUrlVersion(version) {
|
|
@@ -103,7 +67,7 @@ var registerWrapper = function registerWrapper(stripe, startTime) {
|
|
|
103
67
|
|
|
104
68
|
stripe._registerWrapper({
|
|
105
69
|
name: 'stripe-js',
|
|
106
|
-
version: "10.0.0-rc.
|
|
70
|
+
version: "10.0.0-rc.4",
|
|
107
71
|
startTime: startTime
|
|
108
72
|
});
|
|
109
73
|
};
|
|
@@ -184,29 +148,12 @@ var loadScript = function loadScript(params) {
|
|
|
184
148
|
});
|
|
185
149
|
};
|
|
186
150
|
|
|
187
|
-
var retryableLoad =
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
return _context.abrupt("return", load()["catch"](function (error) {
|
|
194
|
-
stripePromise$1 = null;
|
|
195
|
-
return Promise.reject(error);
|
|
196
|
-
}));
|
|
197
|
-
|
|
198
|
-
case 1:
|
|
199
|
-
case "end":
|
|
200
|
-
return _context.stop();
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
}, _callee);
|
|
204
|
-
}));
|
|
205
|
-
|
|
206
|
-
return function retryableLoad() {
|
|
207
|
-
return _ref.apply(this, arguments);
|
|
208
|
-
};
|
|
209
|
-
}(); // Resets stripePromise on error
|
|
151
|
+
var retryableLoad = function retryableLoad() {
|
|
152
|
+
return load()["catch"](function (error) {
|
|
153
|
+
stripePromise$1 = null;
|
|
154
|
+
return Promise.reject(error);
|
|
155
|
+
});
|
|
156
|
+
}; // Resets stripePromise on error
|
|
210
157
|
|
|
211
158
|
|
|
212
159
|
return retryableLoad()["catch"](function () {
|
|
@@ -230,7 +177,7 @@ var initStripe = function initStripe(maybeStripe, args, startTime) {
|
|
|
230
177
|
var expectedVersion = RELEASE_TRAIN;
|
|
231
178
|
|
|
232
179
|
if (isTestKey && version !== expectedVersion) {
|
|
233
|
-
console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("10.0.0-rc.
|
|
180
|
+
console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("10.0.0-rc.4", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
|
|
234
181
|
}
|
|
235
182
|
|
|
236
183
|
var stripe = maybeStripe.apply(undefined, args);
|
package/dist/pure.js
CHANGED
|
@@ -18,42 +18,6 @@ function _typeof(obj) {
|
|
|
18
18
|
return _typeof(obj);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
22
|
-
try {
|
|
23
|
-
var info = gen[key](arg);
|
|
24
|
-
var value = info.value;
|
|
25
|
-
} catch (error) {
|
|
26
|
-
reject(error);
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
if (info.done) {
|
|
31
|
-
resolve(value);
|
|
32
|
-
} else {
|
|
33
|
-
Promise.resolve(value).then(_next, _throw);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
function _asyncToGenerator(fn) {
|
|
38
|
-
return function () {
|
|
39
|
-
var self = this,
|
|
40
|
-
args = arguments;
|
|
41
|
-
return new Promise(function (resolve, reject) {
|
|
42
|
-
var gen = fn.apply(self, args);
|
|
43
|
-
|
|
44
|
-
function _next(value) {
|
|
45
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
function _throw(err) {
|
|
49
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
_next(undefined);
|
|
53
|
-
});
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
|
|
57
21
|
var RELEASE_TRAIN = 'endive';
|
|
58
22
|
|
|
59
23
|
var runtimeVersionToUrlVersion = function runtimeVersionToUrlVersion(version) {
|
|
@@ -107,7 +71,7 @@ var registerWrapper = function registerWrapper(stripe, startTime) {
|
|
|
107
71
|
|
|
108
72
|
stripe._registerWrapper({
|
|
109
73
|
name: 'stripe-js',
|
|
110
|
-
version: "10.0.0-rc.
|
|
74
|
+
version: "10.0.0-rc.4",
|
|
111
75
|
startTime: startTime
|
|
112
76
|
});
|
|
113
77
|
};
|
|
@@ -188,29 +152,12 @@ var loadScript = function loadScript(params) {
|
|
|
188
152
|
});
|
|
189
153
|
};
|
|
190
154
|
|
|
191
|
-
var retryableLoad =
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
return _context.abrupt("return", load()["catch"](function (error) {
|
|
198
|
-
stripePromise = null;
|
|
199
|
-
return Promise.reject(error);
|
|
200
|
-
}));
|
|
201
|
-
|
|
202
|
-
case 1:
|
|
203
|
-
case "end":
|
|
204
|
-
return _context.stop();
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
}, _callee);
|
|
208
|
-
}));
|
|
209
|
-
|
|
210
|
-
return function retryableLoad() {
|
|
211
|
-
return _ref.apply(this, arguments);
|
|
212
|
-
};
|
|
213
|
-
}(); // Resets stripePromise on error
|
|
155
|
+
var retryableLoad = function retryableLoad() {
|
|
156
|
+
return load()["catch"](function (error) {
|
|
157
|
+
stripePromise = null;
|
|
158
|
+
return Promise.reject(error);
|
|
159
|
+
});
|
|
160
|
+
}; // Resets stripePromise on error
|
|
214
161
|
|
|
215
162
|
|
|
216
163
|
return retryableLoad()["catch"](function () {
|
|
@@ -234,7 +181,7 @@ var initStripe = function initStripe(maybeStripe, args, startTime) {
|
|
|
234
181
|
var expectedVersion = RELEASE_TRAIN;
|
|
235
182
|
|
|
236
183
|
if (isTestKey && version !== expectedVersion) {
|
|
237
|
-
console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("10.0.0-rc.
|
|
184
|
+
console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("10.0.0-rc.4", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
|
|
238
185
|
}
|
|
239
186
|
|
|
240
187
|
var stripe = maybeStripe.apply(undefined, args);
|
package/dist/pure.mjs
CHANGED
|
@@ -14,42 +14,6 @@ function _typeof(obj) {
|
|
|
14
14
|
return _typeof(obj);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
18
|
-
try {
|
|
19
|
-
var info = gen[key](arg);
|
|
20
|
-
var value = info.value;
|
|
21
|
-
} catch (error) {
|
|
22
|
-
reject(error);
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
if (info.done) {
|
|
27
|
-
resolve(value);
|
|
28
|
-
} else {
|
|
29
|
-
Promise.resolve(value).then(_next, _throw);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
function _asyncToGenerator(fn) {
|
|
34
|
-
return function () {
|
|
35
|
-
var self = this,
|
|
36
|
-
args = arguments;
|
|
37
|
-
return new Promise(function (resolve, reject) {
|
|
38
|
-
var gen = fn.apply(self, args);
|
|
39
|
-
|
|
40
|
-
function _next(value) {
|
|
41
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
function _throw(err) {
|
|
45
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
_next(undefined);
|
|
49
|
-
});
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
|
|
53
17
|
var RELEASE_TRAIN = 'endive';
|
|
54
18
|
|
|
55
19
|
var runtimeVersionToUrlVersion = function runtimeVersionToUrlVersion(version) {
|
|
@@ -103,7 +67,7 @@ var registerWrapper = function registerWrapper(stripe, startTime) {
|
|
|
103
67
|
|
|
104
68
|
stripe._registerWrapper({
|
|
105
69
|
name: 'stripe-js',
|
|
106
|
-
version: "10.0.0-rc.
|
|
70
|
+
version: "10.0.0-rc.4",
|
|
107
71
|
startTime: startTime
|
|
108
72
|
});
|
|
109
73
|
};
|
|
@@ -184,29 +148,12 @@ var loadScript = function loadScript(params) {
|
|
|
184
148
|
});
|
|
185
149
|
};
|
|
186
150
|
|
|
187
|
-
var retryableLoad =
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
return _context.abrupt("return", load()["catch"](function (error) {
|
|
194
|
-
stripePromise = null;
|
|
195
|
-
return Promise.reject(error);
|
|
196
|
-
}));
|
|
197
|
-
|
|
198
|
-
case 1:
|
|
199
|
-
case "end":
|
|
200
|
-
return _context.stop();
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
}, _callee);
|
|
204
|
-
}));
|
|
205
|
-
|
|
206
|
-
return function retryableLoad() {
|
|
207
|
-
return _ref.apply(this, arguments);
|
|
208
|
-
};
|
|
209
|
-
}(); // Resets stripePromise on error
|
|
151
|
+
var retryableLoad = function retryableLoad() {
|
|
152
|
+
return load()["catch"](function (error) {
|
|
153
|
+
stripePromise = null;
|
|
154
|
+
return Promise.reject(error);
|
|
155
|
+
});
|
|
156
|
+
}; // Resets stripePromise on error
|
|
210
157
|
|
|
211
158
|
|
|
212
159
|
return retryableLoad()["catch"](function () {
|
|
@@ -230,7 +177,7 @@ var initStripe = function initStripe(maybeStripe, args, startTime) {
|
|
|
230
177
|
var expectedVersion = RELEASE_TRAIN;
|
|
231
178
|
|
|
232
179
|
if (isTestKey && version !== expectedVersion) {
|
|
233
|
-
console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("10.0.0-rc.
|
|
180
|
+
console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("10.0.0-rc.4", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
|
|
234
181
|
}
|
|
235
182
|
|
|
236
183
|
var stripe = maybeStripe.apply(undefined, args);
|
|
@@ -82,9 +82,6 @@ export interface StripeElementStyleVariant extends StripeElementCSSProperties {
|
|
|
82
82
|
|
|
83
83
|
':-webkit-autofill'?: StripeElementCSSProperties;
|
|
84
84
|
|
|
85
|
-
/**
|
|
86
|
-
* Available for all elements except the `paymentRequestButton` element
|
|
87
|
-
*/
|
|
88
85
|
':disabled'?: StripeElementCSSProperties;
|
|
89
86
|
|
|
90
87
|
/**
|
|
@@ -82,9 +82,6 @@ export interface StripeElementStyleVariant extends StripeElementCSSProperties {
|
|
|
82
82
|
|
|
83
83
|
':-webkit-autofill'?: StripeElementCSSProperties;
|
|
84
84
|
|
|
85
|
-
/**
|
|
86
|
-
* Available for all elements except the `paymentRequestButton` element
|
|
87
|
-
*/
|
|
88
85
|
':disabled'?: StripeElementCSSProperties;
|
|
89
86
|
|
|
90
87
|
/**
|
|
@@ -13,7 +13,6 @@ export * from './express-checkout';
|
|
|
13
13
|
export * from './iban';
|
|
14
14
|
export * from './link-authentication';
|
|
15
15
|
export * from './link-signup';
|
|
16
|
-
export * from './payment-request-button';
|
|
17
16
|
export * from './payment';
|
|
18
17
|
export * from './shipping-address';
|
|
19
18
|
export * from './issuing';
|
|
@@ -13,7 +13,6 @@ export * from './express-checkout';
|
|
|
13
13
|
export * from './iban';
|
|
14
14
|
export * from './link-authentication';
|
|
15
15
|
export * from './link-signup';
|
|
16
|
-
export * from './payment-request-button';
|
|
17
16
|
export * from './payment';
|
|
18
17
|
export * from './shipping-address';
|
|
19
18
|
export * from './issuing';
|
|
@@ -5,8 +5,6 @@ import {
|
|
|
5
5
|
StripeCurrencySelectorElementOptions,
|
|
6
6
|
StripeShippingAddressElement,
|
|
7
7
|
StripeShippingAddressElementOptions,
|
|
8
|
-
StripePaymentRequestButtonElement,
|
|
9
|
-
StripePaymentRequestButtonElementOptions,
|
|
10
8
|
StripePaymentElement,
|
|
11
9
|
StripePaymentElementOptions,
|
|
12
10
|
StripeLinkAuthenticationElement,
|
|
@@ -325,27 +323,6 @@ export interface StripeElements {
|
|
|
325
323
|
*/
|
|
326
324
|
getElement(elementType: 'payment'): StripePaymentElement | null;
|
|
327
325
|
|
|
328
|
-
/////////////////////////////
|
|
329
|
-
/// paymentRequestButton
|
|
330
|
-
/////////////////////////////
|
|
331
|
-
|
|
332
|
-
/**
|
|
333
|
-
* Creates a `PaymentRequestButtonElement`.
|
|
334
|
-
*
|
|
335
|
-
* @docs https://stripe.com/docs/stripe-js/elements/payment-request-button
|
|
336
|
-
*/
|
|
337
|
-
create(
|
|
338
|
-
elementType: 'paymentRequestButton',
|
|
339
|
-
options: StripePaymentRequestButtonElementOptions
|
|
340
|
-
): StripePaymentRequestButtonElement;
|
|
341
|
-
|
|
342
|
-
/**
|
|
343
|
-
* Looks up a previously created `Element` by its type.
|
|
344
|
-
*/
|
|
345
|
-
getElement(
|
|
346
|
-
elementType: 'paymentRequestButton'
|
|
347
|
-
): StripePaymentRequestButtonElement | null;
|
|
348
|
-
|
|
349
326
|
/////////////////////////////
|
|
350
327
|
/// shippingAddress
|
|
351
328
|
/////////////////////////////
|
|
@@ -511,7 +488,6 @@ export type StripeElementType =
|
|
|
511
488
|
| 'payment'
|
|
512
489
|
| 'paymentForm'
|
|
513
490
|
| 'paymentMethodMessaging'
|
|
514
|
-
| 'paymentRequestButton'
|
|
515
491
|
| 'linkAuthentication'
|
|
516
492
|
| 'linkSignup'
|
|
517
493
|
| 'shippingAddress'
|
|
@@ -539,7 +515,6 @@ export type StripeElement =
|
|
|
539
515
|
| StripePaymentElement
|
|
540
516
|
| StripeCheckoutForm
|
|
541
517
|
| StripePaymentMethodMessagingElement
|
|
542
|
-
| StripePaymentRequestButtonElement
|
|
543
518
|
| StripeIssuingCardNumberDisplayElement
|
|
544
519
|
| StripeIssuingCardCvcDisplayElement
|
|
545
520
|
| StripeIssuingCardExpiryDisplayElement
|
|
@@ -5,8 +5,6 @@ import {
|
|
|
5
5
|
StripeCurrencySelectorElementOptions,
|
|
6
6
|
StripeShippingAddressElement,
|
|
7
7
|
StripeShippingAddressElementOptions,
|
|
8
|
-
StripePaymentRequestButtonElement,
|
|
9
|
-
StripePaymentRequestButtonElementOptions,
|
|
10
8
|
StripePaymentElement,
|
|
11
9
|
StripePaymentElementOptions,
|
|
12
10
|
StripeLinkAuthenticationElement,
|
|
@@ -325,27 +323,6 @@ export interface StripeElements {
|
|
|
325
323
|
*/
|
|
326
324
|
getElement(elementType: 'payment'): StripePaymentElement | null;
|
|
327
325
|
|
|
328
|
-
/////////////////////////////
|
|
329
|
-
/// paymentRequestButton
|
|
330
|
-
/////////////////////////////
|
|
331
|
-
|
|
332
|
-
/**
|
|
333
|
-
* Creates a `PaymentRequestButtonElement`.
|
|
334
|
-
*
|
|
335
|
-
* @docs https://stripe.com/docs/stripe-js/elements/payment-request-button
|
|
336
|
-
*/
|
|
337
|
-
create(
|
|
338
|
-
elementType: 'paymentRequestButton',
|
|
339
|
-
options: StripePaymentRequestButtonElementOptions
|
|
340
|
-
): StripePaymentRequestButtonElement;
|
|
341
|
-
|
|
342
|
-
/**
|
|
343
|
-
* Looks up a previously created `Element` by its type.
|
|
344
|
-
*/
|
|
345
|
-
getElement(
|
|
346
|
-
elementType: 'paymentRequestButton'
|
|
347
|
-
): StripePaymentRequestButtonElement | null;
|
|
348
|
-
|
|
349
326
|
/////////////////////////////
|
|
350
327
|
/// shippingAddress
|
|
351
328
|
/////////////////////////////
|
|
@@ -511,7 +488,6 @@ export type StripeElementType =
|
|
|
511
488
|
| 'payment'
|
|
512
489
|
| 'paymentForm'
|
|
513
490
|
| 'paymentMethodMessaging'
|
|
514
|
-
| 'paymentRequestButton'
|
|
515
491
|
| 'linkAuthentication'
|
|
516
492
|
| 'linkSignup'
|
|
517
493
|
| 'shippingAddress'
|
|
@@ -539,7 +515,6 @@ export type StripeElement =
|
|
|
539
515
|
| StripePaymentElement
|
|
540
516
|
| StripeCheckoutForm
|
|
541
517
|
| StripePaymentMethodMessagingElement
|
|
542
|
-
| StripePaymentRequestButtonElement
|
|
543
518
|
| StripeIssuingCardNumberDisplayElement
|
|
544
519
|
| StripeIssuingCardCvcDisplayElement
|
|
545
520
|
| StripeIssuingCardExpiryDisplayElement
|
|
@@ -331,6 +331,11 @@ export interface CreatePaymentMethodP24Data extends PaymentMethodCreateParams {
|
|
|
331
331
|
};
|
|
332
332
|
}
|
|
333
333
|
|
|
334
|
+
export interface CreatePaymentMethodPayByBankData
|
|
335
|
+
extends PaymentMethodCreateParams {
|
|
336
|
+
type: 'pay_by_bank';
|
|
337
|
+
}
|
|
338
|
+
|
|
334
339
|
export interface CreatePaymentMethodPayNowData
|
|
335
340
|
extends PaymentMethodCreateParams {
|
|
336
341
|
type: 'paynow';
|
|
@@ -771,7 +776,7 @@ export interface ConfirmCardPaymentData extends PaymentIntentConfirmParams {
|
|
|
771
776
|
*/
|
|
772
777
|
export interface ConfirmCardPaymentOptions {
|
|
773
778
|
/**
|
|
774
|
-
* Set this to `false` if you want to [handle next actions yourself](https://stripe.com/docs/payments/payment-intents/verifying-status#next-actions), or if you want to defer next action handling until later (e.g. for use in the [PaymentRequest API](https://stripe.com/docs/
|
|
779
|
+
* Set this to `false` if you want to [handle next actions yourself](https://stripe.com/docs/payments/payment-intents/verifying-status#next-actions), or if you want to defer next action handling until later (e.g. for use in the [PaymentRequest API](https://stripe.com/docs/js/payment_request)).
|
|
775
780
|
* Default is `true`.
|
|
776
781
|
*/
|
|
777
782
|
handleActions?: boolean;
|
|
@@ -1232,6 +1237,39 @@ export interface ConfirmP24PaymentData extends PaymentIntentConfirmParams {
|
|
|
1232
1237
|
return_url?: string;
|
|
1233
1238
|
}
|
|
1234
1239
|
|
|
1240
|
+
/**
|
|
1241
|
+
* Data to be sent with a `stripe.confirmPayByBankPayment` request.
|
|
1242
|
+
* Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
|
|
1243
|
+
*/
|
|
1244
|
+
export interface ConfirmPayByBankPaymentData
|
|
1245
|
+
extends PaymentIntentConfirmParams {
|
|
1246
|
+
/**
|
|
1247
|
+
* Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
|
|
1248
|
+
* This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.
|
|
1249
|
+
*
|
|
1250
|
+
* @recommended
|
|
1251
|
+
*/
|
|
1252
|
+
payment_method?: string | Omit<CreatePaymentMethodPayByBankData, 'type'>;
|
|
1253
|
+
|
|
1254
|
+
/**
|
|
1255
|
+
* The url your customer will be directed to after they complete authentication.
|
|
1256
|
+
*
|
|
1257
|
+
* @recommended
|
|
1258
|
+
*/
|
|
1259
|
+
return_url?: string;
|
|
1260
|
+
}
|
|
1261
|
+
|
|
1262
|
+
/**
|
|
1263
|
+
* An options object to control the behavior of `stripe.confirmPayByBankPayment`.
|
|
1264
|
+
*/
|
|
1265
|
+
export interface ConfirmPayByBankPaymentOptions {
|
|
1266
|
+
/**
|
|
1267
|
+
* Set this to `false` if you want to manually handle the authorization redirect.
|
|
1268
|
+
* Default is `true`.
|
|
1269
|
+
*/
|
|
1270
|
+
handleActions?: boolean;
|
|
1271
|
+
}
|
|
1272
|
+
|
|
1235
1273
|
/**
|
|
1236
1274
|
* Data to be sent with a `stripe.confirmPayNowPayment` request.
|
|
1237
1275
|
* Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
|
|
@@ -331,6 +331,11 @@ export interface CreatePaymentMethodP24Data extends PaymentMethodCreateParams {
|
|
|
331
331
|
};
|
|
332
332
|
}
|
|
333
333
|
|
|
334
|
+
export interface CreatePaymentMethodPayByBankData
|
|
335
|
+
extends PaymentMethodCreateParams {
|
|
336
|
+
type: 'pay_by_bank';
|
|
337
|
+
}
|
|
338
|
+
|
|
334
339
|
export interface CreatePaymentMethodPayNowData
|
|
335
340
|
extends PaymentMethodCreateParams {
|
|
336
341
|
type: 'paynow';
|
|
@@ -771,7 +776,7 @@ export interface ConfirmCardPaymentData extends PaymentIntentConfirmParams {
|
|
|
771
776
|
*/
|
|
772
777
|
export interface ConfirmCardPaymentOptions {
|
|
773
778
|
/**
|
|
774
|
-
* Set this to `false` if you want to [handle next actions yourself](https://stripe.com/docs/payments/payment-intents/verifying-status#next-actions), or if you want to defer next action handling until later (e.g. for use in the [PaymentRequest API](https://stripe.com/docs/
|
|
779
|
+
* Set this to `false` if you want to [handle next actions yourself](https://stripe.com/docs/payments/payment-intents/verifying-status#next-actions), or if you want to defer next action handling until later (e.g. for use in the [PaymentRequest API](https://stripe.com/docs/js/payment_request)).
|
|
775
780
|
* Default is `true`.
|
|
776
781
|
*/
|
|
777
782
|
handleActions?: boolean;
|
|
@@ -1232,6 +1237,39 @@ export interface ConfirmP24PaymentData extends PaymentIntentConfirmParams {
|
|
|
1232
1237
|
return_url?: string;
|
|
1233
1238
|
}
|
|
1234
1239
|
|
|
1240
|
+
/**
|
|
1241
|
+
* Data to be sent with a `stripe.confirmPayByBankPayment` request.
|
|
1242
|
+
* Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
|
|
1243
|
+
*/
|
|
1244
|
+
export interface ConfirmPayByBankPaymentData
|
|
1245
|
+
extends PaymentIntentConfirmParams {
|
|
1246
|
+
/**
|
|
1247
|
+
* Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
|
|
1248
|
+
* This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.
|
|
1249
|
+
*
|
|
1250
|
+
* @recommended
|
|
1251
|
+
*/
|
|
1252
|
+
payment_method?: string | Omit<CreatePaymentMethodPayByBankData, 'type'>;
|
|
1253
|
+
|
|
1254
|
+
/**
|
|
1255
|
+
* The url your customer will be directed to after they complete authentication.
|
|
1256
|
+
*
|
|
1257
|
+
* @recommended
|
|
1258
|
+
*/
|
|
1259
|
+
return_url?: string;
|
|
1260
|
+
}
|
|
1261
|
+
|
|
1262
|
+
/**
|
|
1263
|
+
* An options object to control the behavior of `stripe.confirmPayByBankPayment`.
|
|
1264
|
+
*/
|
|
1265
|
+
export interface ConfirmPayByBankPaymentOptions {
|
|
1266
|
+
/**
|
|
1267
|
+
* Set this to `false` if you want to manually handle the authorization redirect.
|
|
1268
|
+
* Default is `true`.
|
|
1269
|
+
*/
|
|
1270
|
+
handleActions?: boolean;
|
|
1271
|
+
}
|
|
1272
|
+
|
|
1235
1273
|
/**
|
|
1236
1274
|
* Data to be sent with a `stripe.confirmPayNowPayment` request.
|
|
1237
1275
|
* Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
|
|
@@ -10,7 +10,6 @@ export interface PaymentRequest {
|
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Shows the browser’s payment interface.
|
|
13
|
-
* When using the `PaymentRequestButtonElement`, this is called for you automatically.
|
|
14
13
|
* This method must be called as the result of a user interaction (for example, in a click handler).
|
|
15
14
|
*/
|
|
16
15
|
show(): void;
|
|
@@ -22,7 +21,6 @@ export interface PaymentRequest {
|
|
|
22
21
|
|
|
23
22
|
/**
|
|
24
23
|
* `true` if the browser’s payment interface is showing.
|
|
25
|
-
* When using the `PaymentRequestButtonElement`, this is called for you automatically.
|
|
26
24
|
*/
|
|
27
25
|
isShowing: () => boolean;
|
|
28
26
|
|
|
@@ -30,8 +28,7 @@ export interface PaymentRequest {
|
|
|
30
28
|
* `PaymentRequest` instances can be updated with an options object.
|
|
31
29
|
*
|
|
32
30
|
* `paymentRequest.update` can only be called when the browser payment interface is not showing.
|
|
33
|
-
*
|
|
34
|
-
* To update the `PaymentRequest` right before the payment interface is initiated, call `paymentRequest.update` in your click event handler.
|
|
31
|
+
* To update the `PaymentRequest` right before the payment interface is initiated, call `paymentRequest.update` in your user-interaction handler immediately before calling `paymentRequest.show`.
|
|
35
32
|
*/
|
|
36
33
|
update(options: PaymentRequestUpdateOptions): void;
|
|
37
34
|
|
|
@@ -10,7 +10,6 @@ export interface PaymentRequest {
|
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Shows the browser’s payment interface.
|
|
13
|
-
* When using the `PaymentRequestButtonElement`, this is called for you automatically.
|
|
14
13
|
* This method must be called as the result of a user interaction (for example, in a click handler).
|
|
15
14
|
*/
|
|
16
15
|
show(): void;
|
|
@@ -22,7 +21,6 @@ export interface PaymentRequest {
|
|
|
22
21
|
|
|
23
22
|
/**
|
|
24
23
|
* `true` if the browser’s payment interface is showing.
|
|
25
|
-
* When using the `PaymentRequestButtonElement`, this is called for you automatically.
|
|
26
24
|
*/
|
|
27
25
|
isShowing: () => boolean;
|
|
28
26
|
|
|
@@ -30,8 +28,7 @@ export interface PaymentRequest {
|
|
|
30
28
|
* `PaymentRequest` instances can be updated with an options object.
|
|
31
29
|
*
|
|
32
30
|
* `paymentRequest.update` can only be called when the browser payment interface is not showing.
|
|
33
|
-
*
|
|
34
|
-
* To update the `PaymentRequest` right before the payment interface is initiated, call `paymentRequest.update` in your click event handler.
|
|
31
|
+
* To update the `PaymentRequest` right before the payment interface is initiated, call `paymentRequest.update` in your user-interaction handler immediately before calling `paymentRequest.show`.
|
|
35
32
|
*/
|
|
36
33
|
update(options: PaymentRequestUpdateOptions): void;
|
|
37
34
|
|
|
@@ -95,7 +95,7 @@ export interface ConfirmCardSetupData extends SetupIntentConfirmParams {
|
|
|
95
95
|
*/
|
|
96
96
|
export interface ConfirmCardSetupOptions {
|
|
97
97
|
/*
|
|
98
|
-
* Set this to `false` if you want to [handle next actions yourself](https://stripe.com/docs/payments/payment-intents/verifying-status#next-actions), or if you want to defer next action handling until later (e.g. for use in the [PaymentRequest API](https://stripe.com/docs/
|
|
98
|
+
* Set this to `false` if you want to [handle next actions yourself](https://stripe.com/docs/payments/payment-intents/verifying-status#next-actions), or if you want to defer next action handling until later (e.g. for use in the [PaymentRequest API](https://stripe.com/docs/js/payment_request)).
|
|
99
99
|
* Default is `true`.
|
|
100
100
|
*/
|
|
101
101
|
handleActions?: boolean;
|
|
@@ -95,7 +95,7 @@ export interface ConfirmCardSetupData extends SetupIntentConfirmParams {
|
|
|
95
95
|
*/
|
|
96
96
|
export interface ConfirmCardSetupOptions {
|
|
97
97
|
/*
|
|
98
|
-
* Set this to `false` if you want to [handle next actions yourself](https://stripe.com/docs/payments/payment-intents/verifying-status#next-actions), or if you want to defer next action handling until later (e.g. for use in the [PaymentRequest API](https://stripe.com/docs/
|
|
98
|
+
* Set this to `false` if you want to [handle next actions yourself](https://stripe.com/docs/payments/payment-intents/verifying-status#next-actions), or if you want to defer next action handling until later (e.g. for use in the [PaymentRequest API](https://stripe.com/docs/js/payment_request)).
|
|
99
99
|
* Default is `true`.
|
|
100
100
|
*/
|
|
101
101
|
handleActions?: boolean;
|
|
@@ -496,6 +496,24 @@ export interface Stripe {
|
|
|
496
496
|
options?: paymentIntents.ConfirmP24PaymentOptions
|
|
497
497
|
): Promise<PaymentIntentResult>;
|
|
498
498
|
|
|
499
|
+
/**
|
|
500
|
+
* Use `stripe.confirmPayByBankPayment` in the [Pay by Bank Payments](https://docs.stripe.com/payments/pay-by-bank) with Payment Methods flow when the customer submits your payment form.
|
|
501
|
+
* When called, it will confirm the `PaymentIntent` with `data` you provide, and it will automatically redirect the customer to authorize the transaction.
|
|
502
|
+
* Once authorization is complete, the customer will be redirected back to your specified `return_url`.
|
|
503
|
+
* Refer to our [integration guide](https://docs.stripe.com/payments/pay-by-bank) for more details.
|
|
504
|
+
*
|
|
505
|
+
* When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
|
|
506
|
+
* In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new PaymentMethod for you.
|
|
507
|
+
* If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
|
|
508
|
+
*
|
|
509
|
+
* @docs https://stripe.com/docs/js/payment_intents/confirm_pay_by_bank_payment
|
|
510
|
+
*/
|
|
511
|
+
confirmPayByBankPayment(
|
|
512
|
+
clientSecret: string,
|
|
513
|
+
data?: paymentIntents.ConfirmPayByBankPaymentData,
|
|
514
|
+
options?: paymentIntents.ConfirmPayByBankPaymentOptions
|
|
515
|
+
): Promise<PaymentIntentResult>;
|
|
516
|
+
|
|
499
517
|
/**
|
|
500
518
|
* Requires beta access:
|
|
501
519
|
* Contact [Stripe support](https://support.stripe.com/) for more information.
|
|
@@ -496,6 +496,24 @@ export interface Stripe {
|
|
|
496
496
|
options?: paymentIntents.ConfirmP24PaymentOptions
|
|
497
497
|
): Promise<PaymentIntentResult>;
|
|
498
498
|
|
|
499
|
+
/**
|
|
500
|
+
* Use `stripe.confirmPayByBankPayment` in the [Pay by Bank Payments](https://docs.stripe.com/payments/pay-by-bank) with Payment Methods flow when the customer submits your payment form.
|
|
501
|
+
* When called, it will confirm the `PaymentIntent` with `data` you provide, and it will automatically redirect the customer to authorize the transaction.
|
|
502
|
+
* Once authorization is complete, the customer will be redirected back to your specified `return_url`.
|
|
503
|
+
* Refer to our [integration guide](https://docs.stripe.com/payments/pay-by-bank) for more details.
|
|
504
|
+
*
|
|
505
|
+
* When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
|
|
506
|
+
* In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new PaymentMethod for you.
|
|
507
|
+
* If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
|
|
508
|
+
*
|
|
509
|
+
* @docs https://stripe.com/docs/js/payment_intents/confirm_pay_by_bank_payment
|
|
510
|
+
*/
|
|
511
|
+
confirmPayByBankPayment(
|
|
512
|
+
clientSecret: string,
|
|
513
|
+
data?: paymentIntents.ConfirmPayByBankPaymentData,
|
|
514
|
+
options?: paymentIntents.ConfirmPayByBankPaymentOptions
|
|
515
|
+
): Promise<PaymentIntentResult>;
|
|
516
|
+
|
|
499
517
|
/**
|
|
500
518
|
* Requires beta access:
|
|
501
519
|
* Contact [Stripe support](https://support.stripe.com/) for more information.
|
package/package.json
CHANGED
package/src/shared.ts
CHANGED
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
import {StripeElementBase, StripeElementClasses} from './base';
|
|
2
|
-
import {PaymentRequest} from '../payment-request';
|
|
3
|
-
import {Omit} from '../../utils';
|
|
4
|
-
|
|
5
|
-
export type StripePaymentRequestButtonElement = StripeElementBase & {
|
|
6
|
-
/**
|
|
7
|
-
* Triggered when the payment request button is clicked.
|
|
8
|
-
*/
|
|
9
|
-
on(
|
|
10
|
-
eventType: 'click',
|
|
11
|
-
handler: (event: StripePaymentRequestButtonElementClickEvent) => any
|
|
12
|
-
): StripePaymentRequestButtonElement;
|
|
13
|
-
once(
|
|
14
|
-
eventType: 'click',
|
|
15
|
-
handler: (event: StripePaymentRequestButtonElementClickEvent) => any
|
|
16
|
-
): StripePaymentRequestButtonElement;
|
|
17
|
-
off(
|
|
18
|
-
eventType: 'click',
|
|
19
|
-
handler?: (event: StripePaymentRequestButtonElementClickEvent) => any
|
|
20
|
-
): StripePaymentRequestButtonElement;
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Triggered when the element is fully rendered and can accept `element.focus` calls.
|
|
24
|
-
*/
|
|
25
|
-
on(
|
|
26
|
-
eventType: 'ready',
|
|
27
|
-
handler: (event: {elementType: 'paymentRequestButton'}) => any
|
|
28
|
-
): StripePaymentRequestButtonElement;
|
|
29
|
-
once(
|
|
30
|
-
eventType: 'ready',
|
|
31
|
-
handler: (event: {elementType: 'paymentRequestButton'}) => any
|
|
32
|
-
): StripePaymentRequestButtonElement;
|
|
33
|
-
off(
|
|
34
|
-
eventType: 'ready',
|
|
35
|
-
handler?: (event: {elementType: 'paymentRequestButton'}) => any
|
|
36
|
-
): StripePaymentRequestButtonElement;
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Triggered when the element gains focus.
|
|
40
|
-
*/
|
|
41
|
-
on(
|
|
42
|
-
eventType: 'focus',
|
|
43
|
-
handler: (event: {elementType: 'paymentRequestButton'}) => any
|
|
44
|
-
): StripePaymentRequestButtonElement;
|
|
45
|
-
once(
|
|
46
|
-
eventType: 'focus',
|
|
47
|
-
handler: (event: {elementType: 'paymentRequestButton'}) => any
|
|
48
|
-
): StripePaymentRequestButtonElement;
|
|
49
|
-
off(
|
|
50
|
-
eventType: 'focus',
|
|
51
|
-
handler?: (event: {elementType: 'paymentRequestButton'}) => any
|
|
52
|
-
): StripePaymentRequestButtonElement;
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Triggered when the element loses focus.
|
|
56
|
-
*/
|
|
57
|
-
on(
|
|
58
|
-
eventType: 'blur',
|
|
59
|
-
handler: (event: {elementType: 'paymentRequestButton'}) => any
|
|
60
|
-
): StripePaymentRequestButtonElement;
|
|
61
|
-
once(
|
|
62
|
-
eventType: 'blur',
|
|
63
|
-
handler: (event: {elementType: 'paymentRequestButton'}) => any
|
|
64
|
-
): StripePaymentRequestButtonElement;
|
|
65
|
-
off(
|
|
66
|
-
eventType: 'blur',
|
|
67
|
-
handler?: (event: {elementType: 'paymentRequestButton'}) => any
|
|
68
|
-
): StripePaymentRequestButtonElement;
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* Updates the options the `PaymentRequestButtonElement` was initialized with.
|
|
72
|
-
* Updates are merged into the existing configuration.
|
|
73
|
-
*
|
|
74
|
-
* The styles of an `PaymentRequestButtonElement` can be dynamically changed using `element.update`.
|
|
75
|
-
* This method can be used to simulate CSS media queries that automatically adjust the size of elements when viewed on different devices.
|
|
76
|
-
*/
|
|
77
|
-
update(
|
|
78
|
-
options: Partial<
|
|
79
|
-
Omit<StripePaymentRequestButtonElementOptions, 'paymentRequest'>
|
|
80
|
-
>
|
|
81
|
-
): void;
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
export interface StripePaymentRequestButtonElementOptions {
|
|
85
|
-
classes?: StripeElementClasses;
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* An object used to customize the appearance of the Payment Request Button.
|
|
89
|
-
* The object must have a single `paymentRequestButton` field, containing any of the following sub-fields
|
|
90
|
-
*/
|
|
91
|
-
style?: {
|
|
92
|
-
paymentRequestButton: {
|
|
93
|
-
/**
|
|
94
|
-
* Preferred button type to display. Available types, by wallet:
|
|
95
|
-
*
|
|
96
|
-
* Browser card: default, book, buy, or donate.
|
|
97
|
-
*
|
|
98
|
-
* Google Pay: default, buy, or donate.
|
|
99
|
-
*
|
|
100
|
-
* Apple Pay: default, book, buy, donate, check-out, subscribe, reload, add-money, top-up, order, rent, support, contribute, tip
|
|
101
|
-
*
|
|
102
|
-
* When a wallet does not support the provided value, default is used as a fallback.
|
|
103
|
-
*/
|
|
104
|
-
type?:
|
|
105
|
-
| 'default'
|
|
106
|
-
| 'book'
|
|
107
|
-
| 'buy'
|
|
108
|
-
| 'donate'
|
|
109
|
-
| 'check-out'
|
|
110
|
-
| 'subscribe'
|
|
111
|
-
| 'reload'
|
|
112
|
-
| 'add-money'
|
|
113
|
-
| 'top-up'
|
|
114
|
-
| 'order'
|
|
115
|
-
| 'rent'
|
|
116
|
-
| 'support'
|
|
117
|
-
| 'contribute'
|
|
118
|
-
| 'tip';
|
|
119
|
-
|
|
120
|
-
/**
|
|
121
|
-
* One of dark, light, or light-outline. The default is dark.
|
|
122
|
-
*/
|
|
123
|
-
theme?: 'dark' | 'light' | 'light-outline';
|
|
124
|
-
|
|
125
|
-
/**
|
|
126
|
-
* The height of the Payment Request Button. Accepts px unit values.
|
|
127
|
-
*/
|
|
128
|
-
height?: string;
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* The gap between buttons when multile buttons are shown. Accepts px unit values.
|
|
132
|
-
*/
|
|
133
|
-
buttonSpacing?: string;
|
|
134
|
-
};
|
|
135
|
-
};
|
|
136
|
-
|
|
137
|
-
/**
|
|
138
|
-
* A `PaymentRequest` object used to configure the element.
|
|
139
|
-
*/
|
|
140
|
-
paymentRequest: PaymentRequest;
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* Disable showing multiple buttons.
|
|
144
|
-
* Default is `false`.
|
|
145
|
-
*/
|
|
146
|
-
disableMultipleButtons?: boolean;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
export interface StripePaymentRequestButtonElementClickEvent {
|
|
150
|
-
preventDefault: () => void;
|
|
151
|
-
}
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
import {StripeElementBase, StripeElementClasses} from './base';
|
|
2
|
-
import {PaymentRequest} from '../payment-request';
|
|
3
|
-
import {Omit} from '../../utils';
|
|
4
|
-
|
|
5
|
-
export type StripePaymentRequestButtonElement = StripeElementBase & {
|
|
6
|
-
/**
|
|
7
|
-
* Triggered when the payment request button is clicked.
|
|
8
|
-
*/
|
|
9
|
-
on(
|
|
10
|
-
eventType: 'click',
|
|
11
|
-
handler: (event: StripePaymentRequestButtonElementClickEvent) => any
|
|
12
|
-
): StripePaymentRequestButtonElement;
|
|
13
|
-
once(
|
|
14
|
-
eventType: 'click',
|
|
15
|
-
handler: (event: StripePaymentRequestButtonElementClickEvent) => any
|
|
16
|
-
): StripePaymentRequestButtonElement;
|
|
17
|
-
off(
|
|
18
|
-
eventType: 'click',
|
|
19
|
-
handler?: (event: StripePaymentRequestButtonElementClickEvent) => any
|
|
20
|
-
): StripePaymentRequestButtonElement;
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Triggered when the element is fully rendered and can accept `element.focus` calls.
|
|
24
|
-
*/
|
|
25
|
-
on(
|
|
26
|
-
eventType: 'ready',
|
|
27
|
-
handler: (event: {elementType: 'paymentRequestButton'}) => any
|
|
28
|
-
): StripePaymentRequestButtonElement;
|
|
29
|
-
once(
|
|
30
|
-
eventType: 'ready',
|
|
31
|
-
handler: (event: {elementType: 'paymentRequestButton'}) => any
|
|
32
|
-
): StripePaymentRequestButtonElement;
|
|
33
|
-
off(
|
|
34
|
-
eventType: 'ready',
|
|
35
|
-
handler?: (event: {elementType: 'paymentRequestButton'}) => any
|
|
36
|
-
): StripePaymentRequestButtonElement;
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Triggered when the element gains focus.
|
|
40
|
-
*/
|
|
41
|
-
on(
|
|
42
|
-
eventType: 'focus',
|
|
43
|
-
handler: (event: {elementType: 'paymentRequestButton'}) => any
|
|
44
|
-
): StripePaymentRequestButtonElement;
|
|
45
|
-
once(
|
|
46
|
-
eventType: 'focus',
|
|
47
|
-
handler: (event: {elementType: 'paymentRequestButton'}) => any
|
|
48
|
-
): StripePaymentRequestButtonElement;
|
|
49
|
-
off(
|
|
50
|
-
eventType: 'focus',
|
|
51
|
-
handler?: (event: {elementType: 'paymentRequestButton'}) => any
|
|
52
|
-
): StripePaymentRequestButtonElement;
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Triggered when the element loses focus.
|
|
56
|
-
*/
|
|
57
|
-
on(
|
|
58
|
-
eventType: 'blur',
|
|
59
|
-
handler: (event: {elementType: 'paymentRequestButton'}) => any
|
|
60
|
-
): StripePaymentRequestButtonElement;
|
|
61
|
-
once(
|
|
62
|
-
eventType: 'blur',
|
|
63
|
-
handler: (event: {elementType: 'paymentRequestButton'}) => any
|
|
64
|
-
): StripePaymentRequestButtonElement;
|
|
65
|
-
off(
|
|
66
|
-
eventType: 'blur',
|
|
67
|
-
handler?: (event: {elementType: 'paymentRequestButton'}) => any
|
|
68
|
-
): StripePaymentRequestButtonElement;
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* Updates the options the `PaymentRequestButtonElement` was initialized with.
|
|
72
|
-
* Updates are merged into the existing configuration.
|
|
73
|
-
*
|
|
74
|
-
* The styles of an `PaymentRequestButtonElement` can be dynamically changed using `element.update`.
|
|
75
|
-
* This method can be used to simulate CSS media queries that automatically adjust the size of elements when viewed on different devices.
|
|
76
|
-
*/
|
|
77
|
-
update(
|
|
78
|
-
options: Partial<
|
|
79
|
-
Omit<StripePaymentRequestButtonElementOptions, 'paymentRequest'>
|
|
80
|
-
>
|
|
81
|
-
): void;
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
export interface StripePaymentRequestButtonElementOptions {
|
|
85
|
-
classes?: StripeElementClasses;
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* An object used to customize the appearance of the Payment Request Button.
|
|
89
|
-
* The object must have a single `paymentRequestButton` field, containing any of the following sub-fields
|
|
90
|
-
*/
|
|
91
|
-
style?: {
|
|
92
|
-
paymentRequestButton: {
|
|
93
|
-
/**
|
|
94
|
-
* Preferred button type to display. Available types, by wallet:
|
|
95
|
-
*
|
|
96
|
-
* Browser card: default, book, buy, or donate.
|
|
97
|
-
*
|
|
98
|
-
* Google Pay: default, buy, or donate.
|
|
99
|
-
*
|
|
100
|
-
* Apple Pay: default, book, buy, donate, check-out, subscribe, reload, add-money, top-up, order, rent, support, contribute, tip
|
|
101
|
-
*
|
|
102
|
-
* When a wallet does not support the provided value, default is used as a fallback.
|
|
103
|
-
*/
|
|
104
|
-
type?:
|
|
105
|
-
| 'default'
|
|
106
|
-
| 'book'
|
|
107
|
-
| 'buy'
|
|
108
|
-
| 'donate'
|
|
109
|
-
| 'check-out'
|
|
110
|
-
| 'subscribe'
|
|
111
|
-
| 'reload'
|
|
112
|
-
| 'add-money'
|
|
113
|
-
| 'top-up'
|
|
114
|
-
| 'order'
|
|
115
|
-
| 'rent'
|
|
116
|
-
| 'support'
|
|
117
|
-
| 'contribute'
|
|
118
|
-
| 'tip';
|
|
119
|
-
|
|
120
|
-
/**
|
|
121
|
-
* One of dark, light, or light-outline. The default is dark.
|
|
122
|
-
*/
|
|
123
|
-
theme?: 'dark' | 'light' | 'light-outline';
|
|
124
|
-
|
|
125
|
-
/**
|
|
126
|
-
* The height of the Payment Request Button. Accepts px unit values.
|
|
127
|
-
*/
|
|
128
|
-
height?: string;
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* The gap between buttons when multile buttons are shown. Accepts px unit values.
|
|
132
|
-
*/
|
|
133
|
-
buttonSpacing?: string;
|
|
134
|
-
};
|
|
135
|
-
};
|
|
136
|
-
|
|
137
|
-
/**
|
|
138
|
-
* A `PaymentRequest` object used to configure the element.
|
|
139
|
-
*/
|
|
140
|
-
paymentRequest: PaymentRequest;
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* Disable showing multiple buttons.
|
|
144
|
-
* Default is `false`.
|
|
145
|
-
*/
|
|
146
|
-
disableMultipleButtons?: boolean;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
export interface StripePaymentRequestButtonElementClickEvent {
|
|
150
|
-
preventDefault: () => void;
|
|
151
|
-
}
|