-
Notifications
You must be signed in to change notification settings - Fork 1
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
[PANC-71] Create mock Airtel Api. #3
base: develop
Are you sure you want to change the base?
Conversation
6600749
to
748b60d
Compare
if (transactionId.equals(transactionIdSuccessful)) { | ||
message = TransferStatus.SUCCESSFUL.name(); | ||
status = TransactionStatus.TS.name(); | ||
code = HttpStatus.OK.toString(); |
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.
The code now has the value 200 Ok instead of 200 is that fine? Otherwise I think we have to create a seperate enum for response codes.
abb14b6
to
75432d3
Compare
@@ -0,0 +1,5 @@ | |||
package org.mifos.connector.airtel.mockairtel.utils; | |||
|
|||
public enum TransactionStatus { |
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.
Why this enum is required? You can use TransferStatus enum here.
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.
Done.
return airtelMockController.getTransactionStatus(transactionId); | ||
} | ||
|
||
@PostMapping("/merchant/v2/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.
remove this extra '/' from the endpoint
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.
Done.
75432d3
to
b3421ea
Compare
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
b3421ea
to
8041252
Compare
8041252
to
27b91ef
Compare
@@ -41,7 +45,7 @@ dependencies { | |||
annotationProcessor 'org.projectlombok:lombok' | |||
testImplementation 'org.springframework.boot:spring-boot-starter-test' | |||
testRuntimeOnly 'org.junit.platform:junit-platform-launcher' | |||
implementation 'org.mifos:ph-ee-connector-common:1.9.1-SNAPSHOT' | |||
implementation 'org.mifos:ph-ee-connector-common:0.0.0' |
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.
Also, update this to the released version after the jfrog issue is fixed.
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.
Okay
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.
Using 0.0.0 as this PR has not been merged and new version is not released.
The response codes in the `application.yml` file have been added from the Airtel documentation. Similarly, the responses returned by the API are based on the Airtel documentation.
27b91ef
to
2f62aad
Compare
Description
PANC-71 Write Mock APIs for Airtel money.
This PR creates Mock Apis for following Airtel Apis:
The API specs can be found here.
Checklist
Please make sure these boxes are checked before submitting your pull request - thanks!
Followed the PR title naming convention mentioned above.
Design related bullet points or design document link related to this PR added in the description above.
Updated corresponding Postman Collection or Api documentation for the changes in this PR.
Created/updated unit or integration tests for verifying the changes made.
Added required Swagger annotation and update API documentation with details of any API changes if applicable
Followed the naming conventions as given in https://docs.google.com/document/d/1Q4vaMSzrTxxh9TS0RILuNkSkYCxotuYk1Xe0CMIkkCU/edit?usp=sharing