Skip to content

Commit 1ef827d

Browse files
committed
Release braintree-web 3.130.0 source
1 parent 5607776 commit 1ef827d

File tree

12 files changed

+130
-37
lines changed

12 files changed

+130
-37
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# CHANGELOG
22

3+
## 3.130.0 (2025-10-02)
4+
5+
- Update dependencies:
6+
- Update accelerated-checkout-loader to 1.2.0
7+
- Fastlane:
8+
- Fix error that would sometimes occur on initialization
9+
310
## 3.129.1 (2025-09-17)
411

512
- PayPalCheckout

eslint.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ module.exports = [
88
"node_modules/",
99
"dist/",
1010
"vendor/",
11+
"storybook-static/",
1112
"src/venmo/shared/events.js",
1213
"src/venmo/shared/types.js",
1314
"src/venmo/internal",

package-lock.json

Lines changed: 6 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "braintree-web",
3-
"version": "3.129.1",
3+
"version": "3.130.0",
44
"license": "MIT",
55
"main": "src/index.js",
66
"private": true,
@@ -35,7 +35,7 @@
3535
"@braintree/sanitize-url": "7.0.4",
3636
"@braintree/uuid": "1.0.1",
3737
"@braintree/wrap-promise": "2.1.0",
38-
"@paypal/accelerated-checkout-loader": "1.1.0",
38+
"@paypal/accelerated-checkout-loader": "1.2.0",
3939
"card-validator": "10.0.3",
4040
"credit-card-type": "10.1.0",
4141
"framebus": "6.0.3",

src/data-collector/fraudnet.js

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ function clearSessionIdCache() {
3030
function Fraudnet() {}
3131

3232
Fraudnet.prototype.initialize = function (options) {
33-
var environment = options.environment;
3433
var self = this;
3534

3635
this.sessionId = options.sessionId || options.clientSessionId;
@@ -43,12 +42,24 @@ Fraudnet.prototype.initialize = function (options) {
4342
cachedSessionId = this.sessionId;
4443
}
4544

46-
this._beaconId = _generateBeaconId(this.sessionId);
45+
var parameterBlockConfig = {
46+
f: this.sessionId,
47+
s: FRAUDNET_SOURCE,
48+
};
49+
50+
if (!options.hasOwnProperty("beacon") || options.beacon === true) {
51+
parameterBlockConfig.b = _generateBeaconId(this.sessionId);
52+
} else {
53+
parameterBlockConfig.bu = false;
54+
}
55+
56+
if (options.hasOwnProperty("cb1")) {
57+
parameterBlockConfig.cb1 = options.cb1;
58+
}
59+
4760
this._parameterBlock = _createParameterBlock(
48-
this.sessionId,
49-
this._beaconId,
50-
environment,
51-
options.cb1
61+
parameterBlockConfig,
62+
options.environment
5263
);
5364

5465
return loadScript({
@@ -95,15 +106,8 @@ function _generateBeaconId(sessionId) {
95106
);
96107
}
97108

98-
function _createParameterBlock(sessionId, beaconId, environment, cb1) {
109+
function _createParameterBlock(config, environment) {
99110
var el = document.body.appendChild(document.createElement("script"));
100-
var config = {
101-
f: sessionId,
102-
s: FRAUDNET_SOURCE,
103-
b: beaconId,
104-
cb1: cb1,
105-
};
106-
107111
// for some reason, the presence of the sandbox
108112
// attribute in a production environment causes
109113
// some weird behavior with what url paths are

src/data-collector/index.js

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -119,17 +119,20 @@ function create(options) {
119119
})
120120
.then(function (client) {
121121
var clientConfiguration = client.getConfiguration();
122-
122+
var fraudnetConfig = {
123+
sessionId:
124+
options.riskCorrelationId ||
125+
options.clientMetadataId ||
126+
options.correlationId,
127+
clientSessionId: clientConfiguration.analyticsMetadata.sessionId,
128+
environment: clientConfiguration.gatewayConfiguration.environment,
129+
cb1: options.cb1,
130+
};
131+
if (options.hasOwnProperty("beacon")) {
132+
fraudnetConfig.beacon = options.beacon;
133+
}
123134
return fraudnet
124-
.setup({
125-
sessionId:
126-
options.riskCorrelationId ||
127-
options.clientMetadataId ||
128-
options.correlationId,
129-
clientSessionId: clientConfiguration.analyticsMetadata.sessionId,
130-
environment: clientConfiguration.gatewayConfiguration.environment,
131-
cb1: options.cb1,
132-
})
135+
.setup(fraudnetConfig)
133136
.then(function (fraudnetInstance) {
134137
if (fraudnetInstance) {
135138
data.correlation_id = fraudnetInstance.sessionId; // eslint-disable-line camelcase

src/fastlane/fastlane.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,14 @@ function fastlane(options) {
4242
delete options.minified;
4343
delete options.btSdkVersion;
4444

45-
return window.braintree.fastlane.create(
45+
var createFn;
46+
if (window.braintree._fastlane && window.braintree._fastlane.create) {
47+
createFn = window.braintree._fastlane.create;
48+
} else {
49+
createFn = window.braintree.fastlane.create;
50+
}
51+
52+
return createFn(
4653
assign({ platformOptions: platformOptions }, options, result.metadata)
4754
);
4855
})

src/hosted-fields/internal/components/base-input.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,8 @@ BaseInput.prototype.focus = function () {
292292
this.updateModel("isFocused", true);
293293
};
294294

295-
// TODO this no longer works in iOS v14.5/6 // eslint-disable-line no-warning-comments
295+
// eslint-disable-next-line no-warning-comments
296+
// TODO this no longer works in iOS v14.5/6
296297
// see if we can figure out an alternate workaround
297298
BaseInput.prototype.applySafariFocusFix = function () {
298299
var start, end;

src/payment-request/external/payment-request.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,8 @@ PaymentRequestComponent.prototype.initialize = function () {
307307
resolve(self);
308308
});
309309

310-
// TODO - We may need to apply the same setTimeout hack that Hosted Fields // eslint-disable-line no-warning-comments
310+
// eslint-disable-next-line no-warning-comments
311+
// TODO - We may need to apply the same setTimeout hack that Hosted Fields
311312
// uses for iframes to load correctly in Edge. See:
312313
// https://github.com/braintree/braintree-web/blob/0c951e5f9859c606652485de14188b6bd6656677/src/hosted-fields/external/hosted-fields.js#L449-L469
313314
self._frame.src = composeUrl(

src/three-d-secure/external/frameworks/songbird.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ var SONGBIRD_UI_EVENTS = [
2020
"ui.close",
2121
"ui.render",
2222

23-
// TODO these events are not documented in the // eslint-disable-line no-warning-comments
23+
// eslint-disable-next-line no-warning-comments
24+
// TODO these events are not documented in the
2425
// client reference because so far we have
2526
// not been able to trigger them in our testing
2627
"ui.renderHidden",

0 commit comments

Comments
 (0)