@internetarchive/donation-form 1.0.2 → 1.0.3-alpha-webdev7960.1
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/LICENSE +661 -661
- package/README.md +115 -115
- package/dist/demo/braintree-endpoint-manager.js.map +1 -1
- package/dist/demo/demo-analytics-handler.js.map +1 -1
- package/dist/demo/submit-form-with.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/src/braintree-manager/braintree-interfaces.js.map +1 -1
- package/dist/src/braintree-manager/braintree-manager.js.map +1 -1
- package/dist/src/braintree-manager/payment-clients.js.map +1 -1
- package/dist/src/braintree-manager/payment-providers/apple-pay/apple-pay-interface.js.map +1 -1
- package/dist/src/braintree-manager/payment-providers/apple-pay/apple-pay-session-datasource-delegate.js.map +1 -1
- package/dist/src/braintree-manager/payment-providers/apple-pay/apple-pay-session-datasource-interface.js.map +1 -1
- package/dist/src/braintree-manager/payment-providers/apple-pay/apple-pay-session-datasource.js.map +1 -1
- package/dist/src/braintree-manager/payment-providers/apple-pay/apple-pay-session-manager.js.map +1 -1
- package/dist/src/braintree-manager/payment-providers/apple-pay/apple-pay.js.map +1 -1
- package/dist/src/braintree-manager/payment-providers/credit-card/credit-card-interface.js.map +1 -1
- package/dist/src/braintree-manager/payment-providers/credit-card/credit-card.js.map +1 -1
- package/dist/src/braintree-manager/payment-providers/credit-card/hosted-field-configuration.js.map +1 -1
- package/dist/src/braintree-manager/payment-providers/credit-card/hosted-field-container.js.map +1 -1
- package/dist/src/braintree-manager/payment-providers/google-pay-interface.js.map +1 -1
- package/dist/src/braintree-manager/payment-providers/google-pay.js.map +1 -1
- package/dist/src/braintree-manager/payment-providers/paypal/paypal-button-datasource.js.map +1 -1
- package/dist/src/braintree-manager/payment-providers/paypal/paypal-interface.js.map +1 -1
- package/dist/src/braintree-manager/payment-providers/paypal/paypal.js.map +1 -1
- package/dist/src/braintree-manager/payment-providers/venmo-interface.js.map +1 -1
- package/dist/src/braintree-manager/payment-providers/venmo.js.map +1 -1
- package/dist/src/braintree-manager/payment-providers-interface.js.map +1 -1
- package/dist/src/braintree-manager/payment-providers.js.map +1 -1
- package/dist/src/donation-form-controller.js +123 -123
- package/dist/src/donation-form-controller.js.map +1 -1
- package/dist/src/donation-form-error.js.map +1 -1
- package/dist/src/donation-form.js +107 -107
- package/dist/src/donation-form.js.map +1 -1
- package/dist/src/form-elements/badged-input.js +47 -47
- package/dist/src/form-elements/badged-input.js.map +1 -1
- package/dist/src/form-elements/contact-form/autocomplete-field-options.js.map +1 -1
- package/dist/src/form-elements/contact-form/contact-form.js +157 -157
- package/dist/src/form-elements/contact-form/contact-form.js.map +1 -1
- package/dist/src/form-elements/contact-form/countries.js.map +1 -1
- package/dist/src/form-elements/header/donation-form-header.js +14 -14
- package/dist/src/form-elements/header/donation-form-header.js.map +1 -1
- package/dist/src/form-elements/header/donation-summary.js +15 -15
- package/dist/src/form-elements/header/donation-summary.js.map +1 -1
- package/dist/src/form-elements/payment-selector.js +164 -164
- package/dist/src/form-elements/payment-selector.js.map +1 -1
- package/dist/src/form-elements/total-amount.js +16 -16
- package/dist/src/form-elements/total-amount.js.map +1 -1
- package/dist/src/modals/confirm-donation-modal-content.js +51 -51
- package/dist/src/modals/confirm-donation-modal-content.js.map +1 -1
- package/dist/src/modals/error-modal-content.js +22 -22
- package/dist/src/modals/error-modal-content.js.map +1 -1
- package/dist/src/modals/upsell-modal-content.js +182 -182
- package/dist/src/modals/upsell-modal-content.js.map +1 -1
- package/dist/src/payment-flow-handlers/donation-flow-modal-manager.js +20 -20
- package/dist/src/payment-flow-handlers/donation-flow-modal-manager.js.map +1 -1
- package/dist/src/payment-flow-handlers/handlers/applepay-flow-handler.js.map +1 -1
- package/dist/src/payment-flow-handlers/handlers/creditcard-flow-handler.js.map +1 -1
- package/dist/src/payment-flow-handlers/handlers/googlepay-flow-handler.js.map +1 -1
- package/dist/src/payment-flow-handlers/handlers/paypal-flow-handler.js.map +1 -1
- package/dist/src/payment-flow-handlers/handlers/venmo-flow-handler.js.map +1 -1
- package/dist/src/payment-flow-handlers/handlers/venmo-restoration-state-handler.js.map +1 -1
- package/dist/src/payment-flow-handlers/payment-flow-handlers.js.map +1 -1
- package/dist/src/recaptcha-manager/recaptcha-manager.js.map +1 -1
- package/dist/src/util/promisedSleep.js.map +1 -1
- package/dist/test/helpers/fillInContactForm.js.map +1 -1
- package/dist/test/mocks/flow-handlers/individual-handlers/mock-applepay-flow-handler.js.map +1 -1
- package/dist/test/mocks/flow-handlers/individual-handlers/mock-creditcard-flow-handler.js.map +1 -1
- package/dist/test/mocks/flow-handlers/individual-handlers/mock-googlepay-flow-handler.js.map +1 -1
- package/dist/test/mocks/flow-handlers/individual-handlers/mock-paypal-flow-handler.js.map +1 -1
- package/dist/test/mocks/flow-handlers/individual-handlers/mock-venmo-flow-handler.js.map +1 -1
- package/dist/test/mocks/flow-handlers/mock-payment-flow-handlers.js.map +1 -1
- package/dist/test/mocks/mock-braintree-manager.js.map +1 -1
- package/dist/test/mocks/mock-donation-info.js.map +1 -1
- package/dist/test/mocks/mock-endpoint-manager.js.map +1 -1
- package/dist/test/mocks/mock-hosted-fields-config.js.map +1 -1
- package/dist/test/mocks/mock-hosted-fields-container.js.map +1 -1
- package/dist/test/mocks/mock-lazy-loader.js.map +1 -1
- package/dist/test/mocks/mock-modal-manager.js.map +1 -1
- package/dist/test/mocks/mock-payment-clients.js.map +1 -1
- package/dist/test/mocks/mock-paypal-button-renderer.js.map +1 -1
- package/dist/test/mocks/mock-recaptcha-manager.js.map +1 -1
- package/dist/test/mocks/models/mock-billing-info.js.map +1 -1
- package/dist/test/mocks/models/mock-custom-fields.js.map +1 -1
- package/dist/test/mocks/models/mock-customer-info.js.map +1 -1
- package/dist/test/mocks/models/mock-donation-request.js.map +1 -1
- package/dist/test/mocks/models/mock-success-response.js.map +1 -1
- package/dist/test/mocks/payment-clients/mock-applepay-client.js.map +1 -1
- package/dist/test/mocks/payment-clients/mock-applepay-payment.js.map +1 -1
- package/dist/test/mocks/payment-clients/mock-applepay-paymentauthorizedevent.js.map +1 -1
- package/dist/test/mocks/payment-clients/mock-applepay-session.js.map +1 -1
- package/dist/test/mocks/payment-clients/mock-applepay-sessionmanager.js.map +1 -1
- package/dist/test/mocks/payment-clients/mock-applepay-validatemerchantevent.js.map +1 -1
- package/dist/test/mocks/payment-clients/mock-braintree-client.js.map +1 -1
- package/dist/test/mocks/payment-clients/mock-data-collector.js.map +1 -1
- package/dist/test/mocks/payment-clients/mock-googlepay-client.js.map +1 -1
- package/dist/test/mocks/payment-clients/mock-googlepay-library.js.map +1 -1
- package/dist/test/mocks/payment-clients/mock-grecaptcha.js.map +1 -1
- package/dist/test/mocks/payment-clients/mock-hostedfields-client.js.map +1 -1
- package/dist/test/mocks/payment-clients/mock-hostedfieldstateobject-generator.js.map +1 -1
- package/dist/test/mocks/payment-clients/mock-hostedfieldtokenizepayload.js.map +1 -1
- package/dist/test/mocks/payment-clients/mock-paypal-client.js.map +1 -1
- package/dist/test/mocks/payment-clients/mock-paypal-library.js.map +1 -1
- package/dist/test/mocks/payment-clients/mock-venmo-client.js.map +1 -1
- package/dist/test/mocks/payment-providers/individual-providers/mock-applepay-datasource-delegate.js.map +1 -1
- package/dist/test/mocks/payment-providers/individual-providers/mock-applepay-handler.js.map +1 -1
- package/dist/test/mocks/payment-providers/individual-providers/mock-creditcard-handler.js.map +1 -1
- package/dist/test/mocks/payment-providers/individual-providers/mock-googlepay-handler.js.map +1 -1
- package/dist/test/mocks/payment-providers/individual-providers/mock-paypal-button-datasource-delegate.js.map +1 -1
- package/dist/test/mocks/payment-providers/individual-providers/mock-paypal-button-datasource.js.map +1 -1
- package/dist/test/mocks/payment-providers/individual-providers/mock-paypal-handler.js.map +1 -1
- package/dist/test/mocks/payment-providers/individual-providers/mock-venmo-handler.js.map +1 -1
- package/dist/test/mocks/payment-providers/mock-payment-providers.js.map +1 -1
- package/dist/test/tests/braintree-manager.test.js.map +1 -1
- package/dist/test/tests/donation-form-controller.test.js +39 -39
- package/dist/test/tests/donation-form-controller.test.js.map +1 -1
- package/dist/test/tests/donation-form.test.js +4 -4
- package/dist/test/tests/donation-form.test.js.map +1 -1
- package/dist/test/tests/flow-handlers/donation-flow-modal-manager.test.js +14 -14
- package/dist/test/tests/flow-handlers/donation-flow-modal-manager.test.js.map +1 -1
- package/dist/test/tests/form-elements/donation-summary.test.js.map +1 -1
- package/dist/test/tests/form-elements/payment-selector.test.js.map +1 -1
- package/dist/test/tests/modals/error-modal-content.test.js +2 -2
- package/dist/test/tests/modals/error-modal-content.test.js.map +1 -1
- package/dist/test/tests/modals/upsell-modal-content.test.js +31 -31
- package/dist/test/tests/modals/upsell-modal-content.test.js.map +1 -1
- package/dist/test/tests/models/donation-payment-info.test.js.map +1 -1
- package/dist/test/tests/payment-clients.test.js.map +1 -1
- package/dist/test/tests/payment-providers/applepay-sessiondatasource.test.js.map +1 -1
- package/dist/test/tests/payment-providers/applepay-sessionmanager.test.js.map +1 -1
- package/dist/test/tests/payment-providers/applepay.test.js.map +1 -1
- package/dist/test/tests/payment-providers/creditcard.test.js.map +1 -1
- package/dist/test/tests/payment-providers/googlepay.test.js.map +1 -1
- package/dist/test/tests/payment-providers/payment-providers.test.js.map +1 -1
- package/dist/test/tests/payment-providers/paypal-button-datasource.test.js.map +1 -1
- package/dist/test/tests/payment-providers/paypal.test.js.map +1 -1
- package/dist/test/tests/payment-providers/venmo.test.js.map +1 -1
- package/dist/test/tests/recaptcha-manager.test.js.map +1 -1
- package/package.json +107 -107
- package/src/@types/analytics-handler/index.d.ts +8 -8
- package/src/@types/braintree-web/LICENSE +21 -21
- package/src/@types/braintree-web/index.d.ts +93 -93
- package/src/@types/braintree-web/modules/american-express.d.ts +50 -50
- package/src/@types/braintree-web/modules/apple-pay.d.ts +213 -213
- package/src/@types/braintree-web/modules/client.d.ts +103 -103
- package/src/@types/braintree-web/modules/core.d.ts +34 -34
- package/src/@types/braintree-web/modules/data-collector.d.ts +13 -13
- package/src/@types/braintree-web/modules/google-payment.d.ts +269 -269
- package/src/@types/braintree-web/modules/hosted-fields.d.ts +366 -366
- package/src/@types/braintree-web/modules/paypal-checkout.d.ts +262 -262
- package/src/@types/braintree-web/modules/paypal.d.ts +177 -177
- package/src/@types/braintree-web/modules/three-d-secure.d.ts +141 -141
- package/src/@types/braintree-web/modules/unionpay.d.ts +224 -224
- package/src/@types/braintree-web/modules/us-bank-account.d.ts +81 -81
- package/src/@types/braintree-web/modules/venmo.d.ts +110 -110
- package/src/@types/braintree-web/package.json +64 -64
- package/src/@types/paypal-checkout-components/LICENSE +21 -21
- package/src/@types/paypal-checkout-components/index.d.ts +67 -67
- package/src/@types/paypal-checkout-components/modules/button.d.ts +50 -50
- package/src/@types/paypal-checkout-components/modules/callback-data.d.ts +244 -244
- package/src/@types/paypal-checkout-components/modules/configuration.d.ts +114 -114
- package/src/@types/paypal-checkout-components/package.json +58 -58
- package/src/braintree-manager/braintree-interfaces.ts +172 -172
- package/src/braintree-manager/braintree-manager.ts +281 -281
- package/src/braintree-manager/payment-clients.ts +146 -146
- package/src/braintree-manager/payment-providers/apple-pay/apple-pay-interface.ts +13 -13
- package/src/braintree-manager/payment-providers/apple-pay/apple-pay-session-datasource-delegate.ts +8 -8
- package/src/braintree-manager/payment-providers/apple-pay/apple-pay-session-datasource-interface.ts +10 -10
- package/src/braintree-manager/payment-providers/apple-pay/apple-pay-session-datasource.ts +119 -119
- package/src/braintree-manager/payment-providers/apple-pay/apple-pay-session-manager.ts +21 -21
- package/src/braintree-manager/payment-providers/apple-pay/apple-pay.ts +97 -97
- package/src/braintree-manager/payment-providers/credit-card/credit-card-interface.ts +21 -21
- package/src/braintree-manager/payment-providers/credit-card/credit-card.ts +130 -130
- package/src/braintree-manager/payment-providers/credit-card/hosted-field-configuration.ts +19 -19
- package/src/braintree-manager/payment-providers/credit-card/hosted-field-container.ts +85 -85
- package/src/braintree-manager/payment-providers/google-pay-interface.ts +8 -8
- package/src/braintree-manager/payment-providers/google-pay.ts +59 -59
- package/src/braintree-manager/payment-providers/paypal/paypal-button-datasource.ts +218 -218
- package/src/braintree-manager/payment-providers/paypal/paypal-interface.ts +13 -13
- package/src/braintree-manager/payment-providers/paypal/paypal.ts +78 -78
- package/src/braintree-manager/payment-providers/venmo-interface.ts +8 -8
- package/src/braintree-manager/payment-providers/venmo.ts +67 -67
- package/src/braintree-manager/payment-providers-interface.ts +25 -25
- package/src/braintree-manager/payment-providers.ts +147 -147
- package/src/donation-form-controller.ts +623 -623
- package/src/donation-form-error.ts +6 -6
- package/src/donation-form.ts +576 -576
- package/src/form-elements/badged-input.ts +109 -109
- package/src/form-elements/contact-form/autocomplete-field-options.ts +63 -63
- package/src/form-elements/contact-form/contact-form.ts +434 -434
- package/src/form-elements/contact-form/countries.ts +252 -252
- package/src/form-elements/header/donation-form-header.ts +98 -98
- package/src/form-elements/header/donation-summary.ts +61 -61
- package/src/form-elements/payment-selector.ts +365 -365
- package/src/form-elements/total-amount.ts +46 -46
- package/src/modals/confirm-donation-modal-content.ts +168 -168
- package/src/modals/error-modal-content.ts +48 -48
- package/src/modals/upsell-modal-content.ts +284 -284
- package/src/payment-flow-handlers/donation-flow-modal-manager.ts +439 -439
- package/src/payment-flow-handlers/handlers/applepay-flow-handler.ts +109 -109
- package/src/payment-flow-handlers/handlers/creditcard-flow-handler.ts +232 -232
- package/src/payment-flow-handlers/handlers/googlepay-flow-handler.ts +111 -111
- package/src/payment-flow-handlers/handlers/paypal-flow-handler.ts +331 -331
- package/src/payment-flow-handlers/handlers/venmo-flow-handler.ts +119 -119
- package/src/payment-flow-handlers/handlers/venmo-restoration-state-handler.ts +127 -127
- package/src/payment-flow-handlers/payment-flow-handlers.ts +218 -218
- package/src/recaptcha-manager/recaptcha-manager.ts +123 -123
- package/src/util/promisedSleep.ts +3 -3
- package/dist/demo/app-root.d.ts +0 -0
- package/dist/demo/app-root.js +0 -2
- package/dist/demo/app-root.js.map +0 -1
|
@@ -1,110 +1,110 @@
|
|
|
1
|
-
import { callback, BraintreeError } from './core';
|
|
2
|
-
import { Client } from './client';
|
|
3
|
-
|
|
4
|
-
export interface VenmoTokenizePayload {
|
|
5
|
-
nonce: string;
|
|
6
|
-
type: string;
|
|
7
|
-
details: { username: string };
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export interface Venmo {
|
|
11
|
-
/**
|
|
12
|
-
* braintree.venmo.create({
|
|
13
|
-
* client: clientInstance
|
|
14
|
-
* }).then(function (venmoInstance) {
|
|
15
|
-
* // venmoInstance is ready to be used.
|
|
16
|
-
* }).catch(function (createErr) {
|
|
17
|
-
* console.error('Error creating Venmo instance', createErr);
|
|
18
|
-
* });
|
|
19
|
-
*/
|
|
20
|
-
create(options: {
|
|
21
|
-
client?: Client;
|
|
22
|
-
authorization?: string;
|
|
23
|
-
allowNewBrowserTab?: boolean;
|
|
24
|
-
ignoreHistoryChanges?: boolean;
|
|
25
|
-
profileId?: string;
|
|
26
|
-
deepLinkReturnUrl?: string;
|
|
27
|
-
}): Promise<Venmo>;
|
|
28
|
-
create(
|
|
29
|
-
options: {
|
|
30
|
-
client?: Client;
|
|
31
|
-
authorization?: string;
|
|
32
|
-
allowNewBrowserTab?: boolean;
|
|
33
|
-
ignoreHistoryChanges?: boolean;
|
|
34
|
-
profileId?: string;
|
|
35
|
-
deepLinkReturnUrl?: string;
|
|
36
|
-
},
|
|
37
|
-
callback?: callback,
|
|
38
|
-
): void;
|
|
39
|
-
|
|
40
|
-
VERSION: string;
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Returns a boolean indicating whether the current browser supports Venmo as a payment method.
|
|
44
|
-
*
|
|
45
|
-
* If `options.allowNewBrowserTab` is false when calling {@link module:braintree-web/venmo.create|venmo.create},
|
|
46
|
-
* this method will return true only for browsers known to support returning from the Venmo app to the same browser tab.
|
|
47
|
-
* Currently, this is limited to iOS Safari and Android Chrome.
|
|
48
|
-
*/
|
|
49
|
-
isBrowserSupported(): boolean;
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Returns a boolean indicating whether a Venmo tokenization result is ready to be processed immediately.
|
|
53
|
-
*
|
|
54
|
-
* This method should be called after initialization to see if the result of Venmo authorization is available.
|
|
55
|
-
* If it returns true, call {@link Venmo#tokenize|tokenize} immediately to process the results.
|
|
56
|
-
*/
|
|
57
|
-
hasTokenizationResult(): boolean;
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Launches the Venmo flow and returns a nonce payload.
|
|
61
|
-
*
|
|
62
|
-
* If {@link Venmo#hasTokenizationResult|hasTokenizationResult} returns true, calling tokenize will immediately
|
|
63
|
-
* process and return the results without initiating the Venmo payment authorization flow.
|
|
64
|
-
*
|
|
65
|
-
* Only one Venmo flow can be active at a time. One way to achieve this is to disable your Venmo button while
|
|
66
|
-
* the flow is open.
|
|
67
|
-
* @example
|
|
68
|
-
* button.addEventListener('click', function () {
|
|
69
|
-
* // Disable the button so that we don't attempt to open multiple popups.
|
|
70
|
-
* button.setAttribute('disabled', 'disabled');
|
|
71
|
-
*
|
|
72
|
-
* // Because tokenize opens a new window, this must be called
|
|
73
|
-
* // as a result of a user action, such as a button click.
|
|
74
|
-
* venmoInstance.tokenize().then(function (payload) {
|
|
75
|
-
* // Submit payload.nonce to your server
|
|
76
|
-
* // Use payload.username to get the Venmo username and display any UI
|
|
77
|
-
* }).catch(function (tokenizeError) {
|
|
78
|
-
* // Handle flow errors or premature flow closure
|
|
79
|
-
* switch (tokenizeErr.code) {
|
|
80
|
-
* case 'VENMO_APP_CANCELED':
|
|
81
|
-
* console.log('User canceled Venmo flow.');
|
|
82
|
-
* break;
|
|
83
|
-
* case 'VENMO_CANCELED':
|
|
84
|
-
* console.log('User canceled Venmo, or Venmo app is not available.');
|
|
85
|
-
* break;
|
|
86
|
-
* default:
|
|
87
|
-
* console.error('Error!', tokenizeErr);
|
|
88
|
-
* }
|
|
89
|
-
* }).then(function () {
|
|
90
|
-
* button.removeAttribute('disabled');
|
|
91
|
-
* });
|
|
92
|
-
* });
|
|
93
|
-
*/
|
|
94
|
-
tokenize(options?: { processResultsDelay?: number }): Promise<VenmoTokenizePayload>;
|
|
95
|
-
tokenize(
|
|
96
|
-
options?: { processResultsDelay?: number },
|
|
97
|
-
callback?: (error?: BraintreeError, payload?: VenmoTokenizePayload) => void,
|
|
98
|
-
): void;
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* Cleanly tear down anything set up by {@link module:braintree-web/venmo.create|create}. * @example
|
|
102
|
-
* venmoInstance.teardown();
|
|
103
|
-
* @example <caption>With callback</caption>
|
|
104
|
-
* venmoInstance.teardown(function () {
|
|
105
|
-
* // teardown is complete
|
|
106
|
-
* });
|
|
107
|
-
*/
|
|
108
|
-
teardown(callback?: () => void): void;
|
|
109
|
-
teardown(): Promise<void>;
|
|
110
|
-
}
|
|
1
|
+
import { callback, BraintreeError } from './core';
|
|
2
|
+
import { Client } from './client';
|
|
3
|
+
|
|
4
|
+
export interface VenmoTokenizePayload {
|
|
5
|
+
nonce: string;
|
|
6
|
+
type: string;
|
|
7
|
+
details: { username: string };
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface Venmo {
|
|
11
|
+
/**
|
|
12
|
+
* braintree.venmo.create({
|
|
13
|
+
* client: clientInstance
|
|
14
|
+
* }).then(function (venmoInstance) {
|
|
15
|
+
* // venmoInstance is ready to be used.
|
|
16
|
+
* }).catch(function (createErr) {
|
|
17
|
+
* console.error('Error creating Venmo instance', createErr);
|
|
18
|
+
* });
|
|
19
|
+
*/
|
|
20
|
+
create(options: {
|
|
21
|
+
client?: Client;
|
|
22
|
+
authorization?: string;
|
|
23
|
+
allowNewBrowserTab?: boolean;
|
|
24
|
+
ignoreHistoryChanges?: boolean;
|
|
25
|
+
profileId?: string;
|
|
26
|
+
deepLinkReturnUrl?: string;
|
|
27
|
+
}): Promise<Venmo>;
|
|
28
|
+
create(
|
|
29
|
+
options: {
|
|
30
|
+
client?: Client;
|
|
31
|
+
authorization?: string;
|
|
32
|
+
allowNewBrowserTab?: boolean;
|
|
33
|
+
ignoreHistoryChanges?: boolean;
|
|
34
|
+
profileId?: string;
|
|
35
|
+
deepLinkReturnUrl?: string;
|
|
36
|
+
},
|
|
37
|
+
callback?: callback,
|
|
38
|
+
): void;
|
|
39
|
+
|
|
40
|
+
VERSION: string;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Returns a boolean indicating whether the current browser supports Venmo as a payment method.
|
|
44
|
+
*
|
|
45
|
+
* If `options.allowNewBrowserTab` is false when calling {@link module:braintree-web/venmo.create|venmo.create},
|
|
46
|
+
* this method will return true only for browsers known to support returning from the Venmo app to the same browser tab.
|
|
47
|
+
* Currently, this is limited to iOS Safari and Android Chrome.
|
|
48
|
+
*/
|
|
49
|
+
isBrowserSupported(): boolean;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Returns a boolean indicating whether a Venmo tokenization result is ready to be processed immediately.
|
|
53
|
+
*
|
|
54
|
+
* This method should be called after initialization to see if the result of Venmo authorization is available.
|
|
55
|
+
* If it returns true, call {@link Venmo#tokenize|tokenize} immediately to process the results.
|
|
56
|
+
*/
|
|
57
|
+
hasTokenizationResult(): boolean;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Launches the Venmo flow and returns a nonce payload.
|
|
61
|
+
*
|
|
62
|
+
* If {@link Venmo#hasTokenizationResult|hasTokenizationResult} returns true, calling tokenize will immediately
|
|
63
|
+
* process and return the results without initiating the Venmo payment authorization flow.
|
|
64
|
+
*
|
|
65
|
+
* Only one Venmo flow can be active at a time. One way to achieve this is to disable your Venmo button while
|
|
66
|
+
* the flow is open.
|
|
67
|
+
* @example
|
|
68
|
+
* button.addEventListener('click', function () {
|
|
69
|
+
* // Disable the button so that we don't attempt to open multiple popups.
|
|
70
|
+
* button.setAttribute('disabled', 'disabled');
|
|
71
|
+
*
|
|
72
|
+
* // Because tokenize opens a new window, this must be called
|
|
73
|
+
* // as a result of a user action, such as a button click.
|
|
74
|
+
* venmoInstance.tokenize().then(function (payload) {
|
|
75
|
+
* // Submit payload.nonce to your server
|
|
76
|
+
* // Use payload.username to get the Venmo username and display any UI
|
|
77
|
+
* }).catch(function (tokenizeError) {
|
|
78
|
+
* // Handle flow errors or premature flow closure
|
|
79
|
+
* switch (tokenizeErr.code) {
|
|
80
|
+
* case 'VENMO_APP_CANCELED':
|
|
81
|
+
* console.log('User canceled Venmo flow.');
|
|
82
|
+
* break;
|
|
83
|
+
* case 'VENMO_CANCELED':
|
|
84
|
+
* console.log('User canceled Venmo, or Venmo app is not available.');
|
|
85
|
+
* break;
|
|
86
|
+
* default:
|
|
87
|
+
* console.error('Error!', tokenizeErr);
|
|
88
|
+
* }
|
|
89
|
+
* }).then(function () {
|
|
90
|
+
* button.removeAttribute('disabled');
|
|
91
|
+
* });
|
|
92
|
+
* });
|
|
93
|
+
*/
|
|
94
|
+
tokenize(options?: { processResultsDelay?: number }): Promise<VenmoTokenizePayload>;
|
|
95
|
+
tokenize(
|
|
96
|
+
options?: { processResultsDelay?: number },
|
|
97
|
+
callback?: (error?: BraintreeError, payload?: VenmoTokenizePayload) => void,
|
|
98
|
+
): void;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Cleanly tear down anything set up by {@link module:braintree-web/venmo.create|create}. * @example
|
|
102
|
+
* venmoInstance.teardown();
|
|
103
|
+
* @example <caption>With callback</caption>
|
|
104
|
+
* venmoInstance.teardown(function () {
|
|
105
|
+
* // teardown is complete
|
|
106
|
+
* });
|
|
107
|
+
*/
|
|
108
|
+
teardown(callback?: () => void): void;
|
|
109
|
+
teardown(): Promise<void>;
|
|
110
|
+
}
|
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
{
|
|
2
|
-
"_args": [
|
|
3
|
-
[
|
|
4
|
-
"@types/braintree-web@3.62.0",
|
|
5
|
-
"/Users/jason/Projects/IA/iaux/iaux-donation-form"
|
|
6
|
-
]
|
|
7
|
-
],
|
|
8
|
-
"_development": true,
|
|
9
|
-
"_from": "@types/braintree-web@3.62.0",
|
|
10
|
-
"_id": "@types/braintree-web@3.62.0",
|
|
11
|
-
"_inBundle": false,
|
|
12
|
-
"_integrity": "sha512-MbzkYCQSAE8+s/bKccIpV6EzmrkYZIzVhBRfV5Cz0xRGzm/oZeLuxwTUy9wwreVJIbhiCFYVzSPYt7KgIApfHA==",
|
|
13
|
-
"_location": "/@types/braintree-web",
|
|
14
|
-
"_phantomChildren": {},
|
|
15
|
-
"_requested": {
|
|
16
|
-
"type": "version",
|
|
17
|
-
"registry": true,
|
|
18
|
-
"raw": "@types/braintree-web@3.62.0",
|
|
19
|
-
"name": "@types/braintree-web",
|
|
20
|
-
"escapedName": "@types%2fbraintree-web",
|
|
21
|
-
"scope": "@types",
|
|
22
|
-
"rawSpec": "3.62.0",
|
|
23
|
-
"saveSpec": null,
|
|
24
|
-
"fetchSpec": "3.62.0"
|
|
25
|
-
},
|
|
26
|
-
"_requiredBy": [
|
|
27
|
-
"#DEV:/"
|
|
28
|
-
],
|
|
29
|
-
"_resolved": "https://registry.npmjs.org/@types/braintree-web/-/braintree-web-3.62.0.tgz",
|
|
30
|
-
"_spec": "3.62.0",
|
|
31
|
-
"_where": "/Users/jason/Projects/IA/iaux/iaux-donation-form",
|
|
32
|
-
"bugs": {
|
|
33
|
-
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues"
|
|
34
|
-
},
|
|
35
|
-
"contributors": [
|
|
36
|
-
{
|
|
37
|
-
"name": "Guy Shahine",
|
|
38
|
-
"url": "https://github.com/chlela"
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
"name": "Jason Buckner",
|
|
42
|
-
"url": "https://github.com/jbuckner"
|
|
43
|
-
}
|
|
44
|
-
],
|
|
45
|
-
"dependencies": {
|
|
46
|
-
"@types/googlepay": "*",
|
|
47
|
-
"@types/paypal-checkout-components": "*"
|
|
48
|
-
},
|
|
49
|
-
"description": "TypeScript definitions for Braintree-web",
|
|
50
|
-
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme",
|
|
51
|
-
"license": "MIT",
|
|
52
|
-
"main": "",
|
|
53
|
-
"name": "@types/braintree-web",
|
|
54
|
-
"repository": {
|
|
55
|
-
"type": "git",
|
|
56
|
-
"url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
|
57
|
-
"directory": "types/braintree-web"
|
|
58
|
-
},
|
|
59
|
-
"scripts": {},
|
|
60
|
-
"typeScriptVersion": "3.1",
|
|
61
|
-
"types": "index.d.ts",
|
|
62
|
-
"typesPublisherContentHash": "98fe1e89cb4ee373b5aa1088fe675721b2a4b11dc47b39bfb59057e64e8c56b1",
|
|
63
|
-
"version": "3.62.0"
|
|
64
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"_args": [
|
|
3
|
+
[
|
|
4
|
+
"@types/braintree-web@3.62.0",
|
|
5
|
+
"/Users/jason/Projects/IA/iaux/iaux-donation-form"
|
|
6
|
+
]
|
|
7
|
+
],
|
|
8
|
+
"_development": true,
|
|
9
|
+
"_from": "@types/braintree-web@3.62.0",
|
|
10
|
+
"_id": "@types/braintree-web@3.62.0",
|
|
11
|
+
"_inBundle": false,
|
|
12
|
+
"_integrity": "sha512-MbzkYCQSAE8+s/bKccIpV6EzmrkYZIzVhBRfV5Cz0xRGzm/oZeLuxwTUy9wwreVJIbhiCFYVzSPYt7KgIApfHA==",
|
|
13
|
+
"_location": "/@types/braintree-web",
|
|
14
|
+
"_phantomChildren": {},
|
|
15
|
+
"_requested": {
|
|
16
|
+
"type": "version",
|
|
17
|
+
"registry": true,
|
|
18
|
+
"raw": "@types/braintree-web@3.62.0",
|
|
19
|
+
"name": "@types/braintree-web",
|
|
20
|
+
"escapedName": "@types%2fbraintree-web",
|
|
21
|
+
"scope": "@types",
|
|
22
|
+
"rawSpec": "3.62.0",
|
|
23
|
+
"saveSpec": null,
|
|
24
|
+
"fetchSpec": "3.62.0"
|
|
25
|
+
},
|
|
26
|
+
"_requiredBy": [
|
|
27
|
+
"#DEV:/"
|
|
28
|
+
],
|
|
29
|
+
"_resolved": "https://registry.npmjs.org/@types/braintree-web/-/braintree-web-3.62.0.tgz",
|
|
30
|
+
"_spec": "3.62.0",
|
|
31
|
+
"_where": "/Users/jason/Projects/IA/iaux/iaux-donation-form",
|
|
32
|
+
"bugs": {
|
|
33
|
+
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues"
|
|
34
|
+
},
|
|
35
|
+
"contributors": [
|
|
36
|
+
{
|
|
37
|
+
"name": "Guy Shahine",
|
|
38
|
+
"url": "https://github.com/chlela"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"name": "Jason Buckner",
|
|
42
|
+
"url": "https://github.com/jbuckner"
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"@types/googlepay": "*",
|
|
47
|
+
"@types/paypal-checkout-components": "*"
|
|
48
|
+
},
|
|
49
|
+
"description": "TypeScript definitions for Braintree-web",
|
|
50
|
+
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme",
|
|
51
|
+
"license": "MIT",
|
|
52
|
+
"main": "",
|
|
53
|
+
"name": "@types/braintree-web",
|
|
54
|
+
"repository": {
|
|
55
|
+
"type": "git",
|
|
56
|
+
"url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
|
57
|
+
"directory": "types/braintree-web"
|
|
58
|
+
},
|
|
59
|
+
"scripts": {},
|
|
60
|
+
"typeScriptVersion": "3.1",
|
|
61
|
+
"types": "index.d.ts",
|
|
62
|
+
"typesPublisherContentHash": "98fe1e89cb4ee373b5aa1088fe675721b2a4b11dc47b39bfb59057e64e8c56b1",
|
|
63
|
+
"version": "3.62.0"
|
|
64
|
+
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) Microsoft Corporation.
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Microsoft Corporation.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE
|
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
// Type definitions for paypal-checkout-components 4.0
|
|
2
|
-
// Project: https://github.com/paypal/paypal-checkout-components/
|
|
3
|
-
// Definitions by: Jason Buckner <https://github.com/jbuckner>
|
|
4
|
-
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
5
|
-
// TypeScript Version: 3.1
|
|
6
|
-
|
|
7
|
-
import { ButtonRenderer, ButtonRenderOptions, FUNDING } from './modules/button';
|
|
8
|
-
|
|
9
|
-
export interface PayPal {
|
|
10
|
-
button: ButtonRenderer;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
import {
|
|
14
|
-
ButtonColorOption,
|
|
15
|
-
ButtonLabelOption,
|
|
16
|
-
ButtonShapeOption,
|
|
17
|
-
ButtonSizeOption,
|
|
18
|
-
ButtonStyle,
|
|
19
|
-
Environment,
|
|
20
|
-
} from './modules/configuration';
|
|
21
|
-
|
|
22
|
-
import {
|
|
23
|
-
Address,
|
|
24
|
-
AuthorizationData,
|
|
25
|
-
AuthorizationTokenizePayload,
|
|
26
|
-
CancellationData,
|
|
27
|
-
CreditFinancingOptions,
|
|
28
|
-
FlowType,
|
|
29
|
-
Intent,
|
|
30
|
-
LineItem,
|
|
31
|
-
LineItemKind,
|
|
32
|
-
ShippingOption,
|
|
33
|
-
ShippingOptionType,
|
|
34
|
-
TokenizePayload,
|
|
35
|
-
TokenizePayloadDetails,
|
|
36
|
-
} from './modules/callback-data';
|
|
37
|
-
import { PayPalHandler } from '../../../src/braintree-manager/payment-providers/paypal/paypal';
|
|
38
|
-
|
|
39
|
-
export const Button: ButtonRenderer;
|
|
40
|
-
|
|
41
|
-
export {
|
|
42
|
-
Address,
|
|
43
|
-
AuthorizationData,
|
|
44
|
-
AuthorizationTokenizePayload,
|
|
45
|
-
ButtonRenderer,
|
|
46
|
-
ButtonColorOption,
|
|
47
|
-
ButtonLabelOption,
|
|
48
|
-
ButtonRenderOptions,
|
|
49
|
-
ButtonShapeOption,
|
|
50
|
-
ButtonSizeOption,
|
|
51
|
-
ButtonStyle,
|
|
52
|
-
CancellationData,
|
|
53
|
-
CreditFinancingOptions,
|
|
54
|
-
Environment,
|
|
55
|
-
FlowType,
|
|
56
|
-
FUNDING,
|
|
57
|
-
Intent,
|
|
58
|
-
LineItem,
|
|
59
|
-
LineItemKind,
|
|
60
|
-
ShippingOption,
|
|
61
|
-
ShippingOptionType,
|
|
62
|
-
TokenizePayload,
|
|
63
|
-
TokenizePayloadDetails,
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
export const paypal: PayPalHandler;
|
|
67
|
-
export as namespace paypal;
|
|
1
|
+
// Type definitions for paypal-checkout-components 4.0
|
|
2
|
+
// Project: https://github.com/paypal/paypal-checkout-components/
|
|
3
|
+
// Definitions by: Jason Buckner <https://github.com/jbuckner>
|
|
4
|
+
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
5
|
+
// TypeScript Version: 3.1
|
|
6
|
+
|
|
7
|
+
import { ButtonRenderer, ButtonRenderOptions, FUNDING } from './modules/button';
|
|
8
|
+
|
|
9
|
+
export interface PayPal {
|
|
10
|
+
button: ButtonRenderer;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
import {
|
|
14
|
+
ButtonColorOption,
|
|
15
|
+
ButtonLabelOption,
|
|
16
|
+
ButtonShapeOption,
|
|
17
|
+
ButtonSizeOption,
|
|
18
|
+
ButtonStyle,
|
|
19
|
+
Environment,
|
|
20
|
+
} from './modules/configuration';
|
|
21
|
+
|
|
22
|
+
import {
|
|
23
|
+
Address,
|
|
24
|
+
AuthorizationData,
|
|
25
|
+
AuthorizationTokenizePayload,
|
|
26
|
+
CancellationData,
|
|
27
|
+
CreditFinancingOptions,
|
|
28
|
+
FlowType,
|
|
29
|
+
Intent,
|
|
30
|
+
LineItem,
|
|
31
|
+
LineItemKind,
|
|
32
|
+
ShippingOption,
|
|
33
|
+
ShippingOptionType,
|
|
34
|
+
TokenizePayload,
|
|
35
|
+
TokenizePayloadDetails,
|
|
36
|
+
} from './modules/callback-data';
|
|
37
|
+
import { PayPalHandler } from '../../../src/braintree-manager/payment-providers/paypal/paypal';
|
|
38
|
+
|
|
39
|
+
export const Button: ButtonRenderer;
|
|
40
|
+
|
|
41
|
+
export {
|
|
42
|
+
Address,
|
|
43
|
+
AuthorizationData,
|
|
44
|
+
AuthorizationTokenizePayload,
|
|
45
|
+
ButtonRenderer,
|
|
46
|
+
ButtonColorOption,
|
|
47
|
+
ButtonLabelOption,
|
|
48
|
+
ButtonRenderOptions,
|
|
49
|
+
ButtonShapeOption,
|
|
50
|
+
ButtonSizeOption,
|
|
51
|
+
ButtonStyle,
|
|
52
|
+
CancellationData,
|
|
53
|
+
CreditFinancingOptions,
|
|
54
|
+
Environment,
|
|
55
|
+
FlowType,
|
|
56
|
+
FUNDING,
|
|
57
|
+
Intent,
|
|
58
|
+
LineItem,
|
|
59
|
+
LineItemKind,
|
|
60
|
+
ShippingOption,
|
|
61
|
+
ShippingOptionType,
|
|
62
|
+
TokenizePayload,
|
|
63
|
+
TokenizePayloadDetails,
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export const paypal: PayPalHandler;
|
|
67
|
+
export as namespace paypal;
|
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
import { Environment, ButtonStyle } from './configuration';
|
|
2
|
-
|
|
3
|
-
import { AuthorizationData, AuthorizationTokenizePayload, CancellationData } from './callback-data';
|
|
4
|
-
|
|
5
|
-
export enum FUNDING {
|
|
6
|
-
CREDIT,
|
|
7
|
-
CARD,
|
|
8
|
-
VENMO,
|
|
9
|
-
ELV,
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export interface ButtonRenderOptions {
|
|
13
|
-
env?: Environment;
|
|
14
|
-
style?: ButtonStyle;
|
|
15
|
-
locale?: string;
|
|
16
|
-
|
|
17
|
-
payment?: () => Promise<string>;
|
|
18
|
-
onAuthorize: (data: AuthorizationData, actions: object) => Promise<AuthorizationTokenizePayload>;
|
|
19
|
-
onCancel?: (data: CancellationData, actions: object) => void;
|
|
20
|
-
onError?: (error: string) => void;
|
|
21
|
-
onShippingChange?: () => void;
|
|
22
|
-
onAuth?: (data: string | object) => object;
|
|
23
|
-
accessToken?: () => void;
|
|
24
|
-
onClose?: () => void;
|
|
25
|
-
|
|
26
|
-
funding?: {
|
|
27
|
-
allowed?: FUNDING[];
|
|
28
|
-
disallowed?: FUNDING[];
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
sessionID?: string;
|
|
32
|
-
buttonSessionID?: string;
|
|
33
|
-
meta?: object;
|
|
34
|
-
stage?: string;
|
|
35
|
-
stageUrl?: string;
|
|
36
|
-
authCode?: string;
|
|
37
|
-
localhostUrl?: string;
|
|
38
|
-
checkoutUri?: string;
|
|
39
|
-
client?: object;
|
|
40
|
-
commit?: boolean;
|
|
41
|
-
experience?: object;
|
|
42
|
-
fundingSource?: string;
|
|
43
|
-
fundingOffered?: object;
|
|
44
|
-
logLevel?: string;
|
|
45
|
-
test?: object;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export interface ButtonRenderer {
|
|
49
|
-
render(options: ButtonRenderOptions, selector: string): void;
|
|
50
|
-
}
|
|
1
|
+
import { Environment, ButtonStyle } from './configuration';
|
|
2
|
+
|
|
3
|
+
import { AuthorizationData, AuthorizationTokenizePayload, CancellationData } from './callback-data';
|
|
4
|
+
|
|
5
|
+
export enum FUNDING {
|
|
6
|
+
CREDIT,
|
|
7
|
+
CARD,
|
|
8
|
+
VENMO,
|
|
9
|
+
ELV,
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface ButtonRenderOptions {
|
|
13
|
+
env?: Environment;
|
|
14
|
+
style?: ButtonStyle;
|
|
15
|
+
locale?: string;
|
|
16
|
+
|
|
17
|
+
payment?: () => Promise<string>;
|
|
18
|
+
onAuthorize: (data: AuthorizationData, actions: object) => Promise<AuthorizationTokenizePayload>;
|
|
19
|
+
onCancel?: (data: CancellationData, actions: object) => void;
|
|
20
|
+
onError?: (error: string) => void;
|
|
21
|
+
onShippingChange?: () => void;
|
|
22
|
+
onAuth?: (data: string | object) => object;
|
|
23
|
+
accessToken?: () => void;
|
|
24
|
+
onClose?: () => void;
|
|
25
|
+
|
|
26
|
+
funding?: {
|
|
27
|
+
allowed?: FUNDING[];
|
|
28
|
+
disallowed?: FUNDING[];
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
sessionID?: string;
|
|
32
|
+
buttonSessionID?: string;
|
|
33
|
+
meta?: object;
|
|
34
|
+
stage?: string;
|
|
35
|
+
stageUrl?: string;
|
|
36
|
+
authCode?: string;
|
|
37
|
+
localhostUrl?: string;
|
|
38
|
+
checkoutUri?: string;
|
|
39
|
+
client?: object;
|
|
40
|
+
commit?: boolean;
|
|
41
|
+
experience?: object;
|
|
42
|
+
fundingSource?: string;
|
|
43
|
+
fundingOffered?: object;
|
|
44
|
+
logLevel?: string;
|
|
45
|
+
test?: object;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface ButtonRenderer {
|
|
49
|
+
render(options: ButtonRenderOptions, selector: string): void;
|
|
50
|
+
}
|