@internetarchive/donation-form 1.0.3-alpha-webdev7960.0 → 1.0.3-webdev-8122.0
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 +159 -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 +2 -0
- 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 +2 -0
- 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 +2 -0
- 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 +16 -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 +436 -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 +113 -111
- package/src/payment-flow-handlers/handlers/paypal-flow-handler.ts +333 -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/package.json
CHANGED
|
@@ -1,107 +1,107 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@internetarchive/donation-form",
|
|
3
|
-
"version": "1.0.3-
|
|
4
|
-
"description": "The Internet Archive Donation Form",
|
|
5
|
-
"license": "AGPL-3.0-only",
|
|
6
|
-
"main": "dist/index.js",
|
|
7
|
-
"module": "dist/index.js",
|
|
8
|
-
"types": "dist/index.d.ts",
|
|
9
|
-
"files": [
|
|
10
|
-
"dist/**/*",
|
|
11
|
-
"src/**/*",
|
|
12
|
-
"index.d.ts",
|
|
13
|
-
"index.js"
|
|
14
|
-
],
|
|
15
|
-
"scripts": {
|
|
16
|
-
"prepare": "yarn run build",
|
|
17
|
-
"build": "tsc -p tsconfig.build.json",
|
|
18
|
-
"start": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wds --app-index demo/index.html --node-resolve --open --watch --preserve-symlinks\"",
|
|
19
|
-
"tsc:watch": "tsc --watch",
|
|
20
|
-
"lint:eslint": "eslint .",
|
|
21
|
-
"format:eslint": "eslint . --fix",
|
|
22
|
-
"lint:prettier": "prettier \"**/*.js\" \"**/*.ts\" --check",
|
|
23
|
-
"format:prettier": "prettier \"**/*.js\" \"**/*.ts\" --write",
|
|
24
|
-
"lint": "yarn run lint:eslint && yarn run lint:prettier",
|
|
25
|
-
"format": "yarn run format:eslint && yarn run format:prettier",
|
|
26
|
-
"circular": "madge --circular --extensions ts .",
|
|
27
|
-
"test": "tsc && yarn run lint && yarn run circular && wtr dist/test/tests/**/*.test.js --node-resolve --coverage",
|
|
28
|
-
"test:watch": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wtr test/tests/**/*.test.ts --node-resolve --watch\""
|
|
29
|
-
},
|
|
30
|
-
"dependencies": {
|
|
31
|
-
"@internetarchive/analytics-manager": "^0.1.4",
|
|
32
|
-
"@internetarchive/donation-form-currency-validator": "^0.3.1",
|
|
33
|
-
"@internetarchive/donation-form-data-models": "
|
|
34
|
-
"@internetarchive/donation-form-edit-donation": "^1.1.5",
|
|
35
|
-
"@internetarchive/donation-form-section": "^0.3.6",
|
|
36
|
-
"@internetarchive/icon-applepay": "^1.3.2",
|
|
37
|
-
"@internetarchive/icon-calendar": "^1.3.2",
|
|
38
|
-
"@internetarchive/icon-credit-card": "^1.3.2",
|
|
39
|
-
"@internetarchive/icon-email": "^1.3.2",
|
|
40
|
-
"@internetarchive/icon-googlepay": "^1.3.2",
|
|
41
|
-
"@internetarchive/icon-locale-pin": "^1.3.2",
|
|
42
|
-
"@internetarchive/icon-lock": "^1.3.2",
|
|
43
|
-
"@internetarchive/icon-paypal": "^1.3.2",
|
|
44
|
-
"@internetarchive/icon-user": "^1.3.2",
|
|
45
|
-
"@internetarchive/icon-venmo": "^1.3.2",
|
|
46
|
-
"@internetarchive/lazy-loader-service": "^0.2.0",
|
|
47
|
-
"@internetarchive/modal-manager": "2.0.
|
|
48
|
-
"@internetarchive/promised-singleton": "^0.2.1",
|
|
49
|
-
"currency.js": "^2.0.2",
|
|
50
|
-
"lit": "^2.8.0",
|
|
51
|
-
"nanoevents": "^9.1.0"
|
|
52
|
-
},
|
|
53
|
-
"devDependencies": {
|
|
54
|
-
"@babel/core": "^7.26.0",
|
|
55
|
-
"@open-wc/eslint-config": "^12.0.3",
|
|
56
|
-
"@open-wc/prettier-config": "^1.1.0",
|
|
57
|
-
"@open-wc/testing": "^4.0.0",
|
|
58
|
-
"@types/applepayjs": "^3.0.0",
|
|
59
|
-
"@types/googlepay": "^0.7.6",
|
|
60
|
-
"@types/grecaptcha": "^2.0.36",
|
|
61
|
-
"@types/mocha": "^10.0.10",
|
|
62
|
-
"@typescript-eslint/eslint-plugin": "^8.18.1",
|
|
63
|
-
"@typescript-eslint/parser": "^8.18.1",
|
|
64
|
-
"@web/dev-server": "^0.4.6",
|
|
65
|
-
"@web/test-runner": "^0.19.0",
|
|
66
|
-
"concurrently": "^9.1.0",
|
|
67
|
-
"eslint": "^9.17.0",
|
|
68
|
-
"eslint-config-prettier": "^9.1.0",
|
|
69
|
-
"eslint-plugin-html": "^8.1.2",
|
|
70
|
-
"eslint-plugin-import": "^2.31.0",
|
|
71
|
-
"eslint-plugin-lit": "^1.15.0",
|
|
72
|
-
"eslint-plugin-lit-a11y": "^4.1.4",
|
|
73
|
-
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
74
|
-
"eslint-plugin-wc": "^2.2.0",
|
|
75
|
-
"form-data": "^4.0.1",
|
|
76
|
-
"husky": "^9.1.7",
|
|
77
|
-
"karma": "^6.4.4",
|
|
78
|
-
"lint-staged": "^15.2.11",
|
|
79
|
-
"madge": "^8.0.0",
|
|
80
|
-
"prettier": "^3.4.2",
|
|
81
|
-
"sinon": "^19.0.2",
|
|
82
|
-
"ts-lit-plugin": "^2.0.2",
|
|
83
|
-
"tslib": "^2.8.1",
|
|
84
|
-
"typescript": "^5.7.2"
|
|
85
|
-
},
|
|
86
|
-
"eslintConfig": {
|
|
87
|
-
"extends": [
|
|
88
|
-
"@open-wc/eslint-config",
|
|
89
|
-
"eslint-config-prettier"
|
|
90
|
-
]
|
|
91
|
-
},
|
|
92
|
-
"prettier": "@open-wc/prettier-config",
|
|
93
|
-
"husky": {
|
|
94
|
-
"hooks": {
|
|
95
|
-
"pre-commit": "lint-staged"
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
|
-
"publishConfig": {
|
|
99
|
-
"access": "public"
|
|
100
|
-
},
|
|
101
|
-
"lint-staged": {
|
|
102
|
-
"*.ts": [
|
|
103
|
-
"eslint --fix",
|
|
104
|
-
"git add"
|
|
105
|
-
]
|
|
106
|
-
}
|
|
107
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@internetarchive/donation-form",
|
|
3
|
+
"version": "1.0.3-webdev-8122.0",
|
|
4
|
+
"description": "The Internet Archive Donation Form",
|
|
5
|
+
"license": "AGPL-3.0-only",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"module": "dist/index.js",
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist/**/*",
|
|
11
|
+
"src/**/*",
|
|
12
|
+
"index.d.ts",
|
|
13
|
+
"index.js"
|
|
14
|
+
],
|
|
15
|
+
"scripts": {
|
|
16
|
+
"prepare": "yarn run build",
|
|
17
|
+
"build": "tsc -p tsconfig.build.json",
|
|
18
|
+
"start": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wds --app-index demo/index.html --node-resolve --open --watch --preserve-symlinks\"",
|
|
19
|
+
"tsc:watch": "tsc --watch",
|
|
20
|
+
"lint:eslint": "eslint .",
|
|
21
|
+
"format:eslint": "eslint . --fix",
|
|
22
|
+
"lint:prettier": "prettier \"**/*.js\" \"**/*.ts\" --check",
|
|
23
|
+
"format:prettier": "prettier \"**/*.js\" \"**/*.ts\" --write",
|
|
24
|
+
"lint": "yarn run lint:eslint && yarn run lint:prettier",
|
|
25
|
+
"format": "yarn run format:eslint && yarn run format:prettier",
|
|
26
|
+
"circular": "madge --circular --extensions ts .",
|
|
27
|
+
"test": "tsc && yarn run lint && yarn run circular && wtr dist/test/tests/**/*.test.js --node-resolve --coverage",
|
|
28
|
+
"test:watch": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wtr test/tests/**/*.test.ts --node-resolve --watch\""
|
|
29
|
+
},
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"@internetarchive/analytics-manager": "^0.1.4",
|
|
32
|
+
"@internetarchive/donation-form-currency-validator": "^0.3.1",
|
|
33
|
+
"@internetarchive/donation-form-data-models": "0.3.7-webdev-8122.0",
|
|
34
|
+
"@internetarchive/donation-form-edit-donation": "^1.1.5",
|
|
35
|
+
"@internetarchive/donation-form-section": "^0.3.6",
|
|
36
|
+
"@internetarchive/icon-applepay": "^1.3.2",
|
|
37
|
+
"@internetarchive/icon-calendar": "^1.3.2",
|
|
38
|
+
"@internetarchive/icon-credit-card": "^1.3.2",
|
|
39
|
+
"@internetarchive/icon-email": "^1.3.2",
|
|
40
|
+
"@internetarchive/icon-googlepay": "^1.3.2",
|
|
41
|
+
"@internetarchive/icon-locale-pin": "^1.3.2",
|
|
42
|
+
"@internetarchive/icon-lock": "^1.3.2",
|
|
43
|
+
"@internetarchive/icon-paypal": "^1.3.2",
|
|
44
|
+
"@internetarchive/icon-user": "^1.3.2",
|
|
45
|
+
"@internetarchive/icon-venmo": "^1.3.2",
|
|
46
|
+
"@internetarchive/lazy-loader-service": "^0.2.0",
|
|
47
|
+
"@internetarchive/modal-manager": "^2.0.0",
|
|
48
|
+
"@internetarchive/promised-singleton": "^0.2.1",
|
|
49
|
+
"currency.js": "^2.0.2",
|
|
50
|
+
"lit": "^2.8.0",
|
|
51
|
+
"nanoevents": "^9.1.0"
|
|
52
|
+
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@babel/core": "^7.26.0",
|
|
55
|
+
"@open-wc/eslint-config": "^12.0.3",
|
|
56
|
+
"@open-wc/prettier-config": "^1.1.0",
|
|
57
|
+
"@open-wc/testing": "^4.0.0",
|
|
58
|
+
"@types/applepayjs": "^3.0.0",
|
|
59
|
+
"@types/googlepay": "^0.7.6",
|
|
60
|
+
"@types/grecaptcha": "^2.0.36",
|
|
61
|
+
"@types/mocha": "^10.0.10",
|
|
62
|
+
"@typescript-eslint/eslint-plugin": "^8.18.1",
|
|
63
|
+
"@typescript-eslint/parser": "^8.18.1",
|
|
64
|
+
"@web/dev-server": "^0.4.6",
|
|
65
|
+
"@web/test-runner": "^0.19.0",
|
|
66
|
+
"concurrently": "^9.1.0",
|
|
67
|
+
"eslint": "^9.17.0",
|
|
68
|
+
"eslint-config-prettier": "^9.1.0",
|
|
69
|
+
"eslint-plugin-html": "^8.1.2",
|
|
70
|
+
"eslint-plugin-import": "^2.31.0",
|
|
71
|
+
"eslint-plugin-lit": "^1.15.0",
|
|
72
|
+
"eslint-plugin-lit-a11y": "^4.1.4",
|
|
73
|
+
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
74
|
+
"eslint-plugin-wc": "^2.2.0",
|
|
75
|
+
"form-data": "^4.0.1",
|
|
76
|
+
"husky": "^9.1.7",
|
|
77
|
+
"karma": "^6.4.4",
|
|
78
|
+
"lint-staged": "^15.2.11",
|
|
79
|
+
"madge": "^8.0.0",
|
|
80
|
+
"prettier": "^3.4.2",
|
|
81
|
+
"sinon": "^19.0.2",
|
|
82
|
+
"ts-lit-plugin": "^2.0.2",
|
|
83
|
+
"tslib": "^2.8.1",
|
|
84
|
+
"typescript": "^5.7.2"
|
|
85
|
+
},
|
|
86
|
+
"eslintConfig": {
|
|
87
|
+
"extends": [
|
|
88
|
+
"@open-wc/eslint-config",
|
|
89
|
+
"eslint-config-prettier"
|
|
90
|
+
]
|
|
91
|
+
},
|
|
92
|
+
"prettier": "@open-wc/prettier-config",
|
|
93
|
+
"husky": {
|
|
94
|
+
"hooks": {
|
|
95
|
+
"pre-commit": "lint-staged"
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"publishConfig": {
|
|
99
|
+
"access": "public"
|
|
100
|
+
},
|
|
101
|
+
"lint-staged": {
|
|
102
|
+
"*.ts": [
|
|
103
|
+
"eslint --fix",
|
|
104
|
+
"git add"
|
|
105
|
+
]
|
|
106
|
+
}
|
|
107
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/** Analytics functionality from Donation Form Controller
|
|
2
|
-
* this will get passed thru to the children handlers
|
|
3
|
-
* so that they can send analytics events in donation form context
|
|
4
|
-
*/
|
|
5
|
-
export interface DonationControllerEventLoggerInterface {
|
|
6
|
-
logEvent(action: string, label: string): void;
|
|
7
|
-
logDonationFlowEvent(action: string, label: string): void;
|
|
8
|
-
}
|
|
1
|
+
/** Analytics functionality from Donation Form Controller
|
|
2
|
+
* this will get passed thru to the children handlers
|
|
3
|
+
* so that they can send analytics events in donation form context
|
|
4
|
+
*/
|
|
5
|
+
export interface DonationControllerEventLoggerInterface {
|
|
6
|
+
logEvent(action: string, label: string): void;
|
|
7
|
+
logDonationFlowEvent(action: string, label: string): void;
|
|
8
|
+
}
|
|
@@ -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,93 +1,93 @@
|
|
|
1
|
-
// Type definitions for Braintree-web 3.62
|
|
2
|
-
// Project: https://github.com/braintree/braintree-web
|
|
3
|
-
// Definitions by: Guy Shahine <https://github.com/chlela>
|
|
4
|
-
// Jason Buckner <https://github.com/jbuckner>
|
|
5
|
-
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
6
|
-
// TypeScript Version: 3.1
|
|
7
|
-
|
|
8
|
-
import { VERSION, BraintreeError, callback } from './modules/core';
|
|
9
|
-
import { AmericanExpress } from './modules/american-express';
|
|
10
|
-
import {
|
|
11
|
-
ApplePay,
|
|
12
|
-
ApplePaySession,
|
|
13
|
-
ApplePayStatusCodes,
|
|
14
|
-
ApplePayPayload,
|
|
15
|
-
ApplePayPaymentRequest,
|
|
16
|
-
} from './modules/apple-pay';
|
|
17
|
-
import { Client, Configuration, CreditCardInfo } from './modules/client';
|
|
18
|
-
import { DataCollector } from './modules/data-collector';
|
|
19
|
-
import { GooglePayment, GooglePaymentTokenizePayload } from './modules/google-payment';
|
|
20
|
-
import {
|
|
21
|
-
HostedFields,
|
|
22
|
-
HostedFieldFieldOptions,
|
|
23
|
-
HostedFieldsTokenizePayload,
|
|
24
|
-
HostedFieldsStateObject,
|
|
25
|
-
HostedFieldEventType,
|
|
26
|
-
} from './modules/hosted-fields';
|
|
27
|
-
import { PayPal, PayPalTokenizePayload } from './modules/paypal';
|
|
28
|
-
import {
|
|
29
|
-
PayPalCheckout,
|
|
30
|
-
PayPalCheckoutCreatePaymentOptions,
|
|
31
|
-
PayPalCheckoutTokenizationOptions,
|
|
32
|
-
} from './modules/paypal-checkout';
|
|
33
|
-
import { ThreeDSecure, ThreeDSecureVerifyPayload } from './modules/three-d-secure';
|
|
34
|
-
import {
|
|
35
|
-
UnionPay,
|
|
36
|
-
UnionPayFetchCapabilitiesPayload,
|
|
37
|
-
UnionPayEnrollPayload,
|
|
38
|
-
UnionPayTokenizePayload,
|
|
39
|
-
} from './modules/unionpay';
|
|
40
|
-
import { USBankAccount } from './modules/us-bank-account';
|
|
41
|
-
import { Venmo, VenmoTokenizePayload } from './modules/venmo';
|
|
42
|
-
|
|
43
|
-
export const americanExpress: AmericanExpress;
|
|
44
|
-
export const applePay: ApplePay;
|
|
45
|
-
export const client: Client;
|
|
46
|
-
export const dataCollector: DataCollector;
|
|
47
|
-
export const googlePayment: GooglePayment;
|
|
48
|
-
export const hostedFields: HostedFields;
|
|
49
|
-
export const paypal: PayPal;
|
|
50
|
-
export const paypalCheckout: PayPalCheckout;
|
|
51
|
-
export const threeDSecure: ThreeDSecure;
|
|
52
|
-
export const unionpay: UnionPay;
|
|
53
|
-
export const usBankAccount: USBankAccount;
|
|
54
|
-
export const venmo: Venmo;
|
|
55
|
-
|
|
56
|
-
export {
|
|
57
|
-
VERSION,
|
|
58
|
-
BraintreeError,
|
|
59
|
-
callback,
|
|
60
|
-
AmericanExpress,
|
|
61
|
-
ApplePay,
|
|
62
|
-
ApplePaySession,
|
|
63
|
-
ApplePayStatusCodes,
|
|
64
|
-
ApplePayPayload,
|
|
65
|
-
ApplePayPaymentRequest,
|
|
66
|
-
Client,
|
|
67
|
-
Configuration,
|
|
68
|
-
CreditCardInfo,
|
|
69
|
-
DataCollector,
|
|
70
|
-
GooglePayment,
|
|
71
|
-
GooglePaymentTokenizePayload,
|
|
72
|
-
HostedFields,
|
|
73
|
-
HostedFieldFieldOptions,
|
|
74
|
-
HostedFieldsTokenizePayload,
|
|
75
|
-
HostedFieldsStateObject,
|
|
76
|
-
HostedFieldEventType,
|
|
77
|
-
PayPal,
|
|
78
|
-
PayPalTokenizePayload,
|
|
79
|
-
PayPalCheckout,
|
|
80
|
-
PayPalCheckoutCreatePaymentOptions,
|
|
81
|
-
PayPalCheckoutTokenizationOptions,
|
|
82
|
-
ThreeDSecure,
|
|
83
|
-
ThreeDSecureVerifyPayload,
|
|
84
|
-
UnionPay,
|
|
85
|
-
UnionPayFetchCapabilitiesPayload,
|
|
86
|
-
UnionPayEnrollPayload,
|
|
87
|
-
UnionPayTokenizePayload,
|
|
88
|
-
USBankAccount,
|
|
89
|
-
Venmo,
|
|
90
|
-
VenmoTokenizePayload,
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
export as namespace braintree;
|
|
1
|
+
// Type definitions for Braintree-web 3.62
|
|
2
|
+
// Project: https://github.com/braintree/braintree-web
|
|
3
|
+
// Definitions by: Guy Shahine <https://github.com/chlela>
|
|
4
|
+
// Jason Buckner <https://github.com/jbuckner>
|
|
5
|
+
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
6
|
+
// TypeScript Version: 3.1
|
|
7
|
+
|
|
8
|
+
import { VERSION, BraintreeError, callback } from './modules/core';
|
|
9
|
+
import { AmericanExpress } from './modules/american-express';
|
|
10
|
+
import {
|
|
11
|
+
ApplePay,
|
|
12
|
+
ApplePaySession,
|
|
13
|
+
ApplePayStatusCodes,
|
|
14
|
+
ApplePayPayload,
|
|
15
|
+
ApplePayPaymentRequest,
|
|
16
|
+
} from './modules/apple-pay';
|
|
17
|
+
import { Client, Configuration, CreditCardInfo } from './modules/client';
|
|
18
|
+
import { DataCollector } from './modules/data-collector';
|
|
19
|
+
import { GooglePayment, GooglePaymentTokenizePayload } from './modules/google-payment';
|
|
20
|
+
import {
|
|
21
|
+
HostedFields,
|
|
22
|
+
HostedFieldFieldOptions,
|
|
23
|
+
HostedFieldsTokenizePayload,
|
|
24
|
+
HostedFieldsStateObject,
|
|
25
|
+
HostedFieldEventType,
|
|
26
|
+
} from './modules/hosted-fields';
|
|
27
|
+
import { PayPal, PayPalTokenizePayload } from './modules/paypal';
|
|
28
|
+
import {
|
|
29
|
+
PayPalCheckout,
|
|
30
|
+
PayPalCheckoutCreatePaymentOptions,
|
|
31
|
+
PayPalCheckoutTokenizationOptions,
|
|
32
|
+
} from './modules/paypal-checkout';
|
|
33
|
+
import { ThreeDSecure, ThreeDSecureVerifyPayload } from './modules/three-d-secure';
|
|
34
|
+
import {
|
|
35
|
+
UnionPay,
|
|
36
|
+
UnionPayFetchCapabilitiesPayload,
|
|
37
|
+
UnionPayEnrollPayload,
|
|
38
|
+
UnionPayTokenizePayload,
|
|
39
|
+
} from './modules/unionpay';
|
|
40
|
+
import { USBankAccount } from './modules/us-bank-account';
|
|
41
|
+
import { Venmo, VenmoTokenizePayload } from './modules/venmo';
|
|
42
|
+
|
|
43
|
+
export const americanExpress: AmericanExpress;
|
|
44
|
+
export const applePay: ApplePay;
|
|
45
|
+
export const client: Client;
|
|
46
|
+
export const dataCollector: DataCollector;
|
|
47
|
+
export const googlePayment: GooglePayment;
|
|
48
|
+
export const hostedFields: HostedFields;
|
|
49
|
+
export const paypal: PayPal;
|
|
50
|
+
export const paypalCheckout: PayPalCheckout;
|
|
51
|
+
export const threeDSecure: ThreeDSecure;
|
|
52
|
+
export const unionpay: UnionPay;
|
|
53
|
+
export const usBankAccount: USBankAccount;
|
|
54
|
+
export const venmo: Venmo;
|
|
55
|
+
|
|
56
|
+
export {
|
|
57
|
+
VERSION,
|
|
58
|
+
BraintreeError,
|
|
59
|
+
callback,
|
|
60
|
+
AmericanExpress,
|
|
61
|
+
ApplePay,
|
|
62
|
+
ApplePaySession,
|
|
63
|
+
ApplePayStatusCodes,
|
|
64
|
+
ApplePayPayload,
|
|
65
|
+
ApplePayPaymentRequest,
|
|
66
|
+
Client,
|
|
67
|
+
Configuration,
|
|
68
|
+
CreditCardInfo,
|
|
69
|
+
DataCollector,
|
|
70
|
+
GooglePayment,
|
|
71
|
+
GooglePaymentTokenizePayload,
|
|
72
|
+
HostedFields,
|
|
73
|
+
HostedFieldFieldOptions,
|
|
74
|
+
HostedFieldsTokenizePayload,
|
|
75
|
+
HostedFieldsStateObject,
|
|
76
|
+
HostedFieldEventType,
|
|
77
|
+
PayPal,
|
|
78
|
+
PayPalTokenizePayload,
|
|
79
|
+
PayPalCheckout,
|
|
80
|
+
PayPalCheckoutCreatePaymentOptions,
|
|
81
|
+
PayPalCheckoutTokenizationOptions,
|
|
82
|
+
ThreeDSecure,
|
|
83
|
+
ThreeDSecureVerifyPayload,
|
|
84
|
+
UnionPay,
|
|
85
|
+
UnionPayFetchCapabilitiesPayload,
|
|
86
|
+
UnionPayEnrollPayload,
|
|
87
|
+
UnionPayTokenizePayload,
|
|
88
|
+
USBankAccount,
|
|
89
|
+
Venmo,
|
|
90
|
+
VenmoTokenizePayload,
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
export as namespace braintree;
|
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
import { callback } from './core';
|
|
2
|
-
import { Client } from './client';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* @description This module is for use with Amex Express Checkout. To accept American Express cards, use Hosted Fields.
|
|
6
|
-
*/
|
|
7
|
-
export interface AmericanExpress {
|
|
8
|
-
create: (options: { client: Client }, callback: callback) => void;
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* @description The current version of the SDK, i.e. `3.0.2`.
|
|
12
|
-
*/
|
|
13
|
-
VERSION: string;
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Gets the rewards balance associated with a Braintree nonce. * @example
|
|
17
|
-
* var americanExpress = require('braintree-web/american-express');
|
|
18
|
-
*
|
|
19
|
-
* americanExpress.create({client: clientInstance}, function (createErr, americanExpressInstance) {
|
|
20
|
-
* var options = {nonce: existingBraintreeNonce};
|
|
21
|
-
* americanExpressInstance.getRewardsBalance(options, function (getErr, payload) {
|
|
22
|
-
* if (getErr || payload.error) {
|
|
23
|
-
* // Handle error
|
|
24
|
-
* return;
|
|
25
|
-
* }
|
|
26
|
-
*
|
|
27
|
-
* console.log('Rewards amount: ' + payload.rewardsAmount);
|
|
28
|
-
* });
|
|
29
|
-
* });
|
|
30
|
-
*/
|
|
31
|
-
getRewardsBalance(options: { nonce: string }, callback: callback): void;
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Gets the Express Checkout nonce profile given a nonce from American Express. * @example
|
|
35
|
-
* var americanExpress = require('braintree-web/american-express');
|
|
36
|
-
*
|
|
37
|
-
* americanExpress.create({client: clientInstance}, function (createErr, americanExpressInstance) {
|
|
38
|
-
* var options = {nonce: existingAmericanExpressNonce};
|
|
39
|
-
* americanExpressInstance.getExpressCheckoutProfile(options, function (getErr, payload) {
|
|
40
|
-
* if (getErr) {
|
|
41
|
-
* // Handle error
|
|
42
|
-
* return;
|
|
43
|
-
* }
|
|
44
|
-
*
|
|
45
|
-
* console.log('Number of cards: ' + payload.amexExpressCheckoutCards.length);
|
|
46
|
-
* });
|
|
47
|
-
* });
|
|
48
|
-
*/
|
|
49
|
-
getExpressCheckoutProfile(options: { nonce: string }, callback: callback): void;
|
|
50
|
-
}
|
|
1
|
+
import { callback } from './core';
|
|
2
|
+
import { Client } from './client';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @description This module is for use with Amex Express Checkout. To accept American Express cards, use Hosted Fields.
|
|
6
|
+
*/
|
|
7
|
+
export interface AmericanExpress {
|
|
8
|
+
create: (options: { client: Client }, callback: callback) => void;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @description The current version of the SDK, i.e. `3.0.2`.
|
|
12
|
+
*/
|
|
13
|
+
VERSION: string;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Gets the rewards balance associated with a Braintree nonce. * @example
|
|
17
|
+
* var americanExpress = require('braintree-web/american-express');
|
|
18
|
+
*
|
|
19
|
+
* americanExpress.create({client: clientInstance}, function (createErr, americanExpressInstance) {
|
|
20
|
+
* var options = {nonce: existingBraintreeNonce};
|
|
21
|
+
* americanExpressInstance.getRewardsBalance(options, function (getErr, payload) {
|
|
22
|
+
* if (getErr || payload.error) {
|
|
23
|
+
* // Handle error
|
|
24
|
+
* return;
|
|
25
|
+
* }
|
|
26
|
+
*
|
|
27
|
+
* console.log('Rewards amount: ' + payload.rewardsAmount);
|
|
28
|
+
* });
|
|
29
|
+
* });
|
|
30
|
+
*/
|
|
31
|
+
getRewardsBalance(options: { nonce: string }, callback: callback): void;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Gets the Express Checkout nonce profile given a nonce from American Express. * @example
|
|
35
|
+
* var americanExpress = require('braintree-web/american-express');
|
|
36
|
+
*
|
|
37
|
+
* americanExpress.create({client: clientInstance}, function (createErr, americanExpressInstance) {
|
|
38
|
+
* var options = {nonce: existingAmericanExpressNonce};
|
|
39
|
+
* americanExpressInstance.getExpressCheckoutProfile(options, function (getErr, payload) {
|
|
40
|
+
* if (getErr) {
|
|
41
|
+
* // Handle error
|
|
42
|
+
* return;
|
|
43
|
+
* }
|
|
44
|
+
*
|
|
45
|
+
* console.log('Number of cards: ' + payload.amexExpressCheckoutCards.length);
|
|
46
|
+
* });
|
|
47
|
+
* });
|
|
48
|
+
*/
|
|
49
|
+
getExpressCheckoutProfile(options: { nonce: string }, callback: callback): void;
|
|
50
|
+
}
|