diff --git a/src/main/java/ch/wisv/events/core/admin/SalesExportSubmission.java b/src/main/java/ch/wisv/events/core/admin/SalesExportSubmission.java index 08b02ea2..78382cb5 100644 --- a/src/main/java/ch/wisv/events/core/admin/SalesExportSubmission.java +++ b/src/main/java/ch/wisv/events/core/admin/SalesExportSubmission.java @@ -49,7 +49,7 @@ public SalesExportSubmission() { this.month = LocalDate.now().getMonthValue()-1; } - this.includedPaymentMethods = Lists.newArrayList(PaymentMethod.IDEAL, PaymentMethod.SOFORT); + this.includedPaymentMethods = Lists.newArrayList(PaymentMethod.IDEAL); this.freeProductsIncluded = false; diff --git a/src/main/java/ch/wisv/events/core/model/order/PaymentMethod.java b/src/main/java/ch/wisv/events/core/model/order/PaymentMethod.java index 882b9118..eb289fe1 100644 --- a/src/main/java/ch/wisv/events/core/model/order/PaymentMethod.java +++ b/src/main/java/ch/wisv/events/core/model/order/PaymentMethod.java @@ -24,11 +24,6 @@ public enum PaymentMethod { */ IDEAL("ideal", cost -> cost + 0.35), - /** - * User paid his order via Mollie SOFORT. - */ - SOFORT("sofort", cost -> 1.01089 * cost + 0.3025), - /** * User paid his order via another method. */ diff --git a/src/main/java/ch/wisv/events/webshop/controller/WebshopPaymentController.java b/src/main/java/ch/wisv/events/webshop/controller/WebshopPaymentController.java index c480ed4a..4149ed45 100644 --- a/src/main/java/ch/wisv/events/webshop/controller/WebshopPaymentController.java +++ b/src/main/java/ch/wisv/events/webshop/controller/WebshopPaymentController.java @@ -129,19 +129,6 @@ public String paymentIdeal(RedirectAttributes redirect, @PathVariable String key return this.payment(redirect, key, PaymentMethod.IDEAL); } - /** - * Payment method using SOFORT. - * - * @param redirect of type RedirectAttributes - * @param key of type String - * - * @return String string - */ - @GetMapping("/sofort") - public String paymentSofort(RedirectAttributes redirect, @PathVariable String key) { - return this.payment(redirect, key, PaymentMethod.SOFORT); - } - /** * Assert if an Order is suitable for Payment. * diff --git a/src/main/java/ch/wisv/events/webshop/service/PaymentsServiceImpl.java b/src/main/java/ch/wisv/events/webshop/service/PaymentsServiceImpl.java index 8ab5e02d..af252f09 100644 --- a/src/main/java/ch/wisv/events/webshop/service/PaymentsServiceImpl.java +++ b/src/main/java/ch/wisv/events/webshop/service/PaymentsServiceImpl.java @@ -131,11 +131,11 @@ protected PaymentRequest createMolliePaymentRequestFromOrder(Order order) { PaymentMethod method; - if (order.getPaymentMethod() == ch.wisv.events.core.model.order.PaymentMethod.IDEAL) { +// if (order.getPaymentMethod() == ch.wisv.events.core.model.order.PaymentMethod.IDEAL) { method = PaymentMethod.IDEAL; - } else { - method = PaymentMethod.SOFORT; - } +// } else { +// method = PaymentMethod.SOFORT; +// } String returnUrl = clientUri + "/return/" + order.getPublicReference(); String webhookUrl = clientUri + "/api/v1/orders/status"; diff --git a/src/main/resources/templates/webshop/payment/index.html b/src/main/resources/templates/webshop/payment/index.html index 710d3922..a2c8d4d3 100644 --- a/src/main/resources/templates/webshop/payment/index.html +++ b/src/main/resources/templates/webshop/payment/index.html @@ -75,34 +75,6 @@
IDEAL
- Online payment using your -
-
-
-
-
- -
-
-
-
-
SOFORT
- Predominant online banking method in - countries across Europe.
- - (+ € 0,30 + 1,1% transaction cost) -
- - -
-
-
-
-
-
diff --git a/src/test/java/ch/wisv/events/core/model/order/PaymentMethodTest.java b/src/test/java/ch/wisv/events/core/model/order/PaymentMethodTest.java index d292602c..a36f964f 100644 --- a/src/test/java/ch/wisv/events/core/model/order/PaymentMethodTest.java +++ b/src/test/java/ch/wisv/events/core/model/order/PaymentMethodTest.java @@ -41,17 +41,6 @@ public void testCalculateCostIncludingTransaction_IDEAL() { assertEquals(expected, actual, 0.001); } - @Test - public void testCalculateCostIncludingTransaction_SOFORT() { - double cost = 50.0; - PaymentMethod paymentMethod = PaymentMethod.SOFORT; - - double expected = 50.85; // Rounded 50.847 - double actual = paymentMethod.calculateCostIncludingTransaction(cost); - - assertEquals(expected, actual, 0.001); - } - @Test public void testCalculateCostIncludingTransaction_OTHER() { double cost = 50.0;