Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/23.2.0 #468

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Cartridges/int_checkoutcom/cartridge/scripts/hooks.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
{
"name": "dw.extensions.applepay.shippingContactSelected",
"script": "./payment/processor/CHECKOUTCOM_APPLE_PAY"
},
{
"name": "dw.extensions.applepay.getRequest",
"script": "./payment/processor/CHECKOUTCOM_APPLE_PAY"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -154,3 +154,11 @@ exports.shippingContactSelected = function(basket, event, response) {

return;
};

exports.getRequest = function(basket, req) {
var currentLocale = ckoHelper.getSiteCurrentCountryCode();
if(currentLocale === 'SA') {
req.supportedNetworks.push('mada');
}
session.custom.applepaysession = 'yes';
};
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

// API Includes
var Transaction = require('dw/system/Transaction');
var PaymentMgr = require('dw/order/PaymentMgr');

// Site controller
var Site = require('dw/system/Site');
Expand Down Expand Up @@ -79,6 +80,16 @@ function Handle(args) {
cardType: paymentForm.get('type').value(),
};

var paymentCard = PaymentMgr.getPaymentCard(cardData.cardType);

var creditCardStatus = paymentCard.verify(cardData.month, cardData.year, cardData.number, cardData.cvn);
if (creditCardStatus.error) {
var invalidatePaymentCardFormElements = require('*/cartridge/scripts/checkout/InvalidatePaymentCardFormElements');
invalidatePaymentCardFormElements.invalidatePaymentCardForm(creditCardStatus, session.forms.cardPaymentForm);

return { error: true };
}

// Validate expiration date
if (cardData.year === new Date().getFullYear() && cardData.month < new Date().getMonth() + 1) {
paymentForm.get('expiration.month').invalidateFormElement();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@
margin-top: 1px;
}

label[for^="dwfrm_cardPaymentForm_number"]~.error-message {
margin-bottom: -20px;
}

.cartes-bancaires-wrapper.selected, .cartes-visa-wrapper.selected, .cartes-mastercard-wrapper.selected {
border-color: #00D26A;
}
Expand Down Expand Up @@ -159,6 +163,10 @@
padding: 7px;
}

.no-click {
pointer-events: none;
}

