-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #513 from Adyen/feature/AD-337
Feature/ad 337
- Loading branch information
Showing
20 changed files
with
748 additions
and
203 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
...oraddon/web/src/com/adyen/v6/controllers/checkout/AdyenExpressCheckoutControllerBase.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,28 @@ | ||
package com.adyen.v6.controllers.checkout; | ||
|
||
import com.adyen.model.checkout.GooglePayDetails; | ||
import de.hybris.platform.acceleratorservices.urlresolver.SiteBaseUrlResolutionService; | ||
import de.hybris.platform.basecommerce.model.site.BaseSiteModel; | ||
import de.hybris.platform.site.BaseSiteService; | ||
|
||
import static com.adyen.v6.constants.AdyenControllerConstants.CHECKOUT_RESULT_URL; | ||
import static com.adyen.v6.constants.AdyenControllerConstants.SUMMARY_CHECKOUT_PREFIX; | ||
|
||
public abstract class AdyenExpressCheckoutControllerBase { | ||
|
||
protected String getReturnUrl(String paymentMethod) { | ||
String url; | ||
if (GooglePayDetails.TypeEnum.GOOGLEPAY.getValue().equals(paymentMethod)) { | ||
//Google Pay will only use returnUrl if redirected to 3DS authentication | ||
url = SUMMARY_CHECKOUT_PREFIX + "/authorise-3d-adyen-response"; | ||
} else { | ||
url = SUMMARY_CHECKOUT_PREFIX + CHECKOUT_RESULT_URL; | ||
} | ||
BaseSiteModel currentBaseSite = getBaseSiteService().getCurrentBaseSite(); | ||
return getSiteBaseUrlResolutionService().getWebsiteUrlForSite(currentBaseSite, true, url); | ||
} | ||
|
||
abstract public BaseSiteService getBaseSiteService(); | ||
|
||
abstract public SiteBaseUrlResolutionService getSiteBaseUrlResolutionService(); | ||
} |
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
10 changes: 5 additions & 5 deletions
10
...ccheckoutaddon/acceleratoraddon/web/src/com/adyen/v6/request/PayPalExpressPDPRequest.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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
package com.adyen.v6.request; | ||
|
||
public class PayPalExpressPDPRequest extends PayPalExpressCartRequest { | ||
private String productCode; | ||
private String cartGuid; | ||
|
||
public String getProductCode() { | ||
return productCode; | ||
public String getCartGuid() { | ||
return cartGuid; | ||
} | ||
|
||
public void setProductCode(String productCode) { | ||
this.productCode = productCode; | ||
public void setCartGuid(String cartGuid) { | ||
this.cartGuid = cartGuid; | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
...outaddon/acceleratoraddon/web/src/com/adyen/v6/request/PayPalExpressSubmitPDPRequest.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,26 @@ | ||
package com.adyen.v6.request; | ||
|
||
import com.adyen.model.checkout.PayPalDetails; | ||
|
||
import java.io.Serializable; | ||
|
||
public class PayPalExpressSubmitPDPRequest implements Serializable { | ||
private PayPalDetails payPalDetails; | ||
private String productCode; | ||
|
||
public PayPalDetails getPayPalDetails() { | ||
return payPalDetails; | ||
} | ||
|
||
public void setPayPalDetails(PayPalDetails payPalDetails) { | ||
this.payPalDetails = payPalDetails; | ||
} | ||
|
||
public String getProductCode() { | ||
return productCode; | ||
} | ||
|
||
public void setProductCode(String productCode) { | ||
this.productCode = productCode; | ||
} | ||
} |
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
Oops, something went wrong.