fix: add correct redirect url after deposit
This commit is contained in:
		
					parent
					
						
							
								925a9d540d
							
						
					
				
			
			
				commit
				
					
						204970856b
					
				
			
		
					 1 changed files with 5 additions and 5 deletions
				
			
		|  | @ -24,11 +24,11 @@ public class DepositController { | ||||||
|     @Value("${stripe.secret.key}") |     @Value("${stripe.secret.key}") | ||||||
|     private String stripeKey; |     private String stripeKey; | ||||||
| 
 | 
 | ||||||
|  |     @Value("${frontend.host}") | ||||||
|  |     private String frontendHost; | ||||||
|  | 
 | ||||||
|     @PostMapping("/deposit/checkout") |     @PostMapping("/deposit/checkout") | ||||||
|     public ResponseEntity<SessionIdDto> checkout( |     public ResponseEntity<SessionIdDto> checkout(@RequestBody @Valid AmountDto amountDto) throws StripeException { | ||||||
|             @RequestBody @Valid AmountDto amountDto, |  | ||||||
|             @RequestHeader("Origin") String origin |  | ||||||
|     ) throws StripeException { |  | ||||||
|         Stripe.apiKey = stripeKey; |         Stripe.apiKey = stripeKey; | ||||||
| 
 | 
 | ||||||
|         SessionCreateParams params = SessionCreateParams.builder() |         SessionCreateParams params = SessionCreateParams.builder() | ||||||
|  | @ -38,7 +38,7 @@ public class DepositController { | ||||||
|                         .setQuantity(1L) |                         .setQuantity(1L) | ||||||
|                         .setName("Einzahlung") |                         .setName("Einzahlung") | ||||||
|                         .build()) |                         .build()) | ||||||
|                 .setSuccessUrl(origin+"/deposit/success") |                 .setSuccessUrl(frontendHost+"/deposit/success") | ||||||
|                 .setMode(SessionCreateParams.Mode.PAYMENT) |                 .setMode(SessionCreateParams.Mode.PAYMENT) | ||||||
|                 .build(); |                 .build(); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Reference in a new issue