aboutsummaryrefslogtreecommitdiff
path: root/doc/flows/int-pay.tex
blob: 2968c4c2e6235dceca012f5259c6109aefc80a3b (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
\section{Pay} \label{sec:pay}

\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[1]{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[1]{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}
    }}
    \newinst[1]{bank}{\shortstack{Merchant bank \\
      \\ \begin{tikzpicture}
        \node [fill=gray!20,draw=black,thick,align=center] {Commercial \\ Accounts};
      \end{tikzpicture}
    }}
    \postlevel
    \mess[0]{wallet}{Browse catalog}{merchant}
    \mess[0]{merchant}{Commercial offer}{wallet}
    \begin{callself}{wallet}{Review offer}{}
    \end{callself}
    \mess[0]{wallet}{Pay {(Coins)}}{merchant}
    \mess[0]{merchant}{Deposit {(Coins)}}{exchange}
    \begin{sdblock}{Acceptable account?}{}
    \mess[0]{exchange}{{Refuse deposit}}{merchant}
    \mess[0]{merchant}{{Refund purchase}}{wallet}
    \end{sdblock}
    \mess[0]{exchange}{{Confirm deposit}}{merchant}
    \mess[0]{merchant}{Fulfill order}{wallet}
    \begin{callself}{exchange}{Aggregate transactions}{}
    \end{callself}
    \begin{sdblock}{KYC/AML required?}{}
    \begin{callself}{exchange}{Figures~\ref{fig:proc:kyc}, \ref{fig:proc:aml}}{}
    \end{callself}
    \end{sdblock}
    \mess[0]{exchange}{{Initiate transfer}}{bank}
  \end{sequencediagram}
  \caption{Payments from a customer to merchant result in
    depositing coins at the Taler exchange (payment service provider)
    which then credits the merchant's bank account.
    The KYC/AML checks are described in Section~\ref{sec:kyc:deposit}}
  \label{fig:int:pay}
\end{figure}

{\bf Internal note:} The exchange refusing a deposit immediately based on
unaccaptable merchant accounts may not be fully implemented (this is a very
recent feature, after all); especially the merchant then automatically
refunding the purchase to the customer is certainly missing.  However,
the entire situation only arises when a merchant is incorrectly configured
and in violation of the terms of service.