Skip to content

Commit

Permalink
Merge pull request #959 from Adyen/release/23.2.1
Browse files Browse the repository at this point in the history
Release/23.2.1
  • Loading branch information
amihajlovski authored Aug 23, 2023
2 parents c3737fc + 6647a09 commit 0c4b104
Show file tree
Hide file tree
Showing 82 changed files with 1,566 additions and 1,124 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@
<input type="text" class="form-control" name="Adyen_GooglePayMerchantID" id="googlePayMerchantID" aria-describedby="googlePayMerchantHelp" value="${AdyenConfigs.getGoogleMerchantID() || ''}">
</div>
</div>
<div class="form-group">
<label class="form-title mb-0" for="applePayDomain">Apple Pay Domain Association</label>
<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>
<div class="input-fields">
<textarea class="form-control" name="Adyen_ApplePay_DomainAssociation" id="applePayDomain" aria-describedby="applePayDomainHelp">${AdyenConfigs.getApplePayDomainAssociation() || ''}</textarea>
</div>
</div>
<div class="form-group">
<label class="form-title mb-0" for="oneClick">Store shopper details with one-click <small class="text-secondary">(optional)</small></label>
<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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ var _require3 = require('./renderGiftcardComponent'),
createElementsToShowRemainingGiftCardAmount = _require3.createElementsToShowRemainingGiftCardAmount,
renderAddedGiftCard = _require3.renderAddedGiftCard,
getGiftCardElements = _require3.getGiftCardElements,
showGiftCardInfoMessage = _require3.showGiftCardInfoMessage;
showGiftCardInfoMessage = _require3.showGiftCardInfoMessage,
showGiftCardCancelButton = _require3.showGiftCardCancelButton,
attachGiftCardCancelListener = _require3.attachGiftCardCancelListener;
function getCardConfig() {
return {
enableStoreDetails: window.showStoreDetails,
Expand Down Expand Up @@ -113,17 +115,29 @@ function handlePartialPaymentSuccess() {
var _getGiftCardElements = getGiftCardElements(),
giftCardSelectContainer = _getGiftCardElements.giftCardSelectContainer,
giftCardSelect = _getGiftCardElements.giftCardSelect,
giftCardsList = _getGiftCardElements.giftCardsList;
giftCardsList = _getGiftCardElements.giftCardsList,
cancelMainPaymentGiftCard = _getGiftCardElements.cancelMainPaymentGiftCard,
giftCardAddButton = _getGiftCardElements.giftCardAddButton;
giftCardSelectContainer.classList.add('invisible');
giftCardSelect.value = null;
giftCardsList.innerHTML = '';
store.componentsObj.giftcard.node.unmount('component_giftcard');
cancelMainPaymentGiftCard.addEventListener('click', function () {
store.componentsObj.giftcard.node.unmount('component_giftcard');
cancelMainPaymentGiftCard.classList.add('invisible');
giftCardAddButton.style.display = 'block';
giftCardSelect.value = 'null';
});
if (store.componentsObj.giftcard) {
store.componentsObj.giftcard.node.unmount('component_giftcard');
}
store.addedGiftCards.forEach(function (card) {
renderAddedGiftCard(card);
});
if ((_store$addedGiftCards = store.addedGiftCards) !== null && _store$addedGiftCards !== void 0 && _store$addedGiftCards.length) {
showGiftCardInfoMessage();
}
showGiftCardCancelButton(true);
attachGiftCardCancelListener();
createElementsToShowRemainingGiftCardAmount();
}
function getGiftCardConfig() {
Expand All @@ -137,7 +151,7 @@ function getGiftCardConfig() {
onBalanceCheck: function onBalanceCheck(resolve, reject, requestData) {
$.ajax({
type: 'POST',
url: 'Adyen-CheckBalance',
url: window.checkBalanceUrl,
data: JSON.stringify(requestData),
contentType: 'application/json; charset=utf-8',
async: false,
Expand All @@ -148,29 +162,27 @@ function getGiftCardConfig() {
var _getGiftCardElements2 = getGiftCardElements(),
giftCardsInfoMessageContainer = _getGiftCardElements2.giftCardsInfoMessageContainer,
giftCardSelect = _getGiftCardElements2.giftCardSelect,
giftCardCancelButton = _getGiftCardElements2.giftCardCancelButton,
cancelMainPaymentGiftCard = _getGiftCardElements2.cancelMainPaymentGiftCard,
giftCardAddButton = _getGiftCardElements2.giftCardAddButton,
giftCardSelectWrapper = _getGiftCardElements2.giftCardSelectWrapper;
if (giftCardSelectWrapper) {
giftCardSelectWrapper.classList.add('invisible');
}
var initialPartialObject = _objectSpread({}, store.partialPaymentsOrderObj);
giftCardCancelButton.classList.remove('invisible');
giftCardCancelButton.addEventListener('click', function () {
cancelMainPaymentGiftCard.classList.remove('invisible');
cancelMainPaymentGiftCard.addEventListener('click', function () {
store.componentsObj.giftcard.node.unmount('component_giftcard');
giftCardCancelButton.classList.add('invisible');
cancelMainPaymentGiftCard.classList.add('invisible');
giftCardAddButton.style.display = 'block';
giftCardSelect.value = 'null';
store.partialPaymentsOrderObj.remainingAmountFormatted = initialPartialObject.remainingAmountFormatted;
store.partialPaymentsOrderObj.totalDiscountedAmount = initialPartialObject.totalDiscountedAmount;
createElementsToShowRemainingGiftCardAmount();
});
document.querySelector('button[value="submit-payment"]').disabled = true;
giftCardsInfoMessageContainer.innerHTML = '';
giftCardsInfoMessageContainer.classList.remove('gift-cards-info-message-container');
store.partialPaymentsOrderObj.remainingAmountFormatted = data.remainingAmountFormatted;
store.partialPaymentsOrderObj.totalDiscountedAmount = data.totalAmountFormatted;
createElementsToShowRemainingGiftCardAmount();
resolve(data);
} else if (data.resultCode === constants.NOTENOUGHBALANCE) {
resolve(data);
Expand All @@ -189,7 +201,7 @@ function getGiftCardConfig() {
var giftCardData = requestData.paymentMethod;
$.ajax({
type: 'POST',
url: 'Adyen-PartialPaymentsOrder',
url: window.partialPaymentsOrderUrl,
data: JSON.stringify(requestData),
contentType: 'application/json; charset=utf-8',
async: false,
Expand Down Expand Up @@ -266,7 +278,7 @@ var actionHandler = /*#__PURE__*/function () {
function handleOnAdditionalDetails(state) {
$.ajax({
type: 'POST',
url: 'Adyen-PaymentsDetails',
url: window.paymentsDetailsURL,
data: JSON.stringify({
data: state.data,
orderToken: window.orderToken
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
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; }
var store = require('../../../../store');
var _require = require('./renderGenericComponent'),
renderGenericComponent = _require.renderGenericComponent;
initializeCheckout = _require.initializeCheckout;
var helpers = require('./helpers');
function makePartialPayment(requestData) {
var error;
$.ajax({
url: 'Adyen-partialPayment',
url: window.partialPaymentUrl,
type: 'POST',
data: JSON.stringify(requestData),
contentType: 'application/json; charset=utf-8',
Expand All @@ -28,7 +28,7 @@ function makePartialPayment(requestData) {
sessionStorage.setItem('partialPaymentsObj', JSON.stringify(rest));
store.addedGiftCards = giftCards;
helpers.setOrderFormData(response);
renderGenericComponent(true);
initializeCheckout();
}
}
}).fail(function () {});
Expand Down
Loading

0 comments on commit 0c4b104

Please sign in to comment.