aboutsummaryrefslogtreecommitdiff
path: root/doc/flows/int-refund.tex
blob: 3f11e5600691fc02a7b7edca6025f02e00a840a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
\section{Refund}

\begin{figure}[h!]
  \begin{sequencediagram}
    \newinst{wallet}{\shortstack{Customer wallet \\
      \\ \begin{tikzpicture}
        \node [fill=gray!20,draw=black,thick,align=center] { Unique \\ Wallet ID};
      \end{tikzpicture}
    }}
    \newinst[2]{merchant}{\shortstack{Merchant \\
       \\ \begin{tikzpicture}[shape aspect=.5]
        \tikzset{every node/.style={cylinder,shape border rotate=90, draw,fill=gray!25}}
        \node at (1.5,0) {\shortstack{{{\tiny Database}}}};
       \end{tikzpicture}
    }}
    \newinst[2]{exchange}{\shortstack{Taler (exchange) \\
       \\ \begin{tikzpicture}[shape aspect=.5]
        \tikzset{every node/.style={cylinder,shape border rotate=90, draw,fill=gray!25}}
        \node at (1.5,0) {\shortstack{{{\tiny Database}}}};
       \end{tikzpicture}
    }}
    \postlevel
    \begin{callself}{merchant}{Initiate refund}{}
    \end{callself}
    \mess[0]{merchant}{{Refund offer (QR code)}}{wallet}
    \mess[0]{wallet}{Download refund}{merchant}
    \mess[0]{merchant}{Approve refund}{exchange}
    \mess[0]{exchange}{Confirm refund}{merchant}
    \mess[0]{merchant}{Return refund confirmation}{wallet}
  \end{sequencediagram}
  \caption{Refund processing when a merchant is unable to fulfill
    a contract.  Refunds must happen {\em before} the
    exchange has aggregated the original transaction for
    a bank transfer to the merchant. Furthermore, refunds
    can only go to the customer who made the original payment
    and the refund cannot exceed the amount of the original
    payment.}
  \label{fig:int:refund}
\end{figure}