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/v12.0.0 alpha #376

Merged
merged 87 commits into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
ec4403d
[AD-156] Upgrade Java Lib in AdyenV6 plugin to the newest version + d…
kpieloch Mar 18, 2024
f0156f4
[AD-156] Upgrade Java Lib in AdyenV6 plugin to the newest version + d…
kpieloch Mar 18, 2024
ae11acf
[AD-156] Upgrade Java Lib in AdyenV6 plugin to the newest version + d…
kpieloch Mar 18, 2024
2da111d
[AD-156] Upgrade Java Lib in AdyenV6 plugin to the newest version + d…
kpieloch Mar 21, 2024
6ba8ff6
AD-130 RestController for delivery address that supports CRUD operati…
Lukasz756 Dec 7, 2023
9299655
[AD-134] Extension setup
kpieloch Dec 11, 2023
9bdf659
[AD-134] Build config eject
kpieloch Dec 11, 2023
f732681
[AD-134] Messages clean
kpieloch Dec 11, 2023
a90b754
[AD-134] Messages clean
kpieloch Dec 11, 2023
2fd259a
[AD-151] Select delivery address controller
kpieloch Dec 12, 2023
0d85719
AD-136 - GET Endpoint delivery modes
akaflowskireply Jan 16, 2024
acc43d2
Revert "AD-136 - GET Endpoint delivery modes"
akaflowskireply Jan 16, 2024
7eaf956
AD-136 - GET Endpoint delivery modes
akaflowskireply Jan 16, 2024
43d337c
AD-149&AD-148 Develop Endpoint for Saving Selected Delivery Method, C…
Lukasz756 Jan 18, 2024
ce67976
AD-149&AD-148 Requested changes.
Lukasz756 Jan 23, 2024
6045f06
AD-149&AD-148 Requested changes.
Lukasz756 Jan 23, 2024
72462ff
AD-178 Add AdyenPaymentMethodsController.
Lukasz756 Jan 23, 2024
49f2eb1
AD-149 Requested changes.
Lukasz756 Jan 23, 2024
f14ea04
AD-149 Requested changes.
Lukasz756 Jan 23, 2024
0506909
AD-149 Deleted unused imports, bean properties and methods.
Lukasz756 Jan 23, 2024
fd4cf7e
AD-178 Controller for payment methods.
Lukasz756 Jan 24, 2024
a9bead1
AD-131 Implement First Step of Checkout Process in ReactJS App
pjaneta Jan 24, 2024
486a61e
AD-149 Delete unused methods.
Lukasz756 Jan 24, 2024
5d92a3b
AD-149 Delete unused methods.
Lukasz756 Jan 24, 2024
9e61f5a
AD-178 Fixed DefaultAdyenCheckoutFacade so that it uses Errors class …
Lukasz756 Jan 25, 2024
00aaafe
AD-178 Delete unused methods and imports.
Lukasz756 Jan 25, 2024
9d4a97d
AD-181 Develop Configuration Endpoint for SPA Checkout Based on User …
pjaneta Jan 26, 2024
34a3691
Add method to interface
pjaneta Jan 26, 2024
af09da6
AD-149 Changed URL addresses for AdyenDeliveryMethodsController.
Lukasz756 Jan 26, 2024
c703184
Merge pull request #335 from Adyen/feature/AD-131
pjaneta Jan 29, 2024
2e8de46
Merge pull request #337 from Adyen/feature/AD-181
pjaneta Jan 29, 2024
a02ac31
AD-178 TestController fixed.
Lukasz756 Jan 29, 2024
c5a2b04
Update App.tsx
pjaneta Jan 31, 2024
919f9bd
Update shippingAddressService.ts
pjaneta Jan 31, 2024
1bac1c7
Update project.properties.template
pjaneta Jan 31, 2024
728c79b
AD-132 Implement Second Step of Checkout Process in ReactJS App
pjaneta Feb 1, 2024
8106576
AD-177 Changes required for ybc2acceleratorStorefront working. Added …
Lukasz756 Feb 1, 2024
0a12496
AD-193 Display promotions from cart data on cart summary
pjaneta Feb 16, 2024
fd3c04e
AD-177 Deleted comment.
Lukasz756 Feb 5, 2024
85cc4eb
AD-132 Implement Second Step of Checkout Process in ReactJS App - fixes
pjaneta Feb 7, 2024
81f2d52
Revert user service removal
pjaneta Feb 8, 2024
93a6628
AD-179 Added AdyenTranslationsController with method for retrieving t…
Lukasz756 Feb 8, 2024
903a754
AD-179 Code reformatted.
Lukasz756 Feb 8, 2024
5ded69b
AD-150 Implement Third Step of Checkout Process in Headless Frontend …
pjaneta Feb 15, 2024
ac8d9fa
AD-193 Display promotions from cart data on cart summary
pjaneta Feb 16, 2024
a093f18
Removed unused imports
pjaneta Feb 19, 2024
efc19d1
AD-201 Implement Stored Bank Card Support in Checkout Process
pjaneta Feb 20, 2024
b309b10
AD-200 Added testId props for React elements. Added names of ids.
Lukasz756 Feb 20, 2024
9b275a7
AD-203 Controller for place order.
Lukasz756 Feb 23, 2024
87c6186
AD-204 Create endpoint or Integrate into current endpoint Payment Res…
pjaneta Feb 26, 2024
77bad5b
AD-199 Implement Dynamic Translation of Frontend Messages via Transla…
pjaneta Feb 28, 2024
fdfb0a5
AD-203 Controller for place order. Deleted /select-payment-method end…
Lukasz756 Feb 28, 2024
afa663a
Shipping method selection fix
pjaneta Feb 29, 2024
28a4921
AD-203 Requested changes, refactoring.
Lukasz756 Feb 29, 2024
11d22de
AD-203 Requested changes, refactoring.
Lukasz756 Mar 1, 2024
447583e
AD-203 AdyenUtil.
Lukasz756 Mar 4, 2024
3c75108
AD-212 Added AdyenPaymentStatusController.
Lukasz756 Mar 7, 2024
523fca1
AD-210 PlaceOrder method CP.
Lukasz756 Mar 5, 2024
faf8ad9
AD-210 PlaceOrder frontend CP.
Lukasz756 Mar 5, 2024
d32737b
AD-210 Place order.
Lukasz756 Mar 7, 2024
adabf61
AD-210 Removed imports.
Lukasz756 Mar 7, 2024
804f0db
AD-202 Integrate 3DS Payment Support and Redirection in Checkout Process
pjaneta Mar 7, 2024
91f3908
AD-202 Integrate 3DS Payment Support and Redirection in Checkout Proc…
pjaneta Mar 8, 2024
89ac505
AD-202 Integrate 3DS Payment Support and Redirection in Checkout Proc…
pjaneta Mar 8, 2024
488d4ab
AD-215 Implement Redirection to Previous Checkout Step for Incomplete…
pjaneta Mar 11, 2024
a9136ea
Merge pull request #359 from Adyen/feature/AD-202
pjaneta Mar 11, 2024
548e98d
AD-212 AdyenPaymentStatusController, AdyenOrderFacade with its implem…
Lukasz756 Mar 12, 2024
dc05599
AD-212 Code reformat.
Lukasz756 Mar 12, 2024
9fd6970
AD-216 Error handling for payment method
pjaneta Mar 13, 2024
e54dcb7
AD-212 Requested changes.
Lukasz756 Mar 14, 2024
ea5d04e
AD-217 Develop Checkout Group Bean for ReactJS Checkout with Storefro…
pjaneta Mar 14, 2024
cf1807e
AD-212 Requested changes.
Lukasz756 Mar 14, 2024
23549ea
AD-212 Requested changes.
Lukasz756 Mar 14, 2024
fb13cd0
Merge pull request #363 from Adyen/feature/AD-217
pjaneta Mar 15, 2024
c95ffb7
AD-218 Address book with Billing Address form integration.
Lukasz756 Mar 18, 2024
46f256b
AD-211 Develop ReactJS Order Confirmation Page with Payment Status Up…
pjaneta Mar 20, 2024
9d16373
AD-218 Requested changes.
Lukasz756 Mar 20, 2024
13eb86f
Merge pull request #365 from Adyen/feature/AD-218
Lukasz756 Mar 20, 2024
3ced6ad
AD-218 Bracket fix.
Lukasz756 Mar 22, 2024
0e1950d
AD-218 Changed if checks in DefaultAdyenCheckoutFacade.
Lukasz756 Mar 26, 2024
803154e
Merge pull request #373 from Adyen/feature/AD-218-136CPv6
Lukasz756 Mar 26, 2024
50c2640
AD-229 Split adyenv6b2ccheckoutaddonv2
pjaneta Mar 22, 2024
072078e
Merge branch 'release/AD-136_cherry_v6' into release/v12.0.0_alpha
kpieloch Mar 26, 2024
b496e7d
[AD-226] Fixes after merge
kpieloch Mar 27, 2024
6144d17
Merge remote-tracking branch 'origin/feature/AD-229_CPv6' into releas…
kpieloch Mar 27, 2024
aa7cf3b
[AD-226] Fixes after merge
kpieloch Mar 28, 2024
9f5ebec
[AD-226] Fixes after merge
kpieloch Mar 28, 2024
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
31 changes: 30 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,51 @@ SAP Commerce (Hybris) version 2105 or later

