-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AD-334 Add Apple Pay Express Button with Frontend Logic and API Calls…
… to CMS Components on PDP and Cart Pages - Spartacus AD-336 Add Google Pay Express Button with Frontend Logic and API Calls to CMS Components on PDP and Cart Pages - Spartacus Adyen Express configuration
- Loading branch information
Showing
8 changed files
with
319 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
127 changes: 127 additions & 0 deletions
127
adyenv6core/src/com/adyen/v6/dto/ExpressCheckoutConfigDTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
package com.adyen.v6.dto; | ||
|
||
import com.adyen.model.checkout.Amount; | ||
import com.adyen.model.checkout.CreateCheckoutSessionResponse; | ||
|
||
import java.math.BigDecimal; | ||
|
||
public class ExpressCheckoutConfigDTO { | ||
private String applePayMerchantId; | ||
private String applePayMerchantName; | ||
private String payPalIntent; | ||
private String shopperLocale; | ||
private String environmentMode; | ||
private String clientKey; | ||
private String merchantAccount; | ||
//TODO: Remove in 13.3 | ||
private CreateCheckoutSessionResponse sessionData; | ||
private Amount amount; | ||
private BigDecimal amountDecimal; | ||
private String dfUrl; | ||
private String checkoutShopperHost; | ||
private ExpressPaymentConfigDto expressPaymentConfig; | ||
|
||
public String getApplePayMerchantId() { | ||
return applePayMerchantId; | ||
} | ||
|
||
public void setApplePayMerchantId(String applePayMerchantId) { | ||
this.applePayMerchantId = applePayMerchantId; | ||
} | ||
|
||
public String getApplePayMerchantName() { | ||
return applePayMerchantName; | ||
} | ||
|
||
public void setApplePayMerchantName(String applePayMerchantName) { | ||
this.applePayMerchantName = applePayMerchantName; | ||
} | ||
|
||
public String getPayPalIntent() { | ||
return payPalIntent; | ||
} | ||
|
||
public void setPayPalIntent(String payPalIntent) { | ||
this.payPalIntent = payPalIntent; | ||
} | ||
|
||
public String getShopperLocale() { | ||
return shopperLocale; | ||
} | ||
|
||
public void setShopperLocale(String shopperLocale) { | ||
this.shopperLocale = shopperLocale; | ||
} | ||
|
||
public String getEnvironmentMode() { | ||
return environmentMode; | ||
} | ||
|
||
public void setEnvironmentMode(String environmentMode) { | ||
this.environmentMode = environmentMode; | ||
} | ||
|
||
public String getClientKey() { | ||
return clientKey; | ||
} | ||
|
||
public void setClientKey(String clientKey) { | ||
this.clientKey = clientKey; | ||
} | ||
|
||
public String getMerchantAccount() { | ||
return merchantAccount; | ||
} | ||
|
||
public void setMerchantAccount(String merchantAccount) { | ||
this.merchantAccount = merchantAccount; | ||
} | ||
|
||
public CreateCheckoutSessionResponse getSessionData() { | ||
return sessionData; | ||
} | ||
|
||
public void setSessionData(CreateCheckoutSessionResponse sessionData) { | ||
this.sessionData = sessionData; | ||
} | ||
|
||
public Amount getAmount() { | ||
return amount; | ||
} | ||
|
||
public void setAmount(Amount amount) { | ||
this.amount = amount; | ||
} | ||
|
||
public BigDecimal getAmountDecimal() { | ||
return amountDecimal; | ||
} | ||
|
||
public void setAmountDecimal(BigDecimal amountDecimal) { | ||
this.amountDecimal = amountDecimal; | ||
} | ||
|
||
public String getDfUrl() { | ||
return dfUrl; | ||
} | ||
|
||
public void setDfUrl(String dfUrl) { | ||
this.dfUrl = dfUrl; | ||
} | ||
|
||
public String getCheckoutShopperHost() { | ||
return checkoutShopperHost; | ||
} | ||
|
||
public void setCheckoutShopperHost(String checkoutShopperHost) { | ||
this.checkoutShopperHost = checkoutShopperHost; | ||
} | ||
|
||
public ExpressPaymentConfigDto getExpressPaymentConfig() { | ||
return expressPaymentConfig; | ||
} | ||
|
||
public void setExpressPaymentConfig(ExpressPaymentConfigDto expressPaymentConfig) { | ||
this.expressPaymentConfig = expressPaymentConfig; | ||
} | ||
} |
83 changes: 83 additions & 0 deletions
83
adyenv6core/src/com/adyen/v6/dto/ExpressCheckoutConfigDTOBuilder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
package com.adyen.v6.dto; | ||
|
||
import com.adyen.model.checkout.Amount; | ||
import com.adyen.model.checkout.CreateCheckoutSessionResponse; | ||
|
||
import java.math.BigDecimal; | ||
|
||
public class ExpressCheckoutConfigDTOBuilder { | ||
private final ExpressCheckoutConfigDTO expressCheckoutConfigDTO; | ||
|
||
public ExpressCheckoutConfigDTOBuilder() { | ||
this.expressCheckoutConfigDTO = new ExpressCheckoutConfigDTO(); | ||
} | ||
|
||
public ExpressCheckoutConfigDTOBuilder setApplePayMerchantId(String applePayMerchantId) { | ||
expressCheckoutConfigDTO.setApplePayMerchantId(applePayMerchantId); | ||
return this; | ||
} | ||
|
||
public ExpressCheckoutConfigDTOBuilder setApplePayMerchantName(String applePayMerchantName) { | ||
expressCheckoutConfigDTO.setApplePayMerchantName(applePayMerchantName); | ||
return this; | ||
} | ||
|
||
public ExpressCheckoutConfigDTOBuilder setPayPalIntent(String payPalIntent) { | ||
expressCheckoutConfigDTO.setPayPalIntent(payPalIntent); | ||
return this; | ||
} | ||
|
||
public ExpressCheckoutConfigDTOBuilder setShopperLocale(String shopperLocale) { | ||
expressCheckoutConfigDTO.setShopperLocale(shopperLocale); | ||
return this; | ||
} | ||
|
||
public ExpressCheckoutConfigDTOBuilder setEnvironmentMode(String environmentMode) { | ||
expressCheckoutConfigDTO.setEnvironmentMode(environmentMode); | ||
return this; | ||
} | ||
|
||
public ExpressCheckoutConfigDTOBuilder setClientKey(String clientKey) { | ||
expressCheckoutConfigDTO.setClientKey(clientKey); | ||
return this; | ||
} | ||
|
||
public ExpressCheckoutConfigDTOBuilder setMerchantAccount(String merchantAccount) { | ||
expressCheckoutConfigDTO.setMerchantAccount(merchantAccount); | ||
return this; | ||
} | ||
|
||
public ExpressCheckoutConfigDTOBuilder setSessionData(CreateCheckoutSessionResponse sessionData) { | ||
expressCheckoutConfigDTO.setSessionData(sessionData); | ||
return this; | ||
} | ||
|
||
public ExpressCheckoutConfigDTOBuilder setAmount(Amount amount) { | ||
expressCheckoutConfigDTO.setAmount(amount); | ||
return this; | ||
} | ||
|
||
public ExpressCheckoutConfigDTOBuilder setAmountDecimal(BigDecimal amountDecimal) { | ||
expressCheckoutConfigDTO.setAmountDecimal(amountDecimal); | ||
return this; | ||
} | ||
|
||
public ExpressCheckoutConfigDTOBuilder setDfUrl(String dfUrl) { | ||
expressCheckoutConfigDTO.setDfUrl(dfUrl); | ||
return this; | ||
} | ||
|
||
public ExpressCheckoutConfigDTOBuilder setCheckoutShopperHost(String checkoutShopperHost) { | ||
expressCheckoutConfigDTO.setCheckoutShopperHost(checkoutShopperHost); | ||
return this; | ||
} | ||
|
||
public ExpressCheckoutConfigDTOBuilder setExpressPaymentConfigDto(ExpressPaymentConfigDto expressPaymentConfigDto) { | ||
expressCheckoutConfigDTO.setExpressPaymentConfig(expressPaymentConfigDto); | ||
return this; | ||
} | ||
|
||
public ExpressCheckoutConfigDTO build() { | ||
return expressCheckoutConfigDTO; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.