Initial commit
This commit is contained in:
57
docs/zagros/deposit/fiat.md
Normal file
57
docs/zagros/deposit/fiat.md
Normal file
@@ -0,0 +1,57 @@
|
||||
# Deposit: Fiat
|
||||
###### Sprint: 5
|
||||
|
||||
### Outcome:
|
||||
Users can do fiat deposits with the Help of the Vandar service.
|
||||
|
||||
### Implementation description:
|
||||
|
||||
#### Endpoints:
|
||||
POST {$domain}/api/v2/peatio/account/deposits/fiat <br/>
|
||||
POST {$domain}/api/v2/peatio/account/deposits/confirm<br/>
|
||||
#### File destination:
|
||||
{$Dena_Path}/app/api/v2/account/deposits.rb
|
||||
|
||||
#### Commits:
|
||||
3b189b07<br/>
|
||||
d436176b<br/>
|
||||
1cc9fb29<br/>
|
||||
9a6d7864<br/>
|
||||
5994b163<br/>
|
||||
7769e86a<br/>
|
||||
7dea7777<br/>
|
||||
#### What did we implement:
|
||||
we implemented a new client route for user, to they can deposit their money and charge their accounts
|
||||
|
||||
### TODO
|
||||
now we dont show any information of the deposit result to user, so in the result of the Vandar the amount perhaps remains as Rial
|
||||
|
||||
```mermaid
|
||||
sequenceDiagram
|
||||
|
||||
Title: Depost Fiat
|
||||
|
||||
note over User,Ranj:The description and factorNumber are optionals
|
||||
note over User,Ranj:callback_url parameter use for Vandar Service\n to redirect Bank Gateway into my system after deposit
|
||||
User->>Ranj:amount, callback_url, currency, card, **factorNumber**, **description**
|
||||
Ranj->>Dalan:POST: after client side checking
|
||||
Dalan->>Ranj:4xx if lose any required parameters
|
||||
note over Dalan,Vandar:The Vandar service has own documentation
|
||||
Dalan->>Ranj:4xx if entered Card number not exist in current user valid Card number list
|
||||
Dalan->>Ranj:new deoposit recored created
|
||||
Dalan->>Ranj:4xx if any model validation become false
|
||||
Dalan->>Vandar:POST valid_card_number, amount, callback_url, description
|
||||
Vandar->>Dalan:A new deposit token will be generated for Bank Gateway
|
||||
Dalan->>Ranj: pass generated Token
|
||||
Ranj->>User:if token present redirect user's page to Bank Gateway \n otherwise, show errors in the Vandar response and process finished
|
||||
User-->>Vandar: entering bank information for doing deposit
|
||||
Vandar->>Ranj:GET pass generated token to callback_url
|
||||
Ranj->>Dalan: POST generated token for confirming step
|
||||
Dalan->>Ranj:at first, we check the database to check the status of the deposit that was unique by the generated token.\n show record result if txid present in DB,\n otherwise ask The Vandar for result of this deposit.
|
||||
Dalan->>Vandar: POST generated token to find transaction
|
||||
Vandar->>Dalan: pass result of transaction
|
||||
Dalan->>Vandar: POST generated token to verify transaction
|
||||
Dalan->>Ranj: update deposit record in DB (txid) and charge user balane
|
||||
Ranj->>User: notify the user that the deposit is done.
|
||||
|
||||
```
|
||||
Reference in New Issue
Block a user