-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #107 from flickmatch/Astitva-Pay
Created the controller class and returned harcoded value
- Loading branch information
Showing
5 changed files
with
59 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
platform/src/main/java/com/flickmatch/platform/graphql/controller/PaymentController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.flickmatch.platform.graphql.controller; | ||
|
||
import com.flickmatch.platform.graphql.input.InitiatePaymentInput; | ||
import com.flickmatch.platform.graphql.type.InitiatePaymentOutput; | ||
import org.springframework.web.bind.annotation.PostMapping; | ||
import org.springframework.web.bind.annotation.RequestBody; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
@RestController | ||
public class PaymentController { | ||
|
||
@PostMapping | ||
public InitiatePaymentOutput initiatePayment(@RequestBody InitiatePaymentInput input) { | ||
String paymentLink = "https://example.com/payment/link"; | ||
InitiatePaymentOutput output = new InitiatePaymentOutput(paymentLink); | ||
output.setPaymentLink(paymentLink); | ||
return output; | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
platform/src/main/java/com/flickmatch/platform/graphql/input/InitiatePaymentInput.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package com.flickmatch.platform.graphql.input; | ||
|
||
import lombok.Builder; | ||
import lombok.Getter; | ||
|
||
@Builder | ||
@Getter | ||
public class InitiatePaymentInput { | ||
String eventId; | ||
String cityId; | ||
PlayerInput player; | ||
} |
15 changes: 15 additions & 0 deletions
15
platform/src/main/java/com/flickmatch/platform/graphql/type/InitiatePaymentOutput.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.flickmatch.platform.graphql.type; | ||
|
||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
@Builder | ||
@Setter | ||
@Getter | ||
public class InitiatePaymentOutput { | ||
private String paymentLink; | ||
public InitiatePaymentOutput(String paymentLink) { | ||
this.paymentLink = paymentLink; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters