Skip to content
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

Merged
merged 19 commits into from
Oct 4, 2023

Conversation

ivan0dyatlyukkk
Copy link
Contributor

No description provided.

) {
Payment payment = paymentService.create(requestDto);
URI url = URI.create(payment.getSessionUrl());
System.out.println(url);
Copy link
Contributor

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

Copy link
Contributor

@DmytroV95 DmytroV95 left a 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")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@Data
@Getter
@Setter

@@ -0,0 +1,4 @@
package com.project.carsharingapp.dto.payment;

public class PaymentResponseDto {
Copy link
Contributor

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";

Copy link
Contributor

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;
Copy link
Contributor

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.

@DmytroV95 DmytroV95 changed the title [PAYMENT] implemented beta controller and service, added swagger to the controller [PAYMENT] Implemented beta controller and service, added swagger to the controller Oct 4, 2023
Copy link
Contributor

@OleksandrSaven OleksandrSaven left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@ivan0dyatlyukkk ivan0dyatlyukkk merged commit 38125cb into main Oct 4, 2023
2 checks passed
@ivan0dyatlyukkk ivan0dyatlyukkk deleted the feat-payment branch October 4, 2023 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants