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.1.0 to 1.2.0

13

CHANGELOG.md
CHANGELOG
=========
1.2.0
------
- Adjust styling of saved payment methods
- Fix typo in Russian translation
- Update browser detection library to 1.4.0
- Fix width errors where Drop-in was not aligned with other elements on merchant page
- Add ability to style PayPal button
- Fail early if PayPal creation errors
- Upgrade braintree-web to v3.17.0
- Upgrade checkout.js to 4.0.78
1.1.0
----------
------
- Add built css to npm build

@@ -7,0 +18,0 @@ - Fix typo in Dutch translations

2

constants.js

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

ANALYTICS_PREFIX: 'web.dropin.',
CHECKOUT_JS_SOURCE: 'https://www.paypalobjects.com/api/checkout.4.0.75.min.js',
CHECKOUT_JS_SOURCE: 'https://www.paypalobjects.com/api/checkout.4.0.78.min.js',
INTEGRATION: 'dropin2',

@@ -46,0 +46,0 @@ PAYPAL_CHECKOUT_SCRIPT_ID: 'braintree-dropin-paypal-checkout-script',

@@ -122,2 +122,5 @@ 'use strict';

DropinModel.prototype.asyncDependencyFailed = function (options) {
if (this.failedDependencies.hasOwnProperty(options.view)) {
return;
}
this.failedDependencies[options.view] = options.error;

@@ -124,0 +127,0 @@ this.dependenciesInitializing--;

@@ -30,7 +30,7 @@ 'use strict';

var DEFAULT_CHECKOUTJS_LOG_LEVEL = 'warn';
var VERSION = "1.1.0";
var VERSION = "1.2.0";
/**
* @typedef {object} Dropin~cardPaymentMethodPayload
* @property {string} nonce The payment method nonce.
* @property {string} nonce The payment method nonce, used by your server to charge the card.
* @property {object} details Additional account details.

@@ -45,3 +45,3 @@ * @property {string} details.cardType Type of card, e.g. Visa, MasterCard.

* @typedef {object} Dropin~paypalPaymentMethodPayload
* @property {string} nonce The payment method nonce.
* @property {string} nonce The payment method nonce, used by your server to charge the PayPal account.
* @property {object} details Additional PayPal account details. See a full list of details in the [PayPal client reference](http://braintree.github.io/braintree-web/{@pkg bt-web-version}/PayPalCheckout.html#~tokenizePayload).

@@ -244,4 +244,6 @@ * @property {string} type The payment method type, always `PayPalAccount` when the method requested is a PayPal account.

* @param {string} key The key of the property to update, such as `amount` or `currency`.
* @param {string|number} value The value of the property to update. Must be the type of the property specified in {@link module:braintree-web-drop-in|`dropin.create`}.
* @param {any} value The value of the property to update. Must be the type of the property specified in {@link module:braintree-web-drop-in|`dropin.create`}.
* @returns {void}
* @example
* dropinInstance.updateConfiguration('paypal', 'amount', '10.00');
*/

@@ -324,3 +326,3 @@ Dropin.prototype.updateConfiguration = function (property, key, value) {

* @public
* @param {callback} callback The first argument will be an error if no payment method is available and will otherwise be null. The second argument will be an object containing a payment method nonce; either a {@link Dropin~paypalPaymentMethodPayload|paypalPaymentMethodPayload} or a {@link Dropin~paypalPaymentMethodPayload|paypalPaymentMethodPayload}.
* @param {callback} callback The first argument will be an error if no payment method is available and will otherwise be null. The second argument will be an object containing a payment method nonce; either a {@link Dropin~cardPaymentMethodPayload|cardPaymentMethodPayload} or a {@link Dropin~paypalPaymentMethodPayload|paypalPaymentMethodPayload}.
* @returns {void}

@@ -327,0 +329,0 @@ */

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

var VERSION = "1.1.0";
var VERSION = "1.2.0";

@@ -56,2 +56,3 @@ /**

* @param {string} [options.paypal.currency] The currency code of the amount, such as `USD`. Required when using the Checkout flow.
* @param {string} [options.paypal.buttonStyle] The style object to apply to the PayPal button. The options [found here](https://developer.paypal.com/docs/integration/direct/express-checkout/integration-jsv4/customize-button/) are available.
*

@@ -64,2 +65,3 @@ * @param {object} [options.paypalCredit] The configuration options for PayPal Credit. To include a PayPal Credit option in your Drop-in integration, include the `paypalCredit` parameter and [enable PayPal in the Braintree Control Panel](https://developers.braintreepayments.com/guides/paypal/testing-go-live/#go-live).

* @param {string} [options.paypalCredit.currency] The currency code of the amount, such as `USD`. Required when using the Checkout flow.
* @param {string} [options.paypalCredit.buttonStyle] The style object to apply to the PayPal Credit button. The options [found here](https://developer.paypal.com/docs/integration/direct/express-checkout/integration-jsv4/customize-button/) are available. The `label` property cannot be adjusted.
* @param {function} callback The second argument, `data`, is the {@link Dropin} instance.

@@ -66,0 +68,0 @@ * @returns {void}

{
"name": "braintree-web-drop-in",
"version": "1.1.0",
"version": "1.2.0",
"main": "index.js",

@@ -60,6 +60,6 @@ "scripts": {

"dependencies": {
"braintree-web": "3.16.0",
"browser-detection": "braintree/browser-detection#1.3.0",
"braintree-web": "3.17.0",
"browser-detection": "braintree/browser-detection#1.4.0",
"promise-polyfill": "6.0.2"
}
}

@@ -33,3 +33,3 @@ # Braintree Web Drop-in

<script src="https://js.braintreegateway.com/web/dropin/1.1.0/js/dropin.min.js"></script>
<script src="https://js.braintreegateway.com/web/dropin/1.2.0/js/dropin.min.js"></script>

@@ -36,0 +36,0 @@ <script>

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

"payWithCard": "Оплатить картой",
"endingIn": "Последние две цифры номера карты: ••{{LastTwoCardDigits}}",
"endingIn": "Последние две цифры номера карты: ••{{lastTwoCardDigits}}",
"Card": "Карта",

@@ -39,0 +39,0 @@ "PayPal": "PayPal",

@@ -19,2 +19,3 @@ 'use strict';

var asyncDependencyTimeoutHandler;
var setupComplete = false;
var self = this;

@@ -53,2 +54,3 @@ var paypalType = isCredit ? 'paypalCredit' : 'paypal';

env: environment,
style: self.paypalConfiguration.buttonStyle || {},
locale: locale,

@@ -75,3 +77,3 @@ payment: function () {

buttonSelector = '[data-braintree-id="paypal-credit-button"]';
checkoutJSConfiguration.style = {label: 'credit'};
checkoutJSConfiguration.style.label = 'credit';
}

@@ -81,8 +83,17 @@

self.model.asyncDependencyReady();
setupComplete = true;
clearTimeout(asyncDependencyTimeoutHandler);
});
}).catch(reportError);
});
function reportError(err) {
self.model.reportError(err);
if (setupComplete) {
self.model.reportError(err);
} else {
self.model.asyncDependencyFailed({
view: self.ID,
error: new DropinError(err)
});
clearTimeout(asyncDependencyTimeoutHandler);
}
}

@@ -89,0 +100,0 @@ };

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

var cvvHrefLink = '#iconCVVBack';
var cvvDescriptor = '(3 digits)';
var cvvDescriptor = this.strings.cvvThreeDigitLabelSubheading;
var cvvPlaceholder = '•••';

@@ -300,3 +300,3 @@ var numberFieldGroup = this.getElementById('number-field-group');

cvvHrefLink = '#iconCVVFront';
cvvDescriptor = '(4 digits)';
cvvDescriptor = this.strings.cvvFourDigitLabelSubheading;
cvvPlaceholder = '••••';

@@ -303,0 +303,0 @@ }

Sorry, the diff of this file is not supported yet

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