braintree-web-drop-in
Advanced tools
Comparing version 1.20.0 to 1.20.1
CHANGELOG | ||
========= | ||
1.20.1 | ||
------ | ||
- Update event-emitter to v0.3.0 | ||
- Update braintree-web to v3.52.0 | ||
- Update songbird.js script urls for 3D Secure | ||
- Fix issue where bin was not being passed to underlying cardinal SDK | ||
- Default 3D Secure ACS Window Size to `03` (see [`acsWindowSize` option](https://braintree.github.io/braintree-web/current/ThreeDSecure.html#verifyCard)) | ||
- Scope full screen 3D Secure modal to screen sizes with heights of 700px and smaller | ||
1.20.0 | ||
------ | ||
- Update braintree-web to v3.51.0 | ||
- Update braintree-web to v3.50.1 | ||
- Add `threeDSecureInfo` to the 3D Secure response | ||
@@ -8,0 +17,0 @@ - Add `expirationMonth` and `expirationYear` to card tokenization payload |
68
index.js
@@ -40,3 +40,3 @@ 'use strict'; | ||
* <form id="payment-form" action="/" method="post"> | ||
* <script src="https://js.braintreegateway.com/web/dropin/1.20.0/js/dropin.min.js" | ||
* <script src="https://js.braintreegateway.com/web/dropin/1.20.1/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.20.0/js/dropin.min.js" | ||
* <script src="https://js.braintreegateway.com/web/dropin/1.20.1/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.20.0/js/dropin.min.js" | ||
* <script src="https://js.braintreegateway.com/web/dropin/1.20.1/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.20.0/js/dropin.min.js" | ||
* <script src="https://js.braintreegateway.com/web/dropin/1.20.1/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.20.0/js/dropin.min.js" | ||
* <script src="https://js.braintreegateway.com/web/dropin/1.20.1/js/dropin.min.js" | ||
* data-braintree-dropin-authorization="CLIENT_AUTHORIZATION" | ||
@@ -120,11 +120,11 @@ * data-card.cardholder-name.required="true" | ||
var VERSION = '1.20.0'; | ||
var VERSION = '1.20.1'; | ||
/** | ||
* @typedef {object} cardCreateOptions The configuration options for cards. Internally, Drop-in uses [Hosted Fields](http://braintree.github.io/braintree-web/3.50.1/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.52.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.50.1/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.50.1/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.50.1/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.52.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.52.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.52.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. | ||
@@ -144,3 +144,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} threeDSecureOptions The configuration options for 3D Secure. Requires [3D Secure](https://developers.braintreepayments.com/guides/3d-secure/overview) to be enabled in the Braintree gateway. The liability shift information will be included on the {@link Dropin#requestPaymentMethod|requestPaymentMethod payload}. | ||
* @typedef {object} threeDSecureOptions _Deprecated_ If the `threeDSecureOptions` passed into the create call is an object, you may set the `amount` to verify with 3D Secure. However, it's recomended that you pass `true` instead of a configuration object and do all 3D Secure configuration in the {@link Dropin#requestPaymentMethod|requestPaymentMethod options}. | ||
* | ||
@@ -150,3 +150,3 @@ * @param {string} amount The amount to verify with 3D Secure. | ||
/** @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.50.1/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.52.0/PayPalCheckout.html#createPayment). | ||
* | ||
@@ -238,3 +238,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.50.1/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.52.0/PayPalCheckout.html#createPayment). | ||
* | ||
@@ -245,3 +245,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.50.1/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.52.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). | ||
* | ||
@@ -264,3 +264,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). | ||
* | ||
* @param {object} [options.threeDSecure] The configuration options for 3D Secure. See [`threeDSecureOptions`](#~threeDSecureOptions) for all `threeDSecure` options. If 3D Secure is configured and fails to load, Drop-in creation will fail. | ||
* @param {boolean|object} [options.threeDSecure] It's recomended that you pass `true` here to enable 3D Secure and pass the configuration options for 3D Secure into {@link Dropin#requestPaymentMethod|requestPaymentMethod options}.See [`threeDSecureOptions`](#~threeDSecureOptions) for the deprecated create options. If 3D Secure is configured and fails to load, Drop-in creation will fail. | ||
* | ||
@@ -285,3 +285,3 @@ * @param {boolean} [options.vaultManager=false] Whether or not to allow a customer to delete saved payment methods when used with a [client token with a customer id](https://developers.braintreepayments.com/reference/request/client-token/generate/#customer_id). *Note:* Deleting a payment method from Drop-in will permanently delete the payment method, so this option is not recommended for merchants using Braintree's recurring billing system. This feature is not supported in Internet Explorer 9. | ||
* | ||
* <script src="https://js.braintreegateway.com/web/dropin/1.20.0/js/dropin.min.js"></script> | ||
* <script src="https://js.braintreegateway.com/web/dropin/1.20.1/js/dropin.min.js"></script> | ||
* | ||
@@ -325,3 +325,3 @@ * <script> | ||
* | ||
* <script src="https://js.braintreegateway.com/web/dropin/1.20.0/js/dropin.min.js"></script> | ||
* <script src="https://js.braintreegateway.com/web/dropin/1.20.1/js/dropin.min.js"></script> | ||
* | ||
@@ -404,3 +404,3 @@ * <script> | ||
* | ||
* <script src="https://js.braintreegateway.com/web/dropin/1.20.0/js/dropin.min.js"></script> | ||
* <script src="https://js.braintreegateway.com/web/dropin/1.20.1/js/dropin.min.js"></script> | ||
* | ||
@@ -527,7 +527,31 @@ * <script> | ||
* container: '#dropin-container', | ||
* threeDSecure: { | ||
* amount: '10.00' | ||
* } | ||
* }, callback); | ||
* threeDSecure: true | ||
* }, function (err, dropinInstance) { | ||
* // setup payment button | ||
* btn.addEventListener('click', function (e) { | ||
* e.preventDefault(); | ||
* | ||
* dropinInstance.requestPaymentMethod(| | ||
* threeDSecure: { | ||
* amount: '100.00', | ||
* billingAddress: { | ||
* givenName: 'Jill', // ASCII-printable characters required, else will throw a validation error | ||
* surname: 'Doe', // ASCII-printable characters required, else will throw a validation error | ||
* phoneNumber: '8101234567', | ||
* streetAddress: '555 Smith St.', | ||
* extendedAddress: '#5', | ||
* locality: 'Oakland', | ||
* region: 'CA', | ||
* postalCode: '12345', | ||
* countryCodeAlpha2: 'US' | ||
* }, | ||
* // additional 3ds params | ||
* } | ||
* }, function (err, payload) { | ||
* // inspect payload.liablityShifted | ||
* // send payload.nonce to server | ||
* }); | ||
* }); | ||
* }); | ||
* | ||
* @example | ||
@@ -600,3 +624,3 @@ * <caption>Enabled Vault Manager</caption> | ||
/** | ||
* @description The current version of Drop-in, i.e. `1.20.0`. | ||
* @description The current version of Drop-in, i.e. `1.20.1`. | ||
* @type {string} | ||
@@ -603,0 +627,0 @@ */ |
@@ -6,2 +6,4 @@ 'use strict'; | ||
var DEFAULT_ACS_WINDOW_SIZE = '03'; | ||
function ThreeDSecure(client, merchantConfiguration) { | ||
@@ -37,2 +39,5 @@ this._client = client; | ||
verifyOptions.additionalInformation = verifyOptions.additionalInformation || {}; | ||
verifyOptions.additionalInformation.acsWindowSize = verifyOptions.additionalInformation.acsWindowSize || DEFAULT_ACS_WINDOW_SIZE; | ||
return this._instance.verifyCard(verifyOptions); | ||
@@ -39,0 +44,0 @@ }; |
{ | ||
"name": "braintree-web-drop-in", | ||
"version": "1.20.0", | ||
"version": "1.20.1", | ||
"main": "index.js", | ||
@@ -35,6 +35,7 @@ "scripts": { | ||
"connect": "^3.7.0", | ||
"del": "^5.0.0", | ||
"dotenv": "^8.0.0", | ||
"eslint": "^5.16.0", | ||
"eslint-config-braintree": "^3.0.1", | ||
"del": "^5.1.0", | ||
"dotenv": "^8.1.0", | ||
"es6-shim": "^0.35.5", | ||
"eslint": "^6.3.0", | ||
"eslint-config-braintree": "^4.0.0", | ||
"fancy-log": "^1.3.3", | ||
@@ -49,7 +50,7 @@ "gulp": "^4.0.2", | ||
"gulp-uglify": "^3.0.2", | ||
"hint": "^5.2.0", | ||
"hint": "^5.2.2", | ||
"is-uuid": "1.0.2", | ||
"jsdoc": "^3.6.3", | ||
"jsdoc-template": "braintree/jsdoc-template#3.2.0", | ||
"karma": "^4.2.0", | ||
"karma": "^4.3.0", | ||
"karma-browserify": "^6.1.0", | ||
@@ -65,3 +66,3 @@ "karma-mocha": "1.3.0", | ||
"serve-static": "^1.14.1", | ||
"sinon": "^7.4.1", | ||
"sinon": "^7.4.2", | ||
"sinon-chai": "^3.3.0", | ||
@@ -78,5 +79,5 @@ "through2": "^3.0.1", | ||
"@braintree/class-list": "0.1.0", | ||
"@braintree/event-emitter": "0.2.0", | ||
"@braintree/event-emitter": "0.3.0", | ||
"@braintree/wrap-promise": "2.0.0", | ||
"braintree-web": "3.50.1", | ||
"braintree-web": "3.52.0", | ||
"promise-polyfill": "8.1.3" | ||
@@ -83,0 +84,0 @@ }, |
@@ -33,3 +33,3 @@ # Braintree Web Drop-in | ||
<script src="https://js.braintreegateway.com/web/dropin/1.20.0/js/dropin.min.js"></script> | ||
<script src="https://js.braintreegateway.com/web/dropin/1.20.1/js/dropin.min.js"></script> | ||
@@ -36,0 +36,0 @@ <script> |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
1095960
21895
42
+ Added@braintree/event-emitter@0.3.0(transitive)
+ Addedbraintree-web@3.52.0(transitive)
- Removed@braintree/event-emitter@0.2.0(transitive)
- Removedbraintree-web@3.50.1(transitive)
Updatedbraintree-web@3.52.0