Skip to content

Commit 9063534

Browse files
committed
Release braintree-web 3.116.0 source
1 parent 76ecba2 commit 9063534

File tree

16 files changed

+53
-44
lines changed

16 files changed

+53
-44
lines changed

CHANGELOG.md

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

3+
## 3.116.0
4+
5+
- Fastlane
6+
- add `termsAndConditionsCountry` in tokenization
7+
- 3D Secure
8+
- Remove Legacy framework as v1 has been deprecated completely
9+
- Analytics
10+
- Changed Popup Bridge analytics to standardize around all Braintree SDKs
11+
312
## 3.115.2
413

514
- Apple Pay

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "braintree-web",
3-
"version": "3.115.2",
3+
"version": "3.116.0",
44
"license": "MIT",
55
"main": "src/index.js",
66
"private": true,

scripts/release

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,10 @@ release_source() {
129129
set +e
130130

131131
local CP_CMD="cp"
132-
#if [[ "$(uname)"="Darwin" ]]; then
132+
if [[ "$(uname)"="Darwin" ]]; then
133133
# Coreutils version of cp supports --parents, mac default one doesn't
134-
# CP_CMD="gcp"
135-
#fi
134+
CP_CMD="gcp"
135+
fi
136136

137137
git ls-files | egrep -v "$(join '|' $SOURCE_IGNORES)" | xargs "$CP_CMD" --parents -t "$BRAINTREE_JS_SOURCE_DEST"
138138
echo -e "Applied source changes in ${BLUE}$BRAINTREE_JS_SOURCE_DEST${RESET}."

src/client/request/graphql/generators/credit-card-for-fastlane-tokenization.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ function createCreditCardForFastlaneTokenizationBody(body, options) {
5959
"fastlane" in creditCard &&
6060
"termsAndConditionsVersion" in creditCard.fastlane &&
6161
creditCard.fastlane.termsAndConditionsVersion;
62+
var termsAndConditionsCountry =
63+
"fastlane" in creditCard &&
64+
"termsAndConditionsCountry" in creditCard.fastlane &&
65+
creditCard.fastlane.termsAndConditionsCountry;
6266
var email = creditCard.email;
6367
var optIn = "hasBuyerConsent" in fastlane && fastlane.hasBuyerConsent;
6468
var shippingAddress = creditCard.shippingAddress;
@@ -69,6 +73,7 @@ function createCreditCardForFastlaneTokenizationBody(body, options) {
6973
optIn: optIn,
7074
phone: creditCard.phone,
7175
termsAndConditionsVersion: termsAndConditionsVersion,
76+
termsAndConditionsCountry: termsAndConditionsCountry,
7277
});
7378

7479
if ("authAssertion" in fastlane) {

src/hosted-fields/internal/format-card-request-data.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ module.exports = function (data) {
3737
"termsAndConditionsVersion" in data.metadata.connectCheckout
3838
? data.metadata.connectCheckout.termsAndConditionsVersion
3939
: "",
40+
terms_and_conditions_country:
41+
"termsAndConditionsCountry" in data.metadata.connectCheckout
42+
? data.metadata.connectCheckout.termsAndConditionsCountry
43+
: "",
4044
has_buyer_consent:
4145
"hasBuyerConsent" in data.metadata.connectCheckout
4246
? data.metadata.connectCheckout.hasBuyerConsent

src/paypal/external/paypal.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -345,10 +345,7 @@ PayPal.prototype._createFrameServiceCallback = function (
345345

346346
// `err` exists when the user clicks "Done" button of browser view
347347
if (err || canceled) {
348-
analytics.sendEvent(
349-
client,
350-
"paypal.tokenization.closed-popupbridge.by-user"
351-
);
348+
analytics.sendEvent(client, "popup-bridge:paypal:canceled");
352349
// Call merchant's tokenize callback with an error
353350
reject(new BraintreeError(errors.PAYPAL_POPUP_CLOSED));
354351
} else if (payload) {
@@ -406,7 +403,7 @@ PayPal.prototype._tokenizePayPal = function (options, params) {
406403
var payload = self._formatTokenizePayload(response);
407404

408405
if (window.popupBridge) {
409-
analytics.sendEvent(client, "paypal.tokenization.success-popupbridge");
406+
analytics.sendEvent(client, "popup-bridge:paypal:succeeded");
410407
} else {
411408
analytics.sendEvent(client, "paypal.tokenization.success");
412409
}
@@ -421,7 +418,7 @@ PayPal.prototype._tokenizePayPal = function (options, params) {
421418
})
422419
.catch(function (err) {
423420
if (window.popupBridge) {
424-
analytics.sendEvent(client, "paypal.tokenization.failed-popupbridge");
421+
analytics.sendEvent(client, "popup-bridge:paypal:failed");
425422
} else {
426423
analytics.sendEvent(client, "paypal.tokenization.failed");
427424
}
@@ -520,7 +517,7 @@ PayPal.prototype._navigateFrameToAuth = function (options) {
520517
}
521518

522519
if (window.popupBridge) {
523-
analytics.sendEvent(client, "paypal.tokenization.opened-popupbridge");
520+
analytics.sendEvent(client, "popup-bridge:paypal:started");
524521
}
525522

526523
self._frameService.redirect(redirectUrl);

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
"use strict";
22

3-
var LegacyFramework = require("./legacy");
43
var CardinalModalFramework = require("./cardinal-modal");
54
var Bootstrap3ModalFramework = require("./bootstrap3-modal");
65
var InlineIframeFramework = require("./inline-iframe");
76

87
module.exports = {
9-
legacy: LegacyFramework,
108
"cardinal-modal": CardinalModalFramework,
119
"bootstrap3-modal": Bootstrap3ModalFramework,
1210
"inline-iframe": InlineIframeFramework,

src/three-d-secure/index.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ var wrapPromise = require("@braintree/wrap-promise");
2424
* @param {Client} [options.client] A {@link Client} instance.
2525
* @param {string} [options.authorization] A tokenizationKey or clientToken. Can be used in place of `options.client`.
2626
* @param {(number|string)} [options.version=1] The version of 3D Secure to use. Possible options:
27-
* * 1 - The legacy 3D Secure v1.0 integration.
2827
* * 2 - A 3D Secure v2.0 integration that uses a modal to host the 3D Secure iframe.
2928
* * 2-bootstrap3-modal - A 3D Secure v2.0 integration that uses a modal styled with Bootstrap 3 styles to host the 3D Secure iframe. Requires having the Bootstrap 3 script files and stylesheets on your page.
3029
* * 2-inline-iframe - A 3D Secure v2.0 integration that provides the authentication iframe directly to the merchant.
@@ -155,7 +154,6 @@ function create(options) {
155154
}
156155

157156
if (
158-
framework !== "legacy" &&
159157
!(
160158
gwConfig.threeDSecure &&
161159
gwConfig.threeDSecure.cardinalAuthenticationJWT

src/venmo/venmo.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -371,10 +371,7 @@ Venmo.prototype.appSwitch = function (url) {
371371
window.popupBridge &&
372372
typeof window.popupBridge.open === "function"
373373
) {
374-
analytics.sendEvent(
375-
this._createPromise,
376-
"venmo.appswitch.start.popup-bridge"
377-
);
374+
analytics.sendEvent(this._createPromise, "popup-bridge:venmo:started");
378375
window.popupBridge.open(url);
379376
} else {
380377
analytics.sendEvent(this._createPromise, "venmo.appswitch.start.webview");

0 commit comments

Comments
 (0)