Skip to content

Commit

Permalink
Merge pull request #227 from Adyen/develop
Browse files Browse the repository at this point in the history
Release - version 9.0.0
  • Loading branch information
martinsrenato authored Dec 10, 2020
2 parents 45a8b30 + e5ae92a commit ff84914
Show file tree
Hide file tree
Showing 24 changed files with 76 additions and 259 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,13 +154,6 @@ public String enterStep(final Model model, final RedirectAttributes redirectAttr
model.addAttribute("metaRobots", "noindex,nofollow");
setCheckoutStepLinksForModel(model, getCheckoutStep());

try {
model.addAttribute(MODEL_ORIGIN_KEY, adyenCheckoutFacade.getOriginKey(httpServletRequest));
} catch (IOException e) {
LOGGER.error("Exception occurred during getting the origin key" + ExceptionUtils.getStackTrace(e));
} catch (ApiException e) {
LOGGER.error("Exception occurred during getting origin key" + ExceptionUtils.getStackTrace(e));
}
adyenCheckoutFacade.initializeSummaryData(model);

return AdyenControllerConstants.Views.Pages.MultiStepCheckout.CheckoutSummaryPage;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@
*/
package com.adyen.v6.controllers.pages.checkout.steps;

import com.adyen.model.checkout.PaymentsResponse;
import com.adyen.service.exception.ApiException;
import com.adyen.v6.constants.AdyenControllerConstants;
import com.adyen.v6.exceptions.AdyenNonAuthorizedPaymentException;
import com.adyen.v6.facades.AdyenCheckoutFacade;
import com.adyen.v6.forms.AddressForm;
import com.adyen.v6.forms.AdyenPaymentForm;
Expand All @@ -34,15 +31,11 @@
import de.hybris.platform.cms2.exceptions.CMSItemNotFoundException;
import de.hybris.platform.cms2.model.pages.ContentPageModel;
import de.hybris.platform.commercefacades.order.data.CartData;
import de.hybris.platform.commercefacades.order.data.OrderData;
import de.hybris.platform.commercefacades.user.UserFacade;
import de.hybris.platform.commercefacades.user.data.AddressData;
import de.hybris.platform.commercefacades.user.data.CountryData;
import de.hybris.platform.commercefacades.user.data.TitleData;
import de.hybris.platform.order.InvalidCartException;
import de.hybris.platform.order.exceptions.CalculationException;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.exception.ExceptionUtils;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
Expand All @@ -57,7 +50,6 @@
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
Expand All @@ -67,7 +59,6 @@
import java.util.List;

import static com.adyen.v6.constants.AdyenControllerConstants.Views.Pages.MultiStepCheckout.BillingAddressformPage;
import static com.adyen.v6.facades.DefaultAdyenCheckoutFacade.MODEL_ORIGIN_KEY;
import static de.hybris.platform.acceleratorstorefrontcommons.constants.WebConstants.BREADCRUMBS_KEY;
import static org.springframework.web.bind.annotation.RequestMethod.GET;
import static org.springframework.web.bind.annotation.RequestMethod.POST;
Expand Down Expand Up @@ -130,14 +121,6 @@ public String enterStep(final Model model, final RedirectAttributes redirectAttr
model.addAttribute("deliveryAddress", cartData.getDeliveryAddress());
model.addAttribute("expiryYears", getExpiryYears());

try {
model.addAttribute(MODEL_ORIGIN_KEY, adyenCheckoutFacade.getOriginKey(httpServletRequest));
} catch (IOException e) {
LOGGER.error("Exception occurred during getting the origin key" + ExceptionUtils.getStackTrace(e));
} catch (ApiException e) {
LOGGER.error("Exception occurred during getting origin key" + ExceptionUtils.getStackTrace(e));
}

if(isSessionCartInvalid())
{
LOGGER.debug("Invalid cart found in session");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
<template:page pageTitle="${pageTitle}" hideHeaderLinks="true">
<jsp:attribute name="pageScripts">
<script type="text/javascript" src="${dfUrl}"></script>
<script type="text/javascript" src="https://${checkoutShopperHost}/checkoutshopper/sdk/3.10.0/adyen.js"></script>
<script type="text/javascript" src="https://${checkoutShopperHost}/checkoutshopper/sdk/3.18.2/adyen.js"></script>
<link rel="stylesheet" href="https://checkoutshopper-live.adyen.com/checkoutshopper/css/chckt-default-v1.css"/>
<link rel="stylesheet" href="https://${checkoutShopperHost}/checkoutshopper/sdk/3.10.0/adyen.css"/>
<link rel="stylesheet" href="https://${checkoutShopperHost}/checkoutshopper/sdk/3.18.2/adyen.css"/>

<script type="text/javascript">
AdyenCheckoutHybris.initiateCheckout("${shopperLocale}", "${environmentMode}", "${originKey}");
AdyenCheckoutHybris.initiateCheckout("${shopperLocale}", "${environmentMode}", "${clientKey}");
<c:choose>
<%-- Configure components --%>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
<template:page pageTitle="${pageTitle}" hideHeaderLinks="true">
<jsp:attribute name="pageScripts">
<script type="text/javascript" src="${dfUrl}"></script>
<script type="text/javascript" src="https://${checkoutShopperHost}/checkoutshopper/sdk/3.10.0/adyen.js"></script>
<script type="text/javascript" src="https://${checkoutShopperHost}/checkoutshopper/sdk/3.18.2/adyen.js"></script>
<link rel="stylesheet" href="https://checkoutshopper-live.adyen.com/checkoutshopper/css/chckt-default-v1.css"/>
<link rel="stylesheet" href="https://${checkoutShopperHost}/checkoutshopper/sdk/3.10.0/adyen.css"/>
<link rel="stylesheet" href="https://${checkoutShopperHost}/checkoutshopper/sdk/3.18.2/adyen.css"/>

<script type="text/javascript">
AdyenCheckoutHybris.initiateCheckout( "${shopperLocale}", "${environmentMode}", "${originKey}" );
AdyenCheckoutHybris.initiateCheckout( "${shopperLocale}", "${environmentMode}", "${clientKey}" );
<c:if test="${not empty allowedCards}">
//Set the allowed cards
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ var AdyenCheckoutHybris = (function () {
},

getCardType: function () {
return $( '#adyen_combo_card_type' ).val();
var cardType =$( '#adyen_combo_card_type' ).val();
if ( cardType === "" || cardType == undefined )
cardType= "credit";
return cardType;
},

isDebitCard: function () {
Expand Down Expand Up @@ -83,16 +86,16 @@ var AdyenCheckoutHybris = (function () {
window.alert('This credit card is not allowed');
return false;
}
if ( (oneClickCard.props.brand == "bcmc") ) {
this.copyOneClickCardDataBCMC( recurringReference )
if ( ['bcmc','maestro'].indexOf(oneClickCard.props.brand) >= 0 ) {
this.copyOneClickCardBrandData( recurringReference, oneClickCard.props.brand )
}
else {
this.copyOneClickCardData( recurringReference, oneClickCard.data.paymentMethod.encryptedSecurityCode );
}
}
$( 'input[name="txvariant"]' ).remove();

if ( ['eps','ideal'].includes(paymentMethod) ) {
if ( ['eps','ideal'].indexOf(paymentMethod) >= 0 ) {
var issuerIdField = document.getElementById('issuerId');
if( issuerIdField.value === "" ) {
window.alert("Please select an issuer");
Expand Down Expand Up @@ -141,9 +144,9 @@ var AdyenCheckoutHybris = (function () {
$( 'input[name="browserInfo"]' ).val( JSON.stringify( this.card.data.browserInfo ) );

},
copyOneClickCardDataBCMC: function ( recurringReference ) {
copyOneClickCardBrandData: function ( recurringReference, brand ) {
$( "#selectedReference" ).val( recurringReference );
$( 'input[name="cardBrand"]' ).val( "bcmc" );
$( 'input[name="cardBrand"]' ).val( brand );
$( 'input[name="browserInfo"]' ).val( JSON.stringify( this.card.data.browserInfo ) );
},

Expand Down Expand Up @@ -194,11 +197,11 @@ var AdyenCheckoutHybris = (function () {
createDfValue: function () {
window.dfDo( "dfValue" );
},
initiateCheckout: function ( locale, environment, originKey ) {
initiateCheckout: function ( locale, environment, clientKey ) {
var configuration = {
locale: locale,// shopper's locale
environment: environment,
originKey: originKey,
clientKey: clientKey,
risk: {
enabled: false
}
Expand All @@ -221,7 +224,7 @@ var AdyenCheckoutHybris = (function () {
hasHolderName: true,
holderNameRequired: true,
enableStoreDetails: showRememberDetails,
groupTypes: allowedCards,
brands: allowedCards,
onBrand: copyCardBrand

});
Expand All @@ -244,8 +247,8 @@ var AdyenCheckoutHybris = (function () {
var sepaOwnerNameField = document.getElementById( 'sepaOwnerName' );
var sepaIbanNumberField = document.getElementById( 'sepaIbanNumber' );

var sepaOwnerName = event.data.paymentMethod[ "sepa.ownerName" ]
var sepaIbanNumber = event.data.paymentMethod[ "sepa.ibanNumber" ]
var sepaOwnerName = event.data.paymentMethod[ "ownerName" ]
var sepaIbanNumber = event.data.paymentMethod[ "iban" ]

sepaOwnerNameField.value = sepaOwnerName;
sepaIbanNumberField.value = sepaIbanNumber;
Expand Down Expand Up @@ -308,7 +311,6 @@ var AdyenCheckoutHybris = (function () {
},
intent: isImmediateCapture ? "capture" : "authorize",
merchantId: (this.checkout.options.environment === 'test') ? null : paypalMerchantId, // Your PayPal Merchant ID. Required for accepting live payments.
showPayButton: false,
onChange: (state, component) => {
if (!state.isValid) {
this.enablePlaceOrder(label);
Expand Down
12 changes: 6 additions & 6 deletions adyenv6b2ccheckoutaddon/project.properties.template
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# -----------------------------------------------------------------------
# [y] hybris Platform
#
# [y] hybris Platform
#
# Copyright (c) 2000-2016 hybris AG
# All rights reserved.
#
# This software is the confidential and proprietary information of hybris
#
# This software is the confidential and proprietary information of hybris
# ("Confidential Information"). You shall not disclose such Confidential
# Information and shall use it only in accordance with the terms of the
# license agreement you entered into with hybris.
#
#
#
# -----------------------------------------------------------------------

# you can put key/value pairs here.
Expand All @@ -23,6 +23,6 @@ adyenv6b2ccheckoutaddon.application-context=adyenv6b2ccheckoutaddon-spring.xml
yacceleratorstorefront.additionalWebSpringConfigs.adyenv6b2ccheckoutaddon=classpath:/adyenv6b2ccheckoutaddon/web/spring/adyenv6b2ccheckoutaddon-web-spring.xml

adyenv6b2ccheckoutaddon.javascript.paths.responsive=/responsive/common/js/adyen.checkout.js;/responsive/common/js/adyen_billingaddress.js
adyenv6b2ccheckoutaddon.css.paths.responsive=/responsive/common/css/adyenv6b2ccheckoutaddon.css;/responsive/common/css/adyen.cardtype.css
adyenv6b2ccheckoutaddon.css.paths.responsive=/responsive/common/css/adyenv6b2ccheckoutaddon.css;

csrf.allowed.url.patterns=/[^/]+(/[^?]*)+(sop-response)$,/[^/]+(/[^?]*)+(merchant_callback)$,/[^/]+(/[^?]*)+(hop-response)$,/[^/]+(/[^?]*)+(adyen-response)$,/adyen(/[^?]*)+$
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ module.name=platform-module
name=adyenv6b2ccheckoutaddon
releasedate=20170509 1903
vendor=adyen
version=8.0.0
version.api=8.0.0
version=9.0.0
version.api=9.0.0
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
<editorArea:section name="hmc.adyen.api">
<editorArea:attribute qualifier="adyenAPIEndpointPrefix"/>
<editorArea:attribute qualifier="adyenAPIKey" editor="com.hybris.cockpitng.editor.defaultpassword"/>
<editorArea:attribute qualifier="adyenClientKey" editor="com.hybris.cockpitng.editor.defaultpassword"/>
</editorArea:section>
<editorArea:section name="hmc.adyen.notifications">
<editorArea:attribute qualifier="adyenNotificationUsername"/>
Expand Down
4 changes: 2 additions & 2 deletions adyenv6backoffice/resources/adyenv6backoffice.build.number
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ module.name=platform-module
name=adyenv6backoffice
releasedate=20170509 1903
vendor=adyen
version=8.0.0
version.api=8.0.0
version=9.0.0
version.api=9.0.0
Binary file not shown.
Loading

0 comments on commit ff84914

Please sign in to comment.