Created
June 24, 2020 14:16
-
-
Save deepu105/931e4ad64ea92e6bf049d303005585f5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
@PostMapping("/checkout/payment-methods") | |
public ResponseEntity<PaymentMethodsResponse> paymentMethods() throws EntityNotFoundException, IOException, ApiException { | |
PaymentMethodsRequest paymentMethodsRequest = new PaymentMethodsRequest(); | |
paymentMethodsRequest.setMerchantAccount(merchantAccount); | |
paymentMethodsRequest.setCountryCode("NL"); | |
paymentMethodsRequest.setShopperLocale("nl-NL"); | |
paymentMethodsRequest.setChannel(PaymentMethodsRequest.ChannelEnum.WEB); | |
Amount amount = getAmountFromCart(); | |
paymentMethodsRequest.setAmount(amount); | |
log.debug("REST request to get Adyen payment methods {}", paymentMethodsRequest); | |
PaymentMethodsResponse response = checkout.paymentMethods(paymentMethodsRequest); | |
return ResponseEntity.ok() | |
.body(response); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment