New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

braintree-web-drop-in

Package Overview
Dependencies
Maintainers
1
Versions
82
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

braintree-web-drop-in - npm Package Compare versions

Comparing version 1.28.0 to 1.29.0

6

CHANGELOG.md
CHANGELOG
=========
1.29.0
------
- Update braintree-web to v3.76.4
- Add `threeDSecure.cardinalSDKConfig` option to `dropin.create`
- Fix issue where Drop-in would not clear out a tokenized credit card after 3D Secure authentication fails (#694)
1.28.0

@@ -5,0 +11,0 @@ ------

39

index.js

@@ -40,3 +40,3 @@ 'use strict';

* <form id="payment-form" action="/" method="post">
* <script src="https://js.braintreegateway.com/web/dropin/1.28.0/js/dropin.min.js"
* <script src="https://js.braintreegateway.com/web/dropin/1.29.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.28.0/js/dropin.min.js"
* <script src="https://js.braintreegateway.com/web/dropin/1.29.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.28.0/js/dropin.min.js"
* <script src="https://js.braintreegateway.com/web/dropin/1.29.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.28.0/js/dropin.min.js"
* <script src="https://js.braintreegateway.com/web/dropin/1.29.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.28.0/js/dropin.min.js"
* <script src="https://js.braintreegateway.com/web/dropin/1.29.0/js/dropin.min.js"
* data-braintree-dropin-authorization="CLIENT_AUTHORIZATION"

@@ -120,11 +120,11 @@ * data-card.cardholder-name.required="true"

var VERSION = '1.28.0';
var VERSION = '1.29.0';
/**
* @typedef {object} cardCreateOptions The configuration options for cards. Internally, Drop-in uses [Hosted Fields](http://braintree.github.io/braintree-web/3.76.3/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.76.4/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.76.3/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.76.3/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.76.3/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.76.4/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.76.4/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.76.4/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.

@@ -143,8 +143,9 @@ * @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 _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}.
* @typedef {object} threeDSecureOptions Configuration options to pass when creating the 3D Secure module used in Drop-in. `amount` for 3D Secure verification can be passed here, but it's recomended that it and all other 3D Secure verification options be passed to the {@link Dropin#requestPaymentMethod|requestPaymentMethod options} instead. Any `cardinalSDKConfig` options must be passed here when creating Drop-in.
*
* @param {string} amount The amount to verify with 3D Secure.
* @param {options} cardinalSDKConfig A configuration object to adjust the configuration for the underlying Cardinal SDK (Braintree's 3D Secure provider). See [`cardinalSDKConfig` options](http://braintree.github.io/braintree-web/3.76.4/module-braintree-web_three-d-secure.html#.create) for all options.
* @param {string} amount __Deprecated__ The amount to verify with 3D Secure. Set amount in the {@link Dropin#requestPaymentMethod|requestPaymentMethod options} instead.
*/
/** @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.76.3/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.76.4/PayPalCheckout.html#createPayment).
*

@@ -249,3 +250,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.76.3/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.76.4/PayPalCheckout.html#createPayment).
*

@@ -256,3 +257,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.76.3/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.76.4/PayPalCheckout.html#createPayment). For more information on PayPal Credit, see the [Braintree Developer Docs](https://developers.braintreepayments.com/guides/paypal/paypal-credit/javascript/v3).
*

@@ -275,3 +276,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 {(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.
* @param {(boolean|object)} [options.threeDSecure] When `true` is passed, the 3D Secure module will be created with a default configuration. See [`threeDSecureOptions`](#~threeDSecureOptions) for additional create options. If 3D Secure is configured and fails to load, Drop-in creation will fail.
*

@@ -298,3 +299,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.28.0/js/dropin.min.js"></script>
* <script src="https://js.braintreegateway.com/web/dropin/1.29.0/js/dropin.min.js"></script>
*

@@ -338,3 +339,3 @@ * <script>

*
* <script src="https://js.braintreegateway.com/web/dropin/1.28.0/js/dropin.min.js"></script>
* <script src="https://js.braintreegateway.com/web/dropin/1.29.0/js/dropin.min.js"></script>
*

@@ -417,3 +418,3 @@ * <script>

*
* <script src="https://js.braintreegateway.com/web/dropin/1.28.0/js/dropin.min.js"></script>
* <script src="https://js.braintreegateway.com/web/dropin/1.29.0/js/dropin.min.js"></script>
*

@@ -636,3 +637,3 @@ * <script>

/**
* @description The current version of Drop-in, i.e. `1.28.0`.
* @description The current version of Drop-in, i.e. `1.29.0`.
* @type {string}

@@ -639,0 +640,0 @@ */

@@ -21,7 +21,12 @@ 'use strict';

var self = this;
return threeDSecure.create({
var options = {
client: this._client,
version: 2
}).then(function (instance) {
};
if (this._config.cardinalSDKConfig) {
options.cardinalSDKConfig = this._config.cardinalSDKConfig;
}
return threeDSecure.create(options).then(function (instance) {
self._instance = instance;

@@ -28,0 +33,0 @@

{
"name": "braintree-web-drop-in",
"version": "1.28.0",
"version": "1.29.0",
"main": "index.js",

@@ -28,8 +28,8 @@ "scripts": {

"devDependencies": {
"@wdio/browserstack-service": "^7.5.1",
"@wdio/cli": "^7.5.1",
"@wdio/local-runner": "^7.5.1",
"@wdio/mocha-framework": "^7.4.6",
"@wdio/spec-reporter": "^7.4.3",
"@wdio/sync": "^7.5.1",
"@wdio/browserstack-service": "^7.5.7",
"@wdio/cli": "^7.5.7",
"@wdio/local-runner": "^7.5.7",
"@wdio/mocha-framework": "^7.5.3",
"@wdio/spec-reporter": "^7.5.7",
"@wdio/sync": "^7.5.7",
"ansi-colors": "^4.1.0",

@@ -42,5 +42,5 @@ "brfs": "^2.0.2",

"del": "^6.0.0",
"dotenv": "^8.2.0",
"dotenv": "^9.0.2",
"es6-shim": "^0.35.6",
"eslint": "^7.24.0",
"eslint": "^7.26.0",
"eslint-config-braintree": "^4.0.0",

@@ -52,4 +52,4 @@ "fancy-log": "^1.3.3",

"gulp-rename": "^2.0.0",
"gulp-replace": "^1.1.1",
"gulp-size": "3.0.0",
"gulp-replace": "^1.1.3",
"gulp-size": "^4.0.0",
"gulp-streamify": "1.0.2",

@@ -62,3 +62,3 @@ "gulp-uglify": "^3.0.2",

"mkdirp": "^1.0.4",
"mocha": "^8.3.2",
"mocha": "^8.4.0",
"npm-run-all": "^4.1.5",

@@ -79,3 +79,3 @@ "serve-static": "^1.14.1",

"@braintree/wrap-promise": "2.1.0",
"braintree-web": "3.76.3",
"braintree-web": "3.76.4",
"promise-polyfill": "8.2.0"

@@ -82,0 +82,0 @@ },

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc