ADORSYS-GIS / ADORSYS-GIS/e2e-banking-app
User story-11: As a potential user using choronko will like to register with the PowerPay system
- Dominant language
- JavaScript
- Stars
- 9
- Forks
- 23
- PR merge metrics
- No merged PRs in 30d
Description
**Description**: As a potential user using choronko will like to register with the PowerPay system
**Sequence Diagram**
```mermaid
sequenceDiagram
participant u as User
participant c as Choronko
participant sg as sms gateway
participant pps as PowerPay service
u->>c:input(number and username)
c->>sg:forwarding sms(number and username)
sg->>pps: send sms(number and username)
pps->>pps: check number
pps-->>sg: sms(OTP and request for PIN)
sg-->>c:forwarding sms(OTP and request for PIN)
c-->>u:sms(OTP and request for PIN)
u->>sg:sms(OTP and PIN)
sg->>pps:forwarding sms(OTP and request for PIN)
pps->>pps:check OPT and PIN
pps-->>sg:ok(success message)
sg-->>c:ok(success message)
c-->>u:display sms(success message)
```
**Wireframe**

**Tickets**
* Validate user input: Extract user data(username and number) and store in the database.
* Implement Request response mechanism: For each request to a destination there should be an expected response from that destination.
* Implement error handling and validation: Provide corresponding messages to events.
* Implement validateUserRegistration(pin, id):
* Validate PIN and OTP: validate the PIN and the OTP and store the PIN in the corresponding location with user data in the database.
* Implement register(phoneNumber):
* Implement sms reponse to user input: Send sms to user number containing OPT and a request for a PIN.
Implementation:
- The User Story #1 contains the complete class diagram
- Use a SMS API Gateway, discussed in #5
Contributor guide
Assessment
This issue has not been assessed yet.