summaryrefslogtreecommitdiffstats
path: root/donate/index.html
blob: aa6c6dfb90c33a210c595ab3671c464eff34a27b (plain) (blame)
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
<!DOCTYPE html>
<html lang="en">
  <head>
    <title>calcurse: a text-based calendar and scheduling application</title>

    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
    <meta http-equiv="Content-Style-Type" content="text/css" />
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <script type="text/javascript" src="/js/jquery-1.7.2.min.js"></script>
    <script type="text/javascript" src="/js/lightbox.js"></script>
    <script src="https://js.stripe.com/v3/"></script>

    <link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="/css/style.css" media="all" />
    <link rel="stylesheet" type="text/css" href="/css/lightbox.css" media="screen" />
    <link rel="shortcut icon" type="image/png" href="/images/logo-circle.png"/>
  </head>

  <body>
    <div id="header" class="typeface-js">
      <a href="/"><img src="/images/logo.png" alt="calcurse" /></a>
      <ul>
        <li><a href="/">About</a></li>
        <li><a href="/downloads">Downloads</a></li>
        <li><a href="/support">Support</a></li>
        <li><a href="/devel">Development</a></li>
        <li><a href="/donate" class="current"><span class="heart">&#x2764</span> Donate</a></li>
      </ul>
      <p style="clear:both;"></p>
    </div>
    <div id="contents">
<h1>Donate</h1>
<p>
  You can support calcurse development in many different ways. If you know how
  to code, one of the best ways to contribute is to <a href="/devel">submit
  patches</a> fixing bugs, adding features or improving overall code quality.
  We are also extremely grateful for donations. These donations are used to
  cover recurring costs, such as for our servers, and help us continue
  developing calcurse as open source software.
</p>
<div style="text-align:center;">
  <ul class="donate-list">
    <li><a href="javascript:openHandler(15, 'eur')">15&euro;</a></li>
    <li><a href="javascript:openHandler(25, 'eur')">25&euro;</a></li>
    <li><a href="javascript:openHandler(50, 'eur')">50&euro;</a></li>
    <li class="sp"><a href="javascript:openHandler(100, 'eur')">100&euro;</a></li>
    <li><a href="javascript:openHandler(15, 'usd')">$15</a></li>
    <li><a href="javascript:openHandler(25, 'usd')">$25</a></li>
    <li><a href="javascript:openHandler(50, 'usd')">$50</a></li>
    <li class="sp"><a href="javascript:openHandler(100, 'usd')">$100</a></li>
    <li><a href="javascript:customHandler('eur')">Custom</a></li>
  </ul>
  <ul class="donate-list" id="donate-custom">
    <li class="sp"><a href="javascript:closeCustomHandler()" style="font-size:30px; padding:0 20px;">&#x2B05;</a></li>
    <li>
      <div class="donate-box">
        <div>
          <input name="donate-amount" type="number" min="5" value="50" />&nbsp;<select name="donate-currency"><option value="eur">&euro;</option><option value="usd">USD</option></select>
        </div>
      </div>
    </li>
    <li><a href="javascript:openHandler(0)">Donate</a></li>
  </ul>
  <div id="donate-status"></div>
</div>
<p>
  We use <a href="https://stripe.com/checkout/">Stripe Checkout</a> to process
  payments. The payment process requires a modern browser with JavaScript
  support. If you would like to make a donation but do not want to use Stripe,
  feel free to contact us at <tt>&lt;donations at calcurse dot org&gt;</tt>.
  Please also use this email address if you have any questions regarding the
  donation process.
</p>
<p>
  Note that due to repeated abuse of our donations form for fraudulent
  <a href="https://support.stripe.com/questions/card-testing-overview">card testing</a>,
  we no longer offer the option to donate less than 15&euro; (or $15). If you
  want to make a smaller donation, feel free to contact us using the email
  address from the previous paragraph.
</p>

<script>
function openHandler(val, currency) {
  var key, sku, quantity = 1;

  if (val == 0) {
    val = Number($("input[name=donate-amount]").val());
    val = Math.max(val, 5);
    $("input[name=donate-amount]").val(val);
    currency = $("select[name=donate-currency]").val();
   }
   amount = val | 0;

  if (location.search == '?test') {
    key = 'pk_test_zNePe3wvpZ65O3nEeFq4QL2j';
    if (amount == 15  && currency == 'eur') { sku = 'sku_FCzblNv0bYaoQI'; }
    else if (currency == 'eur') { sku = 'sku_FCzhhakpezzfNM'; quantity = amount; }
  } else {
    key = 'pk_live_g0aFHViGhTkfSSCFmDCr5UI8';
    if (amount == 15  && currency == 'eur') { sku = 'sku_FCzFTZCpwz8JIC'; }
    else if (amount == 25  && currency == 'eur') { sku = 'sku_FCzFJ8F1Rk05zV'; }
    else if (amount == 50  && currency == 'eur') { sku = 'sku_FCzEbnD8412915'; }
    else if (amount == 100 && currency == 'eur') { sku = 'sku_FCzGvr7QbVAfT1'; }
    else if (currency == 'eur') { sku = 'sku_FCzoJb3BhiYq5o'; quantity = amount; }
    else if (amount == 15  && currency == 'usd') { sku = 'sku_FCzGO4XmG0KR5e'; }
    else if (amount == 25  && currency == 'usd') { sku = 'sku_FCzGsXx3auV8Wx'; }
    else if (amount == 50  && currency == 'usd') { sku = 'sku_FCzGqqQ4XTm6H6'; }
    else if (amount == 100 && currency == 'usd') { sku = 'sku_FCzGnScoElSBYd'; }
    else if (currency == 'usd') { sku = 'sku_FCzomymP9IL7Sj'; quantity = amount; }
  }

  var stripe = Stripe(key);
  stripe.redirectToCheckout({
    items: [ { sku: sku, quantity: quantity } ],
    successUrl: 'https://calcurse.org/donate/success/',
    cancelUrl: 'https://calcurse.org/donate/canceled/',
  }).then(function (result) {
    if (result.error) {
      var displayError = document.getElementById('error-message');
      displayError.textContent = result.error.message;
    }
  });
}

function customHandler(currency) {
  $(".donate-list").hide();
  $("#donate-custom").css('display', 'inline-flex');
  $("input[name=donate-amount]").focus();
  $("input[name=donate-amount]").select();
  $("select[name=donate-currency]").val(currency);
}

function closeCustomHandler() {
  $(".donate-list").css('display', 'inline-flex');
  $("#donate-custom").hide();
}

window.addEventListener('popstate', function() {
  handler.close();
});
</script>
    </div>
    <div id="footer">
      Copyright &copy; 2012-2018 <a href="/support/#devs">calcurse Development Team</a>.
      Licensed under the terms of the BSD License.
    </div>
  </body>
</html>