Skip to content

Commit 0c4b104

Browse files
authored
Merge pull request #959 from Adyen/release/23.2.1
Release/23.2.1
2 parents c3737fc + 6647a09 commit 0c4b104

File tree

82 files changed

+1566
-1124
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+1566
-1124
lines changed

cartridges/bm_adyen/cartridge/templates/default/adyenSettings/settingCards/lpmSettings.isml

+7
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@
3030
<input type="text" class="form-control" name="Adyen_GooglePayMerchantID" id="googlePayMerchantID" aria-describedby="googlePayMerchantHelp" value="${AdyenConfigs.getGoogleMerchantID() || ''}">
3131
</div>
3232
</div>
33+
<div class="form-group">
34+
<label class="form-title mb-0" for="applePayDomain">Apple Pay Domain Association</label>
35+
<small id="applePayDomainHelp" class="form-text mb-1">Apple Pay is enabled by default in the Test environment. If you also want to activate it in the Live environment, enter <a class="text-primary" href="https://docs.adyen.com/payment-methods/apple-pay/web-component#going-live" target="_blank">Apple Pay Domain Association</a></small>
36+
<div class="input-fields">
37+
<textarea class="form-control" name="Adyen_ApplePay_DomainAssociation" id="applePayDomain" aria-describedby="applePayDomainHelp">${AdyenConfigs.getApplePayDomainAssociation() || ''}</textarea>
38+
</div>
39+
</div>
3340
<div class="form-group">
3441
<label class="form-title mb-0" for="oneClick">Store shopper details with one-click <small class="text-secondary">(optional)</small></label>
3542
<small id="oneClickHelp" class="form-text mb-1"><a class="text-primary" href="https://docs.adyen.com/plugins/salesforce-commerce-cloud/set-up-the-cartridge#step-6-store-shopper-details" target="_blank">One-click</a> stores payment details of your shoppers securely. It allows you to offer subscriptions, automatic top-ups to shoppers’ accounts, and give them a faster checkout experience.</small>

cartridges/int_adyen_SFRA/cartridge/client/default/js/adyen_checkout/checkoutConfiguration.js

