Skip to content

Commit 7eacdcb

Browse files
Merge pull request #11 from cybersource-tpi/v24.2.1
changes related to v24.2.1
2 parents 85de8ef + 7d0c181 commit 7eacdcb

File tree

19 files changed

+119
-130
lines changed

19 files changed

+119
-130
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33

44
* **Description:** Cybersource, a Visa solution, is the only global, modular payment management platform built on secure Visa infrastructure with the payment reach and fraud insights of a massive $500B+ global processing network. You can find out more about what Cybersource does [here](https://www.cybersource.com/en-gb.html)
55
* **Categories:** Payment Processing, Fraud Detection, Address Validation, Tax Computation
6-
* **Version:** 24.2.0
7-
* **Last Certification Date:** April-2024
6+
* **Version:** 24.2.1
7+
* **Last Certification Date:** May 2024
88
* **Supports SFRA v6.3.0**
99
* **JavaScript Controllers Friendly:** **YES**
1010

1111
### Contact ###
12-
* Global Partner Solutions - Customer Support : <GlobalPartnerSolutionsCS@visa.com>
12+
* <SFCC@cybersource.com>
1313

1414
----
1515

cartridges/int_cybs_sfra/cartridge/client/default/js/checkout/checkout.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ $('button[value="submit-payment"]').on('click', function () {
2828
function openModal(url) {
2929
var iframe = $(
3030
`<div class="modal fade"><div class="modal-dialog"><div class="modal-content"><div class="modal-body">
31-
<iframe src='${url}'
31+
<iframe src='${decodeURIComponent(url)}'
3232
style="border: none; height:85vh; display: block;"
3333
height="100%" width="100%"
3434
marginheight="0" marginwidth="0" frameBorder="0" scrolling="no"
@@ -59,7 +59,7 @@ function handlePlaceOrder() {
5959
defer.reject(data);
6060
}
6161
} else if (data.createDeviceDataCollection) {
62-
openModal(data.redirectUrl);
62+
openModal(encodeURIComponent(data.redirectUrl));
6363
defer.resolve();
6464
} else {
6565
var continueUrl = data.continueUrl;

cartridges/int_cybs_sfra/cartridge/client/default/js/googlePay.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ function processPayment(paymentData) {
202202
$('*[name=' + attr + ']', parentSelector)
203203
.addClass('is-invalid')
204204
.siblings('.invalid-feedback')
205-
.html(fieldErrors[attr]);
205+
.text(fieldErrors[attr]);
206206
});
207207
}
208208

cartridges/int_cybs_sfra/cartridge/client/default/js/googlePayBilling.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ var googlePayEnvironment = $('#googlePayEnvironment').val();
1616
var allowedCardNetworks = ['AMEX', 'DISCOVER', 'JCB', 'MASTERCARD', 'VISA'];
1717

1818
var allowedCardAuthMethods = ['PAN_ONLY', 'CRYPTOGRAM_3DS'];
19+
var DOMPurify = require('dompurify');
1920

2021
var tokenizationSpecification = {
2122
type: 'PAYMENT_GATEWAY',
@@ -225,8 +226,9 @@ $('.minicart').off('mouseenter focusin touchstart').on('mouseenter focusin touch
225226
$('.minicart .popover').addClass('show');
226227
$('.minicart .popover').spinner().start();
227228
$.get(url, function (data) {
229+
var sanitizeData = DOMPurify.sanitize(data, {ADD_TAGS: ['isapplepay']});
228230
$('.minicart .popover').empty();
229-
$('.minicart .popover').append(data);
231+
$('.minicart .popover').append(sanitizeData);
230232

231233
var isGooglePayEnabled = $('#isGooglePayEnabledOnMiniCart').length > 0 && $('#isGooglePayEnabledOnMiniCart').val() === 'true';
232234

cartridges/int_cybs_sfra/cartridge/templates/default/cart/checkoutButtons.isml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<div class="checkout-and-applepay">
22
<div class="row">
3-
3+
44
<div class="${session.privacy.applepaysession === 'yes'? 'col-6 col-sm-5' : 'col-12' }" id="cart-checkout-button">
5-
<a href="${URLUtils.https('Checkout-Begin')}"
5+
<a href="${URLUtils.https('Checkout-Begin')}"
66
class="btn btn-primary btn-block checkout-btn ${pdict.valid.error ? 'disabled' : ''}" role="button">
77
${Resource.msg('button.checkout', 'cart', null)}
88
</a>
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<link rel="stylesheet" href="${URLUtils.staticURL('/css/deviceDataCollection.css')}">
22
<isif condition="${pdict.getDeviceFingerprint}">
3-
<noscript>
4-
<iframe id="deviceFPC" src="${pdict.url}"></iframe>
5-
</noscript>
3+
<script src="${pdict.url}"></script>
64
</isif>

cartridges/int_cybs_sfra_base/cartridge/configuration/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ function getConfig(config) {
136136
// DecisionManager
137137
visaSRCEnabled: config.vscCheckoutEnabled || customPreferences.ClicktoPay.Preferences.ClicktoPayEnabled.getValue(),
138138
visaSRCKey: config.visaSRCKey || customPreferences.ClicktoPay.Preferences.ClicktoPayKey.getValue(),
139-
VisaSRCProduction: config.VisaSRCProduction || customPreferences.ClicktoPay.Preferences.ClicktoPayProduction.getValue() };
139+
VisaSRCProduction: config.VisaSRCProduction || customPreferences.ClicktoPay.Preferences.ClicktoPayProduction.getValue()
140+
};
140141
}
141142
module.exports = getConfig();

cartridges/int_cybs_sfra_base/cartridge/configuration/preferences/customPreferences.js

Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -331,17 +331,6 @@ module.exports = {
331331
}
332332
},
333333
/** @type {CustomPreference} */
334-
NetworkTokenUpdates: {
335-
id: 'Cybersource_NetworkToken',
336-
display_name: 'Network Token Updates',
337-
description: 'Subscribe to Network Token life cycle updates',
338-
type: Types.boolean,
339-
default: false,
340-
flags: {
341-
mandatory: false
342-
}
343-
},
344-
/** @type {CustomPreference} */
345334
LimitSavedCardEnabled: {
346335
id: 'Cybersource_LimitSavedCardEnabled',
347336
display_name: 'Enable limiting Saved Card',
@@ -362,6 +351,17 @@ module.exports = {
362351
flags: {
363352
mandatory: false
364353
}
354+
},
355+
/** @type {CustomPreference} */
356+
NetworkTokenUpdates: {
357+
id: 'Cybersource_NetworkToken',
358+
display_name: 'Network Token Updates',
359+
description: 'Subscribe to Network Token life cycle updates',
360+
type: Types.boolean,
361+
default: false,
362+
flags: {
363+
mandatory: false
364+
}
365365
},
366366
/** @type {CustomPreference} */
367367
ResetIntervalInHours: {
@@ -491,17 +491,6 @@ module.exports = {
491491
mandatory: false
492492
}
493493
},
494-
/** @type {CustomPreference} */
495-
EnableSCA: {
496-
id: 'Cybersource_IsSCAEnabled',
497-
display_name: 'Enable SCA',
498-
description: 'Enable or Disable Strong Customer Authentication',
499-
type: Types.boolean,
500-
default: false,
501-
flags: {
502-
mandatory: false
503-
}
504-
}
505494
}
506495
},
507496
/* Google Pay Custom Preference */

cartridges/int_cybs_sfra_base/cartridge/controllers/CheckoutServices.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ if (configObject.payerAuthenticationEnabled && configObject.cartridgeEnabled &&
3232
var COHelpers = require('*/cartridge/scripts/checkout/checkoutHelpers');
3333
var validationHelpers = require('*/cartridge/scripts/helpers/basketValidationHelpers');
3434
var addressHelpers = require('*/cartridge/scripts/helpers/addressHelpers');
35-
35+
res.setHttpHeader("Content-Security-Policy", "script-src 'self'");
3636
// eslint-disable-next-line no-shadow
3737
var currentBasket = BasketMgr.getCurrentBasket();
3838
if (!currentBasket) {

cartridges/int_cybs_sfra_base/cartridge/controllers/Error.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ if (configObject.cartridgeEnabled) {
4040
}
4141
}
4242
messages.push();
43+
res.setContentType('application/json;charset=utf-8');
4344
if (req.httpHeaders.get('x-requested-with') === 'XMLHttpRequest') {
4445
res.json({
4546
errorObj: customError,

0 commit comments

Comments
 (0)