@media only screen and (max-width: 768px) {
.cartes-bancaires-options {
top: 29%;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,13 @@ function launchGooglePay() {
signedMessage: JSON.parse(e.paymentMethodToken.token)
.signedMessage,
};
jQuery('[id="dwfrm_googlePayForm_data"]').val(JSON.stringify(o)),
"" ===
$(
'input[name="dwfrm_billing_googlePayForm_ckoGooglePayData"]'
).val()
? $(".ckoGooglePayButton-invalid-field-message").text(
window.ckoLang.googlePayDataInvalid
)
: $("#dwfrm_billing").submit();
jQuery('[id="dwfrm_googlePayForm_data"]').val(JSON.stringify(o));
if ('' === $('input[name="dwfrm_billing_googlePayForm_ckoGooglePayData"]').val()) {
$('.ckoGooglePayButton-invalid-field-message').text(window.ckoLang.googlePayDataInvalid);
} else {
$('.button-fancy-large').removeClass('no-click disabled');
$('#dwfrm_billing').submit();
}
})(e);
})
.catch(function(e) {
Expand All @@ -73,6 +71,13 @@ function launchGooglePay() {
document.addEventListener(
"DOMContentLoaded",
function() {
$('.input-radio').click(function() {
if ($(this).val() === 'CHECKOUTCOM_GOOGLE_PAY') {
$('.button-fancy-large').addClass('no-click disabled');
} else {
$('.button-fancy-large').removeClass('no-click disabled');
}
});
launchGooglePay();
},
!1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,16 @@


<!-- This to include the boleto pay apm form -->
<iscomment>
Boleto has been temporarily removed from the business manager configuration, rendering this payment method currently inactive.
To activate it, include the metadata in the business manager for 'CKO [5] APM Settings' custom preference.
Ticket no. CHECBLD-149
<isif condition="${(dw.system.Site.getCurrent().getCustomPreferenceValue('ckoBoletoEnabled'))}">
<div id="boleto" class="hideApm apmBox">
<isinclude template="apm/includes/boleto.isml"/>
</div>
</isif>
</iscomment>


<!-- This to include the bancontact pay apm form -->
Expand All @@ -31,11 +36,16 @@


<!-- This to include the benefit pay apm form -->
<iscomment>
BenefitPay has been temporarily removed from the business manager configuration, rendering this payment method currently inactive.
To activate it, include the metadata in the business manager for 'CKO [5] APM Settings' custom preference.
Ticket no. CHECBLD-149
<isif condition="${(dw.system.Site.getCurrent().getCustomPreferenceValue('ckoBenefitEnabled'))}">
<div id="benefit" class="hideApm apmBox">
<isinclude template="apm/includes/benefitPay.isml"/>
</div>
</isif>
</iscomment>


<!-- This to include the giro pay apm form -->
Expand Down Expand Up @@ -103,11 +113,16 @@


<!-- This to include the poli apm form -->
<iscomment>
Poli has been temporarily removed from the business manager configuration, rendering this payment method currently inactive.
To activate it, include the metadata in the business manager for 'CKO [5] APM Settings' custom preference.
Ticket no. CHECBLD-149
<isif condition="${(dw.system.Site.getCurrent().getCustomPreferenceValue('ckoPoliEnabled'))}">
<div id="poli" class="hideApm apmBox">
<isinclude template="apm/includes/poli.isml"/>
</div>
</isif>
</iscomment>


<!-- This to include the p24 apm form -->
Expand All @@ -118,19 +133,29 @@
</isif>

<!-- This to include the Oxxo apm form -->
<iscomment>
OXXO has been temporarily removed from the business manager configuration, rendering this payment method currently inactive.
To activate it, include the metadata in the business manager for 'CKO [5] APM Settings' custom preference.
Ticket no. CHECBLD-149
<isif condition="${(dw.system.Site.getCurrent().getCustomPreferenceValue('ckoOxxoEnabled'))}">
<div id="oxxo" class="hideApm apmBox">
<isinclude template="apm/includes/oxxo.isml"/>
</div>
</isif>
</iscomment>


<!-- This to include the Alipay apm form -->
<iscomment>
Alipay has been temporarily removed from the business manager configuration, rendering this payment method currently inactive.
To activate it, include the metadata in the business manager for 'CKO [5] APM Settings' custom preference.
Ticket no. CHECBLD-149
<isif condition="${(dw.system.Site.getCurrent().getCustomPreferenceValue('ckoAlipayEnabled'))}">
<div id="alipay" class="hideApm apmBox">
<isinclude template="apm/includes/alipay.isml"/>
</div>
</isif>
</iscomment>


<!-- This to include the klarna apm form -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,33 @@ var ckoApmFilterConfig = {
currencies: ['EUR'],
enabled: currentSite.getCurrent().getCustomPreferenceValue(constants.CKO_IDEAL_ENABLED),
},
/* Boleto has been temporarily removed from the business manager configuration, rendering this payment method currently inactive.
* To activate it, include the metadata in the business manager for 'CKO [5] APM Settings' custom preference.
* Ticket no. CHECBLD-149
*/
/*
boleto: {
countries: ['BR'],
currencies: ['BRL', 'USD'],
enabled: currentSite.getCurrent().getCustomPreferenceValue(constants.CKO_BOLETO_ENABLED),
},
*/
bancontact: {
countries: ['BE'],
currencies: ['EUR'],
enabled: currentSite.getCurrent().getCustomPreferenceValue(constants.CKO_BANCONTACT_ENABLED),
},
/* Benefitpay has been temporarily removed from the business manager configuration, rendering this payment method currently inactive.
* To activate it, include the metadata in the business manager for 'CKO [5] APM Settings' custom preference.
* Ticket no. CHECBLD-149
*/
/*
benefitpay: {
countries: ['BH'],
currencies: ['BHD'],
enabled: currentSite.getCurrent().getCustomPreferenceValue(constants.CKO_BENEFIT_ENABLED),
},
*/
giropay: {
countries: ['DE'],
currencies: ['EUR'],
Expand Down Expand Up @@ -64,11 +76,17 @@ var ckoApmFilterConfig = {
currencies: ['EUR'],
enabled: currentSite.getCurrent().getCustomPreferenceValue(constants.CKO_MULTIBANCO_ENABLED),
},
/* Poli has been temporarily removed from the business manager configuration, rendering this payment method currently inactive.
* To activate it, include the metadata in the business manager for 'CKO [5] APM Settings' custom preference.
* Ticket no. CHECBLD-149
*/
/*
poli: {
countries: ['AU', 'NZ'],
currencies: ['AUD', 'NZD'],
enabled: currentSite.getCurrent().getCustomPreferenceValue(constants.CKO_POLI_ENABLED),
},
*/
sepa: {
countries: ['AT', 'BE', 'CY', 'DE', 'EE', 'ES', 'FI', 'FR', 'GR', 'IE', 'IT', 'LT', 'LU', 'LV', 'MT', 'NL', 'PT', 'SI', 'SK', 'AD', 'BG', 'CH', 'CZ', 'DK', 'GB', 'HR', 'HU', 'IS', 'LI', 'MC', 'NO', 'PL', 'RO', 'SM', 'SE', 'VA'],
currencies: ['EUR'],
Expand All @@ -84,21 +102,33 @@ var ckoApmFilterConfig = {
currencies: ['EUR', 'DKK', 'GBP', 'NOK', 'SEK'],
enabled: currentSite.getCurrent().getCustomPreferenceValue(constants.CKO_KLARNA_ENABLED),
},
/* Alipay has been temporarily removed from the business manager configuration, rendering this payment method currently inactive.
* To activate it, include the metadata in the business manager for 'CKO [5] APM Settings' custom preference.
* Ticket no. CHECBLD-149
*/
/*
alipay: {
countries: ['CN', 'US'],
currencies: ['USD', 'CNY'],
enabled: currentSite.getCurrent().getCustomPreferenceValue(constants.CKO_ALIPAY_ENABLED),
},
*/
paypal: {
countries: ['*'],
currencies: ['AUD', 'BRL', 'CAD', 'CZK', 'DKK', 'EUR', 'HKD', 'HUF', 'INR', 'ILS', 'JPY', 'MYR', 'MXN', 'TWD', 'NZD', 'NOK', 'PHP', 'PLN', 'GBP', 'RUB', 'SGD', 'SEK', 'CHF', 'THB', 'USD'],
enabled: currentSite.getCurrent().getCustomPreferenceValue(constants.CKO_PAYPAL_ENABLED),
},
/* OXXO has been temporarily removed from the business manager configuration, rendering this payment method currently inactive.
* To activate it, include the metadata in the business manager for 'CKO [5] APM Settings' custom preference.
* Ticket no. CHECBLD-149
*/
/*
oxxo: {
countries: ['MX'],
currencies: ['MXN'],
enabled: currentSite.getCurrent().getCustomPreferenceValue(constants.CKO_OXXO_ENABLED),
},
*/
};

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ exports.authorizeOrderPayment = function(order, event) {
};

exports.getRequest = function(basket, req) {
var currentLocale = ckoHelper.getSiteCurrentCountryCode();
if(currentLocale === 'SA') {
req.supportedNetworks.push('mada');
}
session.custom.applepaysession = 'yes'; // eslint-disable-line
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,6 @@
right: 5%;
}

.invalid-card {
top: 60% !important;
}

.cartes-bancaires-wrapper {
border: 2px solid transparent;
border-radius: 4px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,6 @@
right: 5%;
}

.invalid-card {
top: 30%;
}

.cartes-bancaires-wrapper {
border: 2px solid transparent;
border-radius: 4px;
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading