-
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 #84 from mojaloop/dev
feat: implemented merchant payments and added timeout config in mtn-ug-connector
- Loading branch information
Showing
27 changed files
with
411 additions
and
99 deletions.
There are no files selected for viewing
Empty file.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Payer Initiate Merchant Payment | ||
This sequence diagram details the process of initiating a merchant payment and the steps the core connector takes to initiate a payment in the mojaloop connector. | ||
|
||
|
||
```mermaid | ||
sequenceDiagram | ||
autoNumber | ||
DFSP Customer App->>CC: POST /merchant-payment/ {} | ||
CC->>CC: Check Request | ||
Alt if Checks fail | ||
CC-->>DFSP Customer App: Response 400 | ||
End | ||
CC->>ML Connector: POST /transfer /{amountType: RECEIVE} | ||
ML Connector-->>CC: Response | ||
CC->> CC: Check Response | ||
Alt if Checks fail | ||
CC-->>DFSP Customer App: Response 500 | ||
End | ||
Alt if WAITING_FOR_CONVERSION_ACCEPTANCE | ||
ML Connector-->>CC: Response: ConversionRate | ||
CC->>CC: Check Conversion Terms | ||
Alt if Conversion Terms are invalid | ||
CC->>ML Connector: PUT /transfers/{id}[aceeptConversion: false] | ||
CC-->>DFSP Customer App: Response 500 | ||
End | ||
CC->>ML Connector: PUT /transfers/{id}[aceeptConversion: true] | ||
End | ||
ML Connector-->>CC:Response, Normal Quote | ||
Alt if response not successful | ||
CC-->>DFSP Customer App: Response 500 | ||
End | ||
CC->>CC: Check Returned Quote | ||
Alt if Quote is incorrect | ||
CC-->>DFSP Customer App: Response 500 | ||
End | ||
CC-->>DFSP Customer App: Response 200 | ||
DFSP Customer App->>DFSP Customer App:Show terms of transfer to customer | ||
``` |
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
35 changes: 35 additions & 0 deletions
35
core-connector-template/docs/payer-update-merchant-payment.md
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,35 @@ | ||
# Payer Update Merchant Payment | ||
This sequence diagram details the process of updating an initiated merchant payment and the steps the core connector takes to initiate a payment in the mojaloop connector. | ||
|
||
```mermaid | ||
sequenceDiagram | ||
autoNumber | ||
DFSP Customer App->>CC: POST /merchant-payment/{id}/acceptQuote=true | false | ||
CC->>CC: Check acceptQuote | ||
Alt If Quote not Accepted | ||
CC-->>DFSP Customer App: Response 500 OK | ||
End | ||
CC->>CBS Api:POST /merchant/v2/payments | ||
CBS Api-->>CC:Response | ||
CC-->CC: Check Response | ||
Alt If Couldnt make reservation | ||
CC-->>DFSP Customer App: Response 500 | ||
End | ||
CBS Api->>CC: PUT /callback | ||
CC->>CC: Check payment status | ||
Alt If Transaction Successful | ||
CC->>ML Connector:PUT /transfers/{id} {acceptQuote = true} | ||
Else | ||
CC->>ML Connector:PUT /transfers/{id} {acceptQuote = false} | ||
End | ||
ML Connector-->>CC: Response | ||
CC->>CC: Check response | ||
Alt if http error code 500 or 504 or currentState = ERROR_OCCURED | ||
CC->>CBS Api : Rolback transfer POST /standard/v2/payments/refund | ||
CBS Api-->>CC:Check Response | ||
Alt if Response not Successful | ||
CC->>CC: Initiate manual refund | ||
End | ||
End | ||
CC-->> CBS Api: Response 200 | ||
``` |
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
Oops, something went wrong.