Skip to content

Commit

Permalink
Remove Ideal and Sofort, and always use mollie unless the tickets can…
Browse files Browse the repository at this point in the history
… be reserved
  • Loading branch information
robertdijk committed Jul 27, 2024
1 parent 1baf636 commit 273486f
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 54 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,11 @@ public String paymentOverview(Model model, RedirectAttributes redirect, @PathVar
);
}

return "webshop/payment/index";
if (orderService.containsOnlyReservable(order)) {
return "webshop/payment/index";
}

return "redirect:/checkout/" + order.getPublicReference() + "/payment/mollie";
} catch (EventsException e) {
redirect.addFlashAttribute(MODEL_ATTR_ERROR, e.getMessage());

Expand Down Expand Up @@ -117,29 +121,16 @@ public String paymentReservation(RedirectAttributes redirect, @PathVariable Stri
}

/**
* Payment method using iDeal.
*
* @param redirect of type RedirectAttributes
* @param key of type String
*
* @return String string
*/
@GetMapping("/ideal")
public String paymentIdeal(RedirectAttributes redirect, @PathVariable String key) {
return this.payment(redirect, key, PaymentMethod.IDEAL);
}

/**
* Payment method using SOFORT.
* Payment method using Mollie.
*
* @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);
@GetMapping("/mollie")
public String paymentMollie(RedirectAttributes redirect, @PathVariable String key) {
return this.payment(redirect, key, PaymentMethod.MOLLIE);
}

/**
Expand Down
Binary file removed src/main/resources/static/images/icon-pay-later.jpg
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/static/images/icon-pay-now.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 5 additions & 36 deletions src/main/resources/templates/webshop/payment/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,49 +52,18 @@ <h4 class="display-4">Select payment method</h4>
<div class="card-body h-100">
<div class="row h-100">
<div class="col-3 px-3">
<img class="img-thumbnail" th:src="@{/images/icon-ideal.png}" alt="">
<img class="img-thumbnail" th:src="@{/images/icon-pay-now.png}" alt="">
</div>
<div class="col-9 h-100">
<div class="row h-100">
<div class="col-12 align-self-start mb-4">
<h5 class="d-inline mt-0">IDEAL</h5> - Online payment using your
Dutch bank. Easy, fast and secure!<br>

<span class="text-info">(+ &euro; 0,35 transaction cost)</span>
</div>

<div class="col-12 align-self-end">
<a th:href="@{'/checkout/' + ${order.getPublicReference()} + '/payment/ideal'}"
class="btn btn-block btn-primary">
Pay with iDeal
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-12 col-md-6 mb-4">
<div class="card h-100">
<div class="card-body h-100">
<div class="row h-100">
<div class="col-3 px-3">
<img class="img-thumbnail" th:src="@{/images/icon-sofort.png}" alt="">
</div>
<div class="col-9 h-100">
<div class="row h-100">
<div class="col-12 align-self-start mb-4">
<h5 class="d-inline mt-0">SOFORT</h5> - Predominant online banking method in
countries across Europe.<br>

<span class="text-info">(+ &euro; 0,30 + 1,1% transaction cost)</span>
<h5 class="d-inline mt-0">Pay Online</h5> - Pay now using iDeal<br>
</div>

<div class="col-12 align-self-end">
<a th:href="@{'/checkout/' + ${order.getPublicReference()} + '/payment/sofort'}"
<a th:href="@{'/checkout/' + ${order.getPublicReference()} + '/payment/mollie'}"
class="btn btn-block btn-primary">
Pay with SOFORT
Pay Online
</a>
</div>
</div>
Expand All @@ -108,7 +77,7 @@ <h5 class="d-inline mt-0">SOFORT</h5> - Predominant online banking method in
<div class="card-body h-100">
<div class="row h-100">
<div class="col-3 px-3">
<img class="img-thumbnail" th:src="@{/images/icon-pay-later.jpg}" alt="">
<img class="img-thumbnail" th:src="@{/images/icon-pay-later.png}" alt="">
</div>
<div class="col-9 h-100">
<div class="row">
Expand Down

0 comments on commit 273486f

Please sign in to comment.