+24-12
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ var _require3 = require('./renderGiftcardComponent'),
2121
createElementsToShowRemainingGiftCardAmount = _require3.createElementsToShowRemainingGiftCardAmount,
2222
renderAddedGiftCard = _require3.renderAddedGiftCard,
2323
getGiftCardElements = _require3.getGiftCardElements,
24-
showGiftCardInfoMessage = _require3.showGiftCardInfoMessage;
24+
showGiftCardInfoMessage = _require3.showGiftCardInfoMessage,
25+
showGiftCardCancelButton = _require3.showGiftCardCancelButton,
26+
attachGiftCardCancelListener = _require3.attachGiftCardCancelListener;
2527
function getCardConfig() {
2628
return {
2729
enableStoreDetails: window.showStoreDetails,
@@ -113,17 +115,29 @@ function handlePartialPaymentSuccess() {
113115
var _getGiftCardElements = getGiftCardElements(),
114116
giftCardSelectContainer = _getGiftCardElements.giftCardSelectContainer,
115117
giftCardSelect = _getGiftCardElements.giftCardSelect,
116-
giftCardsList = _getGiftCardElements.giftCardsList;
118+
giftCardsList = _getGiftCardElements.giftCardsList,
119+
cancelMainPaymentGiftCard = _getGiftCardElements.cancelMainPaymentGiftCard,
120+
giftCardAddButton = _getGiftCardElements.giftCardAddButton;
117121
giftCardSelectContainer.classList.add('invisible');
118122
giftCardSelect.value = null;
119123
giftCardsList.innerHTML = '';
120-
store.componentsObj.giftcard.node.unmount('component_giftcard');
124+
cancelMainPaymentGiftCard.addEventListener('click', function () {
125+
store.componentsObj.giftcard.node.unmount('component_giftcard');
126+
cancelMainPaymentGiftCard.classList.add('invisible');
127+
giftCardAddButton.style.display = 'block';
128+
giftCardSelect.value = 'null';
129+
});
130+
if (store.componentsObj.giftcard) {
131+
store.componentsObj.giftcard.node.unmount('component_giftcard');
132+
}
121133
store.addedGiftCards.forEach(function (card) {
122134
renderAddedGiftCard(card);
123135
});
124136
if ((_store$addedGiftCards = store.addedGiftCards) !== null && _store$addedGiftCards !== void 0 && _store$addedGiftCards.length) {
125137
showGiftCardInfoMessage();
126138
}
139+
showGiftCardCancelButton(true);
140+
attachGiftCardCancelListener();
127141
createElementsToShowRemainingGiftCardAmount();
128142
}
129143
function getGiftCardConfig() {
@@ -137,7 +151,7 @@ function getGiftCardConfig() {
137151
onBalanceCheck: function onBalanceCheck(resolve, reject, requestData) {
138152
$.ajax({
139153
type: 'POST',
140-
url: 'Adyen-CheckBalance',
154+
url: window.checkBalanceUrl,
141155
data: JSON.stringify(requestData),
142156
contentType: 'application/json; charset=utf-8',
143157
async: false,
@@ -148,29 +162,27 @@ function getGiftCardConfig() {
148162
var _getGiftCardElements2 = getGiftCardElements(),
149163
giftCardsInfoMessageContainer = _getGiftCardElements2.giftCardsInfoMessageContainer,
150164
giftCardSelect = _getGiftCardElements2.giftCardSelect,
151-
giftCardCancelButton = _getGiftCardElements2.giftCardCancelButton,
165+
cancelMainPaymentGiftCard = _getGiftCardElements2.cancelMainPaymentGiftCard,
152166
giftCardAddButton = _getGiftCardElements2.giftCardAddButton,
153167
giftCardSelectWrapper = _getGiftCardElements2.giftCardSelectWrapper;
154168
if (giftCardSelectWrapper) {
155169
giftCardSelectWrapper.classList.add('invisible');
156170
}
157171
var initialPartialObject = _objectSpread({}, store.partialPaymentsOrderObj);
158-
giftCardCancelButton.classList.remove('invisible');
159-
giftCardCancelButton.addEventListener('click', function () {
172+
cancelMainPaymentGiftCard.classList.remove('invisible');
173+
cancelMainPaymentGiftCard.addEventListener('click', function () {
160174
store.componentsObj.giftcard.node.unmount('component_giftcard');
161-
giftCardCancelButton.classList.add('invisible');
175+
cancelMainPaymentGiftCard.classList.add('invisible');
162176
giftCardAddButton.style.display = 'block';
163177
giftCardSelect.value = 'null';
164178
store.partialPaymentsOrderObj.remainingAmountFormatted = initialPartialObject.remainingAmountFormatted;
165179
store.partialPaymentsOrderObj.totalDiscountedAmount = initialPartialObject.totalDiscountedAmount;
166-
createElementsToShowRemainingGiftCardAmount();
167180
});
168181
document.querySelector('button[value="submit-payment"]').disabled = true;
169182
giftCardsInfoMessageContainer.innerHTML = '';
170183
giftCardsInfoMessageContainer.classList.remove('gift-cards-info-message-container');
171184
store.partialPaymentsOrderObj.remainingAmountFormatted = data.remainingAmountFormatted;
172185
store.partialPaymentsOrderObj.totalDiscountedAmount = data.totalAmountFormatted;
173-
createElementsToShowRemainingGiftCardAmount();
174186
resolve(data);
175187
} else if (data.resultCode === constants.NOTENOUGHBALANCE) {
176188
resolve(data);
@@ -189,7 +201,7 @@ function getGiftCardConfig() {
189201
var giftCardData = requestData.paymentMethod;
190202
$.ajax({
191203
type: 'POST',
192-
url: 'Adyen-PartialPaymentsOrder',
204+
url: window.partialPaymentsOrderUrl,
193205
data: JSON.stringify(requestData),
194206
contentType: 'application/json; charset=utf-8',
195207
async: false,
@@ -266,7 +278,7 @@ var actionHandler = /*#__PURE__*/function () {
266278
function handleOnAdditionalDetails(state) {
267279
$.ajax({
268280
type: 'POST',
269-
url: 'Adyen-PaymentsDetails',
281+
url: window.paymentsDetailsURL,
270282
data: JSON.stringify({
271283
data: state.data,
272284
orderToken: window.orderToken

cartridges/int_adyen_SFRA/cartridge/client/default/js/adyen_checkout/makePartialPayment.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
55
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
66
var store = require('../../../../store');
77
var _require = require('./renderGenericComponent'),
8-
renderGenericComponent = _require.renderGenericComponent;
8+
initializeCheckout = _require.initializeCheckout;
99
var helpers = require('./helpers');
1010
function makePartialPayment(requestData) {
1111
var error;
1212
$.ajax({
13-
url: 'Adyen-partialPayment',
13+
url: window.partialPaymentUrl,
1414
type: 'POST',
1515
data: JSON.stringify(requestData),
1616
contentType: 'application/json; charset=utf-8',
@@ -28,7 +28,7 @@ function makePartialPayment(requestData) {
2828
sessionStorage.setItem('partialPaymentsObj', JSON.stringify(rest));
2929
store.addedGiftCards = giftCards;
3030
helpers.setOrderFormData(response);
31-
renderGenericComponent(true);
31+
initializeCheckout();
3232
}
3333
}
3434
}).fail(function () {});

0 commit comments

Comments
 (0)