Skip to content

Commit

Permalink
Remove methods from mollie so the user can select the method in mollie
Browse files Browse the repository at this point in the history
  • Loading branch information
robertdijk committed Jul 27, 2024
1 parent 491ce46 commit 1baf636
Showing 1 changed file with 0 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;

Expand Down Expand Up @@ -129,14 +128,6 @@ protected PaymentRequest createMolliePaymentRequestFromOrder(Order order) {

metadata.put("products", productString);

PaymentMethod method;

if (order.getPaymentMethod() == ch.wisv.events.core.model.order.PaymentMethod.IDEAL) {
method = PaymentMethod.IDEAL;
} else {
method = PaymentMethod.SOFORT;
}

String returnUrl = clientUri + "/return/" + order.getPublicReference();
String webhookUrl = clientUri + "/api/v1/orders/status";

Expand All @@ -148,7 +139,6 @@ protected PaymentRequest createMolliePaymentRequestFromOrder(Order order) {
Amount paymentAmount = Amount.builder().value(BigDecimal.valueOf(value).setScale(2, RoundingMode.CEILING)).currency("EUR").build();

return PaymentRequest.builder()
.method(Optional.of(List.of(method)))
.amount(paymentAmount)
.description("W.I.S.V. 'Christiaan Huygens'")
.consumerName(Optional.of(order.getOwner().getName()))
Expand Down

0 comments on commit 1baf636

Please sign in to comment.