!revbank: Difference between revisions
(Created page with "Met het bot-commando <tt>!revbank</tt> kun je je RevBank-saldo bekijken of opwaarderen via IRC in #revspace of een privebericht aan <tt>bar</tt>. == Authenticatie ==...") |
|||
Line 18: | Line 18: | ||
[[Image:!revbank.png]] | [[Image:!revbank.png]] | ||
<!-- | |||
plantuml -p << 'END' > '!revbank.png' | |||
@startuml | |||
hide footbox | |||
mainframe IRC RevBank deposit using voucher code | |||
participant irc_user | |||
box "bar (irc bot)" | |||
participant "!revbank" as script | |||
participant "!=auth" as auth | |||
end box | |||
participant revbank | |||
participant "deposit.revspace.nl\n/mollie.php" as backend | |||
participant "api.mollie.com" as mollie | |||
irc_user -> script: !revbank tr_xxxx | |||
activate script | |||
script -> auth: irc cloak or hostname\nrevspace/participant/irc_user | |||
auth -> auth: find username | |||
group#eee unknown irc cloak or hostname | |||
auth --> script: undefined | |||
script --> irc_user: error message | |||
note across: stop | |||
end | |||
auth --> script: username | |||
script -> revbank: tr_xxxx username | |||
activate revbank | |||
revbank -> backend: tr_xxxx | |||
activate backend | |||
backend -> mollie: get payment | |||
mollie --> backend: payment | |||
backend -> backend: validate payment status | |||
group#eee unknown, unpaid, or used voucher code | |||
backend --> revbank: error message | |||
revbank --> script: error message | |||
script --> irc_user: error message | |||
note across: stop | |||
end | |||
backend -> mollie: update metadata:\nrevbank_status = pending | |||
backend --> revbank: amount | |||
deactivate backend | |||
revbank -> revbank: checkout | |||
revbank -> backend: finalize | |||
activate backend | |||
backend -> mollie: update metadata:\nrevbank_status = spent | |||
deactivate backend | |||
revbank --> script: new balance | |||
deactivate revbank | |||
script --> irc_user: new balance | |||
deactivate script | |||
@enduml | |||
END | |||
--> |
Revision as of 04:02, 21 January 2022
Met het bot-commando !revbank kun je je RevBank-saldo bekijken of opwaarderen via IRC in #revspace of een privebericht aan bar.
Authenticatie
De bot herkent je aan de hand van je cloak.
Saldo bekijken
!revbank
Saldo opwaarderen
- Check met !revbank of je wel herkend wordt, om vervelende verrassingen te voorkomen.
- Betaal via https://deposit.revspace.nl/ (zie ook deposit optie 1).
- Gebruik !revbank tr_xxxx waarbij tr_xxxx de code is die je na het betalen kreeg.
Implementatie
script: undefined
script --> irc_user: error message note across: stop end
auth --> script: username script -> revbank: tr_xxxx username activate revbank revbank -> backend: tr_xxxx activate backend backend -> mollie: get payment mollie --> backend: payment backend -> backend: validate payment status
group#eee unknown, unpaid, or used voucher code backend --> revbank: error message revbank --> script: error message script --> irc_user: error message note across: stop end
backend -> mollie: update metadata:\nrevbank_status = pending
backend --> revbank: amount
deactivate backend
revbank -> revbank: checkout
revbank -> backend: finalize
activate backend
backend -> mollie: update metadata:\nrevbank_status = spent
deactivate backend
revbank --> script: new balance
deactivate revbank
script --> irc_user: new balance
deactivate script
@enduml
END -->