braintree-web-drop-in
Advanced tools
Comparing version 1.22.1 to 1.23.0
CHANGELOG | ||
========= | ||
1.23.0 | ||
------ | ||
- Add 3DS support for non-network tokenized Google Pay cards | ||
- Add `threeDSecureInfo` to 3DS payload in `requestPaymentMethod` | ||
- Update braintree-web to v3.63.0 | ||
1.22.1 | ||
@@ -5,0 +11,0 @@ ------ |
32
index.js
@@ -40,3 +40,3 @@ 'use strict'; | ||
* <form id="payment-form" action="/" method="post"> | ||
* <script src="https://js.braintreegateway.com/web/dropin/1.22.1/js/dropin.min.js" | ||
* <script src="https://js.braintreegateway.com/web/dropin/1.23.0/js/dropin.min.js" | ||
* data-braintree-dropin-authorization="CLIENT_AUTHORIZATION" | ||
@@ -59,3 +59,3 @@ * ></script> | ||
* <form id="payment-form" action="/" method="post"> | ||
* <script src="https://js.braintreegateway.com/web/dropin/1.22.1/js/dropin.min.js" | ||
* <script src="https://js.braintreegateway.com/web/dropin/1.23.0/js/dropin.min.js" | ||
* data-braintree-dropin-authorization="CLIENT_AUTHORIZATION" | ||
@@ -75,3 +75,3 @@ * data-paypal.flow="checkout" | ||
* <form id="payment-form" action="/" method="post"> | ||
* <script src="https://js.braintreegateway.com/web/dropin/1.22.1/js/dropin.min.js" | ||
* <script src="https://js.braintreegateway.com/web/dropin/1.23.0/js/dropin.min.js" | ||
* data-braintree-dropin-authorization="CLIENT_AUTHORIZATION" | ||
@@ -91,3 +91,3 @@ * data-locale="de_DE" | ||
* <form id="payment-form" action="/" method="post"> | ||
* <script src="https://js.braintreegateway.com/web/dropin/1.22.1/js/dropin.min.js" | ||
* <script src="https://js.braintreegateway.com/web/dropin/1.23.0/js/dropin.min.js" | ||
* data-braintree-dropin-authorization="CLIENT_AUTHORIZATION" | ||
@@ -102,3 +102,3 @@ * data-card.cardholder-name.required="false" | ||
* <form id="payment-form" action="/" method="post"> | ||
* <script src="https://js.braintreegateway.com/web/dropin/1.22.1/js/dropin.min.js" | ||
* <script src="https://js.braintreegateway.com/web/dropin/1.23.0/js/dropin.min.js" | ||
* data-braintree-dropin-authorization="CLIENT_AUTHORIZATION" | ||
@@ -120,11 +120,11 @@ * data-card.cardholder-name.required="true" | ||
var VERSION = '1.22.1'; | ||
var VERSION = '1.23.0'; | ||
/** | ||
* @typedef {object} cardCreateOptions The configuration options for cards. Internally, Drop-in uses [Hosted Fields](http://braintree.github.io/braintree-web/3.58.0/module-braintree-web_hosted-fields.html) to render the card form. The `overrides.fields` and `overrides.styles` allow the Hosted Fields to be customized. | ||
* @typedef {object} cardCreateOptions The configuration options for cards. Internally, Drop-in uses [Hosted Fields](http://braintree.github.io/braintree-web/3.63.0/module-braintree-web_hosted-fields.html) to render the card form. The `overrides.fields` and `overrides.styles` allow the Hosted Fields to be customized. | ||
* | ||
* @param {(boolean|object)} [cardholderName] Will enable a cardholder name field above the card number field. If set to an object, you can specify whether or not the field is required. If set to a `true`, it will default the field to being present, but not required. | ||
* @param {boolean} [cardholderName.required=false] When true, the cardholder name field will be required to request the payment method nonce. | ||
* @param {object} [overrides.fields] The Hosted Fields [`fields` options](http://braintree.github.io/braintree-web/3.58.0/module-braintree-web_hosted-fields.html#~fieldOptions). Only `number`, `cvv`, `expirationDate` and `postalCode` can be configured. Each is a [Hosted Fields `field` object](http://braintree.github.io/braintree-web/3.58.0/module-braintree-web_hosted-fields.html#~field). `selector` cannot be modified. | ||
* @param {object} [overrides.styles] The Hosted Fields [`styles` options](http://braintree.github.io/braintree-web/3.58.0/module-braintree-web_hosted-fields.html#~styleOptions). These can be used to add custom styles to the Hosted Fields iframes. To style the rest of Drop-in, [review the documentation for customizing Drop-in](https://developers.braintreepayments.com/guides/drop-in/customization/javascript/v3#customize-your-ui). | ||
* @param {object} [overrides.fields] The Hosted Fields [`fields` options](http://braintree.github.io/braintree-web/3.63.0/module-braintree-web_hosted-fields.html#~fieldOptions). Only `number`, `cvv`, `expirationDate` and `postalCode` can be configured. Each is a [Hosted Fields `field` object](http://braintree.github.io/braintree-web/3.63.0/module-braintree-web_hosted-fields.html#~field). `selector` cannot be modified. | ||
* @param {object} [overrides.styles] The Hosted Fields [`styles` options](http://braintree.github.io/braintree-web/3.63.0/module-braintree-web_hosted-fields.html#~styleOptions). These can be used to add custom styles to the Hosted Fields iframes. To style the rest of Drop-in, [review the documentation for customizing Drop-in](https://developers.braintreepayments.com/guides/drop-in/customization/javascript/v3#customize-your-ui). | ||
* @param {boolean} [clearFieldsAfterTokenization=true] When false, the card form will not clear the card data when the customer returns to the card view after a successful tokenization. | ||
@@ -149,3 +149,3 @@ * @param {object} [vault] Configuration for vaulting credit cards. Only applies when using a [client token with a customer id](https://developers.braintreepayments.com/reference/request/client-token/generate/#customer_id). | ||
/** @typedef {object} paypalCreateOptions The configuration options for PayPal and PayPalCredit. For a full list of options see the [PayPal Checkout client reference options](http://braintree.github.io/braintree-web/3.58.0/PayPalCheckout.html#createPayment). | ||
/** @typedef {object} paypalCreateOptions The configuration options for PayPal and PayPalCredit. For a full list of options see the [PayPal Checkout client reference options](http://braintree.github.io/braintree-web/3.63.0/PayPalCheckout.html#createPayment). | ||
* | ||
@@ -237,3 +237,3 @@ * @param {string} flow Either `checkout` for a one-time [Checkout with PayPal](https://developers.braintreepayments.com/guides/paypal/checkout-with-paypal/javascript/v3) flow or `vault` for a [Vault flow](https://developers.braintreepayments.com/guides/paypal/vault/javascript/v3). Required when using PayPal or PayPal Credit. | ||
* | ||
* Some of the PayPal configuration options are listed [here](#~paypalCreateOptions), but for a full list see the [PayPal Checkout client reference options](http://braintree.github.io/braintree-web/3.58.0/PayPalCheckout.html#createPayment). | ||
* Some of the PayPal configuration options are listed [here](#~paypalCreateOptions), but for a full list see the [PayPal Checkout client reference options](http://braintree.github.io/braintree-web/3.63.0/PayPalCheckout.html#createPayment). | ||
* | ||
@@ -244,3 +244,3 @@ * PayPal is not [supported in Internet Explorer versions lower than 11](https://developer.paypal.com/docs/checkout/reference/faq/#which-browsers-does-paypal-checkout-support). | ||
* | ||
* Some of the PayPal Credit configuration options are listed [here](#~paypalCreateOptions), but for a full list see the [PayPal Checkout client reference options](http://braintree.github.io/braintree-web/3.58.0/PayPalCheckout.html#createPayment). For more information on PayPal Credit, see the [Braintree Developer Docs](https://developers.braintreepayments.com/guides/paypal/paypal-credit/javascript/v3). | ||
* Some of the PayPal Credit configuration options are listed [here](#~paypalCreateOptions), but for a full list see the [PayPal Checkout client reference options](http://braintree.github.io/braintree-web/3.63.0/PayPalCheckout.html#createPayment). For more information on PayPal Credit, see the [Braintree Developer Docs](https://developers.braintreepayments.com/guides/paypal/paypal-credit/javascript/v3). | ||
* | ||
@@ -283,3 +283,3 @@ * PayPal Credit is not [supported in Internet Explorer versions lower than 11](https://developer.paypal.com/docs/checkout/reference/faq/#which-browsers-does-paypal-checkout-support). | ||
* | ||
* <script src="https://js.braintreegateway.com/web/dropin/1.22.1/js/dropin.min.js"></script> | ||
* <script src="https://js.braintreegateway.com/web/dropin/1.23.0/js/dropin.min.js"></script> | ||
* | ||
@@ -323,3 +323,3 @@ * <script> | ||
* | ||
* <script src="https://js.braintreegateway.com/web/dropin/1.22.1/js/dropin.min.js"></script> | ||
* <script src="https://js.braintreegateway.com/web/dropin/1.23.0/js/dropin.min.js"></script> | ||
* | ||
@@ -402,3 +402,3 @@ * <script> | ||
* | ||
* <script src="https://js.braintreegateway.com/web/dropin/1.22.1/js/dropin.min.js"></script> | ||
* <script src="https://js.braintreegateway.com/web/dropin/1.23.0/js/dropin.min.js"></script> | ||
* | ||
@@ -621,3 +621,3 @@ * <script> | ||
/** | ||
* @description The current version of Drop-in, i.e. `1.22.1`. | ||
* @description The current version of Drop-in, i.e. `1.23.0`. | ||
* @type {string} | ||
@@ -624,0 +624,0 @@ */ |
{ | ||
"name": "braintree-web-drop-in", | ||
"version": "1.22.1", | ||
"version": "1.23.0", | ||
"main": "index.js", | ||
@@ -13,3 +13,3 @@ "scripts": { | ||
"pretest": "npm run lint", | ||
"test": "karma start test/config/karma.js --single-run", | ||
"test": "jest", | ||
"test:hint": "npm-run-all -n -s build -pr server hint", | ||
@@ -29,11 +29,11 @@ "test:integration": "wdio wdio.conf.js", | ||
"devDependencies": { | ||
"@wdio/browserstack-service": "^5.18.1", | ||
"@wdio/cli": "^5.18.6", | ||
"@wdio/local-runner": "^5.18.6", | ||
"@wdio/mocha-framework": "^5.18.6", | ||
"@wdio/spec-reporter": "^5.18.6", | ||
"@wdio/sync": "^5.18.6", | ||
"@wdio/browserstack-service": "^6.1.15", | ||
"@wdio/cli": "^6.1.25", | ||
"@wdio/local-runner": "^6.1.25", | ||
"@wdio/mocha-framework": "^6.1.19", | ||
"@wdio/spec-reporter": "^6.1.23", | ||
"@wdio/sync": "^6.1.14", | ||
"ansi-colors": "^4.1.0", | ||
"brfs": "^2.0.2", | ||
"browserify": "^16.5.0", | ||
"browserify": "^16.5.1", | ||
"browserify-versionify": "^1.0.6", | ||
@@ -49,3 +49,3 @@ "chai": "^4.2.0", | ||
"gulp": "^4.0.2", | ||
"gulp-clean-css": "^4.2.0", | ||
"gulp-clean-css": "^4.3.0", | ||
"gulp-less": "^4.0.1", | ||
@@ -59,16 +59,9 @@ "gulp-rename": "^2.0.0", | ||
"is-uuid": "1.0.2", | ||
"jsdoc": "^3.6.3", | ||
"jest": "^26.1.0", | ||
"jsdoc": "^3.6.4", | ||
"jsdoc-template": "braintree/jsdoc-template#3.2.0", | ||
"karma": "^4.4.1", | ||
"karma-browserify": "^6.1.0", | ||
"karma-mocha": "1.3.0", | ||
"karma-mocha-reporter": "2.2.5", | ||
"karma-phantomjs-launcher": "1.0.4", | ||
"mkdirp": "^1.0.3", | ||
"mocha": "^7.0.1", | ||
"mkdirp": "^1.0.4", | ||
"mocha": "^8.0.1", | ||
"npm-run-all": "^4.1.5", | ||
"phantomjs-prebuilt": "2.1.16", | ||
"serve-static": "^1.14.1", | ||
"sinon": "^8.1.1", | ||
"sinon-chai": "^3.4.0", | ||
"through2": "^3.0.1", | ||
@@ -86,3 +79,3 @@ "vinyl": "^2.2.0", | ||
"@braintree/wrap-promise": "2.0.0", | ||
"braintree-web": "3.58.0", | ||
"braintree-web": "3.63.0", | ||
"promise-polyfill": "8.1.3" | ||
@@ -89,0 +82,0 @@ }, |
@@ -35,3 +35,3 @@ # Braintree Web Drop-in | ||
<script src="https://js.braintreegateway.com/web/dropin/1.22.0/js/dropin.min.js"></script> | ||
<script src="https://js.braintreegateway.com/web/dropin/1.23.0/js/dropin.min.js"></script> | ||
@@ -71,16 +71,12 @@ <script> | ||
The design of Drop-in is intentionally opinionated, and while we aimed to make the design work in many scenarios, the design of your website may conflict with the default design of Drop-in. | ||
The design of Drop-in is intentionally opinionated, and while we aimed to make the design work in many scenarios, the design of your website may conflict with the default design of Drop-in. | ||
For minor UI customizations, [review our documentation](https://developers.braintreepayments.com/guides/drop-in/customization/javascript/v3#customize-your-ui). | ||
For more substantial changes, you may [fork](https://help.github.com/articles/fork-a-repo/) Drop-in, make your desired changes and build the assets by running `npm run build`. By default, Drop-in uses a hosted version of the built stylesheet. To override this behavior and use a custom stylesheet instead, simply add `<link>` tag to your page with the id `braintree-dropin-stylesheet`. | ||
For more substantial changes, you may [fork](https://help.github.com/articles/fork-a-repo/) Drop-in, make your desired changes and build the assets by running `npm run build`. By default, Drop-in uses a hosted version of the built stylesheet. To override this behavior and use a custom stylesheet instead, simply add `<link>` tag to your page with the id `braintree-dropin-stylesheet`. | ||
Drop-in uses the [Braintree JavaScript SDK](http://github.com/braintree/braintree-web). So if a fully customized UI is what you're looking for, Drop-in may be used as a reference implementation for using the JavaScript SDK. | ||
## Releases | ||
Subscribe to our [Google Group](https://groups.google.com/forum/#!forum/braintree-sdk-announce) to be notified when SDK releases go out. | ||
## License | ||
Drop-in is open source and available under the MIT license. See the [LICENSE](LICENSE) file for more info. |
@@ -13,2 +13,3 @@ 'use strict'; | ||
var Promise = require('../lib/promise'); | ||
var wait = require('../lib/wait'); | ||
var supportsFlexbox = require('../lib/supports-flexbox'); | ||
@@ -96,5 +97,5 @@ | ||
this.model.on('changeActivePaymentMethod', function () { | ||
setTimeout(function () { | ||
wait.delay(CHANGE_ACTIVE_PAYMENT_METHOD_TIMEOUT).then(function () { | ||
this.setPrimaryView(PaymentMethodsView.ID); | ||
}.bind(this), CHANGE_ACTIVE_PAYMENT_METHOD_TIMEOUT); | ||
}.bind(this)); | ||
}.bind(this)); | ||
@@ -143,5 +144,5 @@ | ||
} else { | ||
setTimeout(function () { | ||
wait.delay(0).then(function () { | ||
classList.add(this.sheetContainer, 'braintree-sheet--active'); | ||
}.bind(this), 0); | ||
}.bind(this)); | ||
classList.remove(this.paymentMethodsViews.container, 'braintree-methods--active'); | ||
@@ -169,3 +170,3 @@ if (!this.getView(id).getPaymentMethod()) { | ||
setTimeout(function () { | ||
wait.delay(0).then(function () { | ||
this.element.className = prefixShowClass(id); | ||
@@ -175,3 +176,3 @@ if (secondaryViewId) { | ||
} | ||
}.bind(this), 0); | ||
}.bind(this)); | ||
@@ -377,7 +378,7 @@ this.primaryView = this.getView(id); | ||
return new Promise(function (resolve) { | ||
setTimeout(function () { | ||
wait.delay(500).then(function () { | ||
// allow all the views to reset before hiding the loading indicator | ||
self.hideLoadingIndicator(); | ||
resolve(); | ||
}, 500); | ||
}); | ||
}); | ||
@@ -384,0 +385,0 @@ }; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
1207077
40
70
24507
81
+ Added@braintree/extended-promise@0.3.1(transitive)
+ Added@braintree/sanitize-url@4.0.1(transitive)
+ Addedbraintree-web@3.63.0(transitive)
+ Addedframebus@4.0.2(transitive)
+ Addedrestricted-input@2.1.1(transitive)
- Removed@braintree/extended-promise@0.3.0(transitive)
- Removed@braintree/sanitize-url@4.0.0(transitive)
- Removedbraintree-web@3.58.0(transitive)
- Removedframebus@3.0.2(transitive)
- Removedrestricted-input@2.1.0(transitive)
Updatedbraintree-web@3.63.0