Closed claudiotx closed 7 months ago
participant Customer
participant Merchant
participant Engine
participant MMO
Customer->Engine: SMS/USSD PAYMENT
Engine->MMO:GET accounts/msisdn/:phoneNumber/accountname
alt Account exists
Engine<--MMO:HTTP 200 (user info)
Engine->MMO:POST transactions/type/merchantpay
alt Without open payment
Engine<--MMO:HTTP 200
Engine->Customer:Notification - Request PIN
Engine<-Customer:SMS - Send PIN
Engine->MMO:POST Validate PIN
alt Valid PIN
MMO->Engine:PUT /hooks/mmo/merchantpay
Merchant<-Engine:NOTIFICATION
Customer<-Engine:NOTIFICATION
else Invalid PIN
Customer<-Engine:NOTIFICATION - Wrong Pin
end
else With open payment
Engine<--MMO:HTTP ERROR
Customer<-Engine:NOTIFICATION - Can't have more than one open payment
end
else Account doesn't exist
Engine<--MMO:HTTP 404
Customer<--Engine:HTTP 404
end
https://momodeveloper.mtn.com/api-documentation/use-cases/
Create sequence diagram