Skip to content

Commit

Permalink
Add missing countryCode
Browse files Browse the repository at this point in the history
  • Loading branch information
gcatanese committed Sep 12, 2024
1 parent e12b230 commit 9f4605f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ public ResponseEntity<PaymentResponse> payments(@RequestHeader String host, @Req
paymentRequest.setReturnUrl(request.getScheme() + "://" + host + "/api/handleShopperRedirect?orderRef=" + orderRef);

paymentRequest.setAmount(amount);
// set lineItems required for some payment methods (ie Klarna)
// set countryCode and lineItems required for some payment methods (ie Klarna)
paymentRequest.setCountryCode("NL");
paymentRequest.setLineItems(Arrays.asList(
new LineItem().quantity(1L).amountIncludingTax(5000L).description("Sunglasses"),
new LineItem().quantity(1L).amountIncludingTax(5000L).description("Headphones"))
Expand Down

0 comments on commit 9f4605f

Please sign in to comment.