<!DOCTYPE html>
<html lang="en">
  <head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link href="/css/bootstrap.min.css" rel="stylesheet">
    <link href="/fontawesome/css/fontawesome.css" rel="stylesheet" />
    <link href="/fontawesome/css/solid.css" rel="stylesheet" />
    <title>Buy</title>
  </head>
  <body>
    {{ template "nav.html" . }}
    <div class ="container">
      <div class ="text-center mt-5">
        <h1 class="mb-3">To complete the registration of <i class="text-primary">{{.label}}</i>:</h1>

        {{if .orderUnpaid}}
        <a class="link-dark" href="{{.payto}}" class="btn btn-success mb-3">Pay {{.cost}} with your Taler wallet</a><br/>
        Alternatively, you can pay using your mobile wallet by scanning the QR code below:<br/>
        <img class="qr" src="{{.qrCode}}"/>
        {{else}}
        <b>Pay {{.cost}} with your Taler wallet. The order has already been claimed by your wallet. Please complete the payment now.</b>
        {{end}}
        <br/>
      </div>
      <div class="alert alert-warning">
        <h4>Important</h4>
        After you pay with a mobile wallet, you should be redirected automatically. If not, you can visit <a class="link-dark" href="{{.fulfillmentUrl}}">your registration management page</a> directly.
        <br/>
        Your unique registration identifier is <b>{{.registrationId}}</b>.
        <br/>
        We recommend that you save this identifier, for example by printing this page.
      </div>
      <hr/>
      <a class="btn btn-secondary" href="/">Back</a>
    </div>
    {{ template "footer.html" . }}
  </body>
</html>
