This repository has been archived by the owner on Mar 15, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-Implement all mifos service methods to be asynchronous
Fixing bugs on incoming payment request and outgoing payments Bug fixes in the OutboundController and the data.sql file Remove out folder from project Modify a .gitignore file
- Loading branch information
1 parent
276a7e7
commit 9c72956
Showing
65 changed files
with
1,507 additions
and
540 deletions.
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
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
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
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
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
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
38 changes: 38 additions & 0 deletions
38
mifos-payment/src/main/java/org/mifos/mifospaymentbridge/controller/OutboundController.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,38 @@ | ||
package org.mifos.mifospaymentbridge.controller; | ||
|
||
|
||
import org.mifos.mifospaymentbridge.Util.StatusCategory; | ||
import org.mifos.mifospaymentbridge.Util.TransactionStatus; | ||
import org.mifos.mifospaymentbridge.integration.OutboundMessageReceiver; | ||
import org.mifos.mifospaymentbridge.model.OutboundRequest; | ||
import org.mifos.mifospaymentbridge.model.Status; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.http.HttpStatus; | ||
import org.springframework.http.MediaType; | ||
import org.springframework.http.ResponseEntity; | ||
import org.springframework.web.bind.annotation.*; | ||
|
||
@RestController | ||
public class OutboundController { | ||
|
||
@Autowired | ||
private OutboundMessageReceiver receiver; | ||
|
||
private Status outboundReceptionStatus; | ||
|
||
@RequestMapping(value = "/outbound/requests", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) | ||
public ResponseEntity<Status> acceptOutboundRequest(@RequestBody OutboundRequest outboundRequest, @RequestParam(value="tenant") String tenant){ | ||
System.out.println(outboundRequest.toString()); | ||
receiver.receiveRequest(outboundRequest); | ||
|
||
if(outboundRequest != null){ | ||
outboundReceptionStatus = new Status(); | ||
outboundReceptionStatus.setCode(String.valueOf(TransactionStatus.REQUEST_RECEPTION_SUCCESS_CODE)); | ||
outboundReceptionStatus.setDescription(TransactionStatus.REQUEST_RECEPTION_SUCCESS); | ||
outboundReceptionStatus.setStatusCategory(StatusCategory.GATEWAY_CATEGORY); | ||
} | ||
|
||
return new ResponseEntity<>(outboundReceptionStatus, HttpStatus.OK); | ||
} | ||
|
||
} |
Oops, something went wrong.