summaryrefslogblamecommitdiffstats
path: root/donate/index.html
blob: 71f77c753709d46b2986acefdcc7b56a2c128525 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12


                
                                                                             







                                                                                          
                                                                                                                                          




























































                                                                                                              


























                                                                                                                                                                                                                                              




































                                                                                                                                                                                                                                                 
<!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 type="text/javascript" src="https://checkout.stripe.com/checkout.js"></script>
    <script type="text/javascript" src="https://www.google.com/recaptcha/api.js?render=6LdGJp4UAAAAAOSO_ptuZSe-ZBRDZ0UUl47IulUu"></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" />
  </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">Donate</a></li>
      </ul>
      <p style="clear:both;"></p>
    </div>
    <div id="contents">
<h1>Donations</h1>
<p>
  There are different ways to support calcurse development. If you are a
  programmer, one of the best ways to contribute is to <a href="/devel">submit
  patches</a> fixing bugs, adding features or improving overall code quality.
</p>
<p>
  We are also extremely grateful for donations which help us continue
  developing calcurse as open source software and are used to cover recurring
  costs, such as for our servers.
</p>
<p>
  We use <a href="https://stripe.com/checkout/">Stripe Checkout</a> to process
  payments. The Stripe Checkout payment form 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>. This email address can also be used if you have any questions
  regarding the donation process.
</p>
<p>
  Use one of the following links to donate...
</p>
<ul class="donate">
  <li><a href="javascript:openHandler(10, 'eur')">10&euro;</a></li>
  <li><a href="javascript:openHandler(20, 'eur')">20&euro;</a></li>
  <li><a href="javascript:openHandler(50, 'eur')">50&euro;</a></li>
  <li><a href="javascript:openHandler(100, 'eur')">100&euro;</a></li>
  <li><a href="javascript:openHandler(10, 'usd')">$10</a></li>
  <li><a href="javascript:openHandler(20, 'usd')">$20</a></li>
  <li><a href="javascript:openHandler(50, 'usd')">$50</a></li>
  <li><a href="javascript:openHandler(100, 'usd')">$100</a></li>
  <li id="donate-custom"><a href="javascript:customHandler()">Custom</a></li>
</ul>
<div id="donate-status"></div>

<script>
var amount = 0;
var handler = StripeCheckout.configure({
  image: 'https://calcurse.org/images/logo-emblem.png',
  key: (location.search == '?test') ? 'pk_test_zNePe3wvpZ65O3nEeFq4QL2j' : 'pk_live_g0aFHViGhTkfSSCFmDCr5UI8',
  locale: 'auto',
  token: function(token) {
    grecaptcha.ready(function() {
      grecaptcha.execute('6LdGJp4UAAAAAOSO_ptuZSe-ZBRDZ0UUl47IulUu', {"action": "process_payment"}).then(function(recaptcha) {
        $.ajax({
          type: "POST",
          url: "/stripe",
          data: {
            "token": token.id,
            "email": token.email,
            "amount": amount,
            "currency": token.currency,
            "recaptcha": recaptcha,
            "test": (location.search == '?test'),
          },
          success: function(data) {
            if (data.success) {
              $("#donate-status").html('<h2>Thank you for your donation!</h2>');
            } else {
              $("#donate-status").html('<h2>Whoops, something went wrong!</h2><p class="error">There has been an error, and you have not been charged. Please try again or send an email to <tt>&lt;donations at calcurse dot org&gt;</tt>.');
              $("#donate-status h2").text(data.message);
            }
          },
          error: function(jqXHR, msg, err) {
            $("#donate-status").html('<h2>Whoops, something went wrong!</h2><p class="error">There has been an error, and you have not been charged. Please try again or send an email to <tt>&lt;donations at calcurse dot org&gt;</tt>.');
            $("#donate-status h2").text(msg + ", " + err);
          }
        });
      });
    });
  }
});

function openHandler(val, currency) {
  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 * 100) | 0;
  handler.open({
    name: 'Donation',
    description: 'Support calcurse Development',
    currency: currency,
    amount: amount,
    allowRememberMe: false
  });
}

function customHandler() {
  $("#donate-custom").html('<input name="donate-amount" type="number" min="5" /> <select name="donate-currency"> <option value="eur">&euro;</option> <option value="usd">USD</option> </select> <a href="javascript:openHandler(0)">Donate</a>');
  $("input[name=donate-amount]").focus();
}

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>