diff --git a/backend/src/main/java/de/szut/casino/deposit/DepositController.java b/backend/src/main/java/de/szut/casino/deposit/DepositController.java index 0e1ade5..0312981 100644 --- a/backend/src/main/java/de/szut/casino/deposit/DepositController.java +++ b/backend/src/main/java/de/szut/casino/deposit/DepositController.java @@ -24,11 +24,11 @@ public class DepositController { @Value("${stripe.secret.key}") private String stripeKey; + @Value("${frontend.host}") + private String frontendHost; + @PostMapping("/deposit/checkout") - public ResponseEntity checkout( - @RequestBody @Valid AmountDto amountDto, - @RequestHeader("Origin") String origin - ) throws StripeException { + public ResponseEntity checkout(@RequestBody @Valid AmountDto amountDto) throws StripeException { Stripe.apiKey = stripeKey; SessionCreateParams params = SessionCreateParams.builder() @@ -38,7 +38,7 @@ public class DepositController { .setQuantity(1L) .setName("Einzahlung") .build()) - .setSuccessUrl(origin+"/deposit/success") + .setSuccessUrl(frontendHost+"/deposit/success") .setMode(SessionCreateParams.Mode.PAYMENT) .build();