### 2. Add the Adyen extensions to the config/localextensions.xml file

Required for the checkout:
#### Checkout

Required for accelerator checkout:
```
<extension dir="${HYBRIS_BIN_DIR}/custom/adyen-hybris/adyenv6core"/>
<extension dir="${HYBRIS_BIN_DIR}/custom/adyen-hybris/adyenv6b2ccheckoutaddon"/>
<extension dir="${HYBRIS_BIN_DIR}/custom/adyen-hybris/adyenv6backoffice"/>
```

Required for headless checkout:
```
<extension dir="${HYBRIS_BIN_DIR}/custom/adyen-hybris/adyenv6core"/>
<extension dir="${HYBRIS_BIN_DIR}/custom/adyen-hybris/adyencheckoutaddonapi"/>
<extension dir="${HYBRIS_BIN_DIR}/custom/adyen-hybris/adyenv6backoffice"/>
```

Required for headless checkout api with example React SPA checkout:
```
<extension dir="${HYBRIS_BIN_DIR}/custom/adyen-hybris/adyenv6core"/>
<extension dir="${HYBRIS_BIN_DIR}/custom/adyen-hybris/adyencheckoutaddonapi"/>
<extension dir="${HYBRIS_BIN_DIR}/custom/adyen-hybris/adyencheckoutaddonspa"/>
<extension dir="${HYBRIS_BIN_DIR}/custom/adyen-hybris/adyenv6backoffice"/>
```

