-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PAYMENT] Implemented beta controller and service, added swagger to the controller #16
Conversation
…ple of StripeService
# Conflicts: # pom.xml
…or payment controller, service and stripe service
…ed rental repository and made some sligth changes in create-payments yaml file
) { | ||
Payment payment = paymentService.create(requestDto); | ||
URI url = URI.create(payment.getSessionUrl()); | ||
System.out.println(url); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's better to remove it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super! GJ! Left some minor comments.
import org.springframework.web.bind.annotation.RequestParam; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
@Tag(name = "Payment controller", description = "Endpoint for managing payments") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Tag(name = "Payment controller", description = "Endpoint for managing payments") | |
@Tag(name = "Payment management", description = "Endpoint for managing payments") |
To make a uniform style for controllers.
import jakarta.validation.constraints.NotNull; | ||
import lombok.Data; | ||
|
||
@Data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Data | |
@Getter | |
@Setter |
@@ -0,0 +1,4 @@ | |||
package com.project.carsharingapp.dto.payment; | |||
|
|||
public class PaymentResponseDto { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the purpose of using empty class?
@RequiredArgsConstructor | ||
public class StripeService { | ||
private static final String DEFAULT_URL_PART = "/api/payments"; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redundant line
private static final String CANCEL_ENDPOINT = "cancel"; | ||
private static final Long STANDARD_QUANTITY_OF_RENTAL_CART = 1L; | ||
private static final String DEFAULT_CURRENCY = "USD"; | ||
private final PaymentAmountHandlerStrategy handler; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add whitespace between static and not static fields.
# Conflicts: # src/main/resources/application.properties
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
No description provided.