#### Notifications

Required for the notifications:
```
<extension dir="${HYBRIS_BIN_DIR}/custom/adyen-hybris/adyenv6notification"/>
```

Required for the event driven notifications:
```
<extension dir="${HYBRIS_BIN_DIR}/custom/adyen-hybris/adyenv6notificationv2"/>
```

#### Order management

Additionally, required when using yacceleratorordermanagement (b2c_acc_oms recipe for 6.x and b2c_b2b_acc_oms recipe for 1905) :
```
<extension dir="${HYBRIS_BIN_DIR}/custom/adyen-hybris/adyenv6ordermanagement"/>
```

#### Fulfilment

Additionally, required when using yacceleratorfulfilment (b2c_acc recipe for 6.x and b2c_acc_plus for 1905):
```
<extension dir="${HYBRIS_BIN_DIR}/custom/adyen-hybris/adyenv6fulfilmentprocess"/>
Expand Down
39 changes: 39 additions & 0 deletions adyencheckoutaddonapi/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
eclipsebin/
.settings/
.externalToolBuilders/
.springBeans
.idea/
*/platformhome.properties
*/.pmd
**.iml

##################
# Custom Ignores #
##################

*/.project
.settings
.classpath
*.class
*/bin/*
*/target/*

########################
# Java generated files #
########################
*.class
*.war
*.ear

##############################
# hybris Ant generated files #
##############################
gensrc/**
*/build.xml
extensioninfo.xsd
hmc.xsd
platformhome.properties
*-testclasses.xml
beans.xsd
items.xsd
classes/**
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved.
*/
package com.adyen.commerce.constants;

/**
* Global class for all Adyenv6b2ccheckoutaddonv2 web constants. You can add global constants for your extension into this class.
*/
public final class AdyencheckoutaddonapiWebConstants
{
private AdyencheckoutaddonapiWebConstants()
{
//empty to avoid instantiating this constant class
}

public static final String ADYEN_CHECKOUT_API_PREFIX = "/api/checkout";
public static final String ADYEN_CHECKOUT_PAGE_PREFIX = "/checkout/multi";
public static final String ADYEN_CHECKOUT_ORDER_CONFIRMATION = "/adyen/order-confirmation";
public static final String AUTHORISE_3D_SECURE_PAYMENT_URL = "/authorise-3d-adyen-response";

public static final String CART_PREFIX = "/cart";

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
package com.adyen.commerce.controllers.api;

import com.adyen.model.checkout.PaymentCompletionDetails;
import com.adyen.model.checkout.PaymentDetailsRequest;
import com.adyen.model.checkout.PaymentDetailsResponse;
import com.adyen.v6.exceptions.AdyenNonAuthorizedPaymentException;
import com.adyen.v6.facades.AdyenCheckoutFacade;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import de.hybris.platform.acceleratorstorefrontcommons.annotations.RequireHardLogIn;
import de.hybris.platform.commercefacades.order.data.OrderData;
import de.hybris.platform.order.InvalidCartException;
import de.hybris.platform.order.exceptions.CalculationException;
import org.apache.commons.lang3.exception.ExceptionUtils;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.lang.reflect.Type;
import java.util.Collections;
import java.util.Map;

import static com.adyen.commerce.constants.AdyencheckoutaddonapiWebConstants.*;
import static com.adyen.commerce.util.ErrorMessageUtil.getErrorMessageByRefusalReason;
import static com.adyen.model.checkout.PaymentDetailsResponse.*;
import static com.adyen.model.checkout.PaymentDetailsResponse.ResultCodeEnum.REFUSED;
import static com.adyen.v6.facades.impl.DefaultAdyenCheckoutFacade.DETAILS;
import static de.hybris.platform.acceleratorstorefrontcommons.controllers.AbstractController.REDIRECT_PREFIX;

@Controller
@RequestMapping(value = ADYEN_CHECKOUT_API_PREFIX)
public class Adyen3DSResponseController {
private static final Logger LOGGER = Logger.getLogger(Adyen3DSResponseController.class);
private static final String REDIRECT_RESULT = "redirectResult";
private static final String PAYLOAD = "payload";
private static final String NON_AUTHORIZED_ERROR = "Handling AdyenNonAuthorizedPaymentException. Checking PaymentResponse.";
private static final String CHECKOUT_ERROR_AUTHORIZATION_FAILED = "checkout.error.authorization.failed";
private static final String REDIRECTING_TO_CART_PAGE = "Redirecting to cart page...";
private static final String ORDER_CONFIRMATION_URL = ADYEN_CHECKOUT_PAGE_PREFIX + ADYEN_CHECKOUT_ORDER_CONFIRMATION;


@Resource(name = "adyenCheckoutFacade")
private AdyenCheckoutFacade adyenCheckoutFacade;

@GetMapping(value = AUTHORISE_3D_SECURE_PAYMENT_URL)
@RequireHardLogIn
public String authorise3DSGetPayment(final HttpServletRequest request) {
String redirectResult = request.getParameter(REDIRECT_RESULT);
PaymentDetailsRequest paymentDetailsRequest = new PaymentDetailsRequest();
if (redirectResult != null && !redirectResult.isEmpty()) {
PaymentCompletionDetails details = new PaymentCompletionDetails();
details.setRedirectResult(redirectResult);
paymentDetailsRequest.details(details);
} else {
String payload = request.getParameter(PAYLOAD);
if (payload != null && !payload.isEmpty()) {
PaymentCompletionDetails details = new PaymentCompletionDetails();
details.setPayload(payload);
paymentDetailsRequest.details(details);
}
}
return authorise3DSPayment(paymentDetailsRequest);
}


@PostMapping(value = AUTHORISE_3D_SECURE_PAYMENT_URL)
@RequireHardLogIn
public String authorise3DSPostPayment(@RequestBody PaymentDetailsRequest detailsRequest) {
return authorise3DSPayment(detailsRequest);
}

public String authorise3DSPayment(final PaymentDetailsRequest details) {
LOGGER.info("3DS authorization");
try {
OrderData orderData = adyenCheckoutFacade.handle3DSResponse(details);
LOGGER.debug("Redirecting to confirmation");

return REDIRECT_PREFIX + ORDER_CONFIRMATION_URL + '/' + orderData.getCode();

} catch (AdyenNonAuthorizedPaymentException e) {
LOGGER.debug(NON_AUTHORIZED_ERROR);
String errorMessage = CHECKOUT_ERROR_AUTHORIZATION_FAILED;
PaymentDetailsResponse response = e.getPaymentsDetailsResponse();
if (response != null) {
if (REFUSED.equals(response.getResultCode())) {
LOGGER.info("PaymentResponse " + response.getPspReference() + " is REFUSED: " + response);
errorMessage = getErrorMessageByRefusalReason(response.getRefusalReason());
}
if (ResultCodeEnum.ERROR.equals(response.getResultCode())) {
LOGGER.error("Payment " + response.getPspReference() + " result is error, reason: "
+ response.getRefusalReason());
}
}
//implement in 3ds error handling return redirectToSelectPaymentMethodWithError(errorMessage);
} catch (CalculationException | InvalidCartException e) {
LOGGER.warn(e.getMessage(), e);
} catch (Exception e) {
LOGGER.error(ExceptionUtils.getStackTrace(e));
}

LOGGER.warn(REDIRECTING_TO_CART_PAGE);
return REDIRECT_PREFIX + CART_PREFIX;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
package com.adyen.commerce.controllers.api;

import de.hybris.platform.acceleratorstorefrontcommons.annotations.RequireHardLogIn;
import de.hybris.platform.acceleratorstorefrontcommons.forms.AddressForm;
import de.hybris.platform.acceleratorstorefrontcommons.forms.validation.AddressValidator;
import de.hybris.platform.acceleratorstorefrontcommons.util.AddressDataUtil;
import de.hybris.platform.commercefacades.address.AddressVerificationFacade;
import de.hybris.platform.commercefacades.order.CheckoutFacade;
import de.hybris.platform.commercefacades.user.UserFacade;
import de.hybris.platform.commercefacades.user.data.AddressData;
import de.hybris.platform.commerceservices.address.AddressVerificationDecision;
import de.hybris.platform.commerceservices.strategies.CheckoutCustomerStrategy;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BeanPropertyBindingResult;
import org.springframework.validation.Errors;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;
import java.util.Objects;

@Controller
@RequestMapping(value = "/api/account")
public class AdyenAddressController {

@Autowired
private UserFacade userFacade;

@Autowired
private AddressVerificationFacade addressVerificationFacade;

@Resource(name = "addressValidator")
private AddressValidator addressValidator;

@Resource(name = "addressDataUtil")
private AddressDataUtil addressDataUtil;

@Autowired
private CheckoutFacade checkoutFacade;

@Resource(name = "checkoutCustomerStrategy")
private CheckoutCustomerStrategy checkoutCustomerStrategy;

@RequireHardLogIn
@GetMapping(value = "/delivery-address", produces = "application/json")
public ResponseEntity<List<AddressData>> getAllDeliveryAddresses() {
List<AddressData> addressDataList = userFacade.getAddressBook();

return ResponseEntity.status(HttpStatus.OK).body(addressDataList);
}

@RequireHardLogIn
@PostMapping(value = "/delivery-address")
public ResponseEntity<AddressData> addDeliveryAddress(@RequestBody AddressForm addressForm) {
final Errors errors = new BeanPropertyBindingResult(addressForm, "address");
addressValidator.validate(addressForm, errors);
if (errors.hasErrors()) {
return ResponseEntity.status(HttpStatus.BAD_REQUEST).build();
}

AddressData addressData = addressDataUtil.convertToAddressData(addressForm);

processAddressVisibilityAndDefault(addressForm, addressData);

if (addressVerificationFacade.verifyAddressData(addressData).getDecision().equals(AddressVerificationDecision.ACCEPT)) {
addressData.setVisibleInAddressBook(true);
userFacade.addAddress(addressData);

final AddressData previousSelectedAddress = checkoutFacade.getCheckoutCart().getDeliveryAddress();
// Set the new address as the selected checkout delivery address
checkoutFacade.setDeliveryAddress(addressData);
if (previousSelectedAddress != null && !previousSelectedAddress.isVisibleInAddressBook()) { // temporary address should be removed
userFacade.removeAddress(previousSelectedAddress);
}

// Set the new address as the selected checkout delivery address
checkoutFacade.setDeliveryAddress(addressData);

return ResponseEntity.status(HttpStatus.CREATED).build();
} else {
return ResponseEntity.status(HttpStatus.BAD_REQUEST).build();
}
}

@RequireHardLogIn
@PutMapping(value = "/delivery-address")
public ResponseEntity<AddressData> updateDeliveryAddress(@RequestBody AddressForm addressForm) {
final Errors errors = new BeanPropertyBindingResult(addressForm, "address");
addressValidator.validate(addressForm, errors);
if (errors.hasErrors()) {
return ResponseEntity.status(HttpStatus.BAD_REQUEST).build();
}

AddressData addressData = addressDataUtil.convertToAddressData(addressForm);


if (addressVerificationFacade.verifyAddressData(addressData).getDecision().equals(AddressVerificationDecision.ACCEPT)) {
if (userFacade.getAddressBook().stream().anyMatch(ad -> Objects.equals(ad.getId(), addressData.getId()))) {
addressData.setVisibleInAddressBook(true);
userFacade.editAddress(addressData);

return ResponseEntity.status(HttpStatus.OK).build();
} else {
return ResponseEntity.status(HttpStatus.BAD_REQUEST).build();
}
} else {
return ResponseEntity.status(HttpStatus.BAD_REQUEST).build();
}
}

@RequireHardLogIn
@DeleteMapping(value = "/delivery-address/{addressId}")
public ResponseEntity<HttpStatus> removeDeliveryAddress(@PathVariable String addressId) {
if (userFacade.getAddressBook().stream().anyMatch(ad -> Objects.equals(ad.getId(), addressId))) {
AddressData addressData = userFacade.getAddressForCode(addressId);

userFacade.removeAddress(addressData);
addressData.setVisibleInAddressBook(false);

return ResponseEntity.status(HttpStatus.NO_CONTENT).build();
} else {
return ResponseEntity.status(HttpStatus.BAD_REQUEST).build();
}
}

private void processAddressVisibilityAndDefault(final AddressForm addressForm, final AddressData newAddress) {
if (addressForm.getSaveInAddressBook() != null) {
newAddress.setVisibleInAddressBook(addressForm.getSaveInAddressBook().booleanValue());
if (addressForm.getSaveInAddressBook().booleanValue() && CollectionUtils.isEmpty(userFacade.getAddressBook())) {
newAddress.setDefaultAddress(true);
}
} else if (checkoutCustomerStrategy.isAnonymousCheckout()) {
newAddress.setDefaultAddress(true);
newAddress.setVisibleInAddressBook(true);
}
}
}
Loading
Loading