Commit f3c1f193 authored by Karl Hasselbring's avatar Karl Hasselbring

Added bitpay as a donation method

parent e0282834
function bitpayCheckRequiredFields(form) {
var elements = form.elements;
var invalid = false;
for (var i = 0; i < elements.length; i++) {
elements[i].className = elements[i].className.replace('bitpay-donate-error', '');
if (elements[i].className.indexOf("required") !== -1 && elements[i].value.length < 1) {
elements[i].className = elements[i].className + ' bitpay-donate-error';
invalid = true;
if (invalid) {
return false;
var donationElement = document.getElementById('donation-value');
if (donationElement) {
var enteredDonation = Number(donationElement.value);
var maximumDonation = Number(document.getElementById('reference-maximum').value);
if (enteredDonation > maximumDonation) {
alert("Your donation was larger than the allowed maximum of " + Number(maximumDonation).toFixed(2))
return false;
return true;
\ No newline at end of file
return [
'amount' => 'Betrag',
This diff is collapsed.
...@@ -294,6 +294,7 @@ summary { ...@@ -294,6 +294,7 @@ summary {
>* { >* {
width: 50%; width: 50%;
margin: 0; margin: 0;
padding: 0;
float: left; float: left;
@media (max-width: @screen-mobile) { @media (max-width: @screen-mobile) {
width: 100%; width: 100%;
...@@ -417,4 +418,11 @@ label a { ...@@ -417,4 +418,11 @@ label a {
// For Elements where newlines should actually be displayed // For Elements where newlines should actually be displayed
.wrap { .wrap {
white-space: pre-wrap; white-space: pre-wrap;
// When the content should be centerd horizontally
.center-wrapper {
display: flex;
flex-direction: column;
align-items: center;
} }
\ No newline at end of file
...@@ -19,4 +19,5 @@ ...@@ -19,4 +19,5 @@
@import "./parts/modals.less"; @import "./parts/modals.less";
@import "./parts/searchbar.less"; @import "./parts/searchbar.less";
@import "./parts/settings.less"; @import "./parts/settings.less";
@import "./parts/sidebar.less"; @import "./parts/sidebar.less";
\ No newline at end of file @import "./parts/bitpay.less";
\ No newline at end of file
.bitpay-donate {
margin: 20px 0;
fieldset {
border: 0;
.field-input {
color: #666;
background: #fff;
border: 1px solid #eee;
height: 30px;
box-sizing: border-box;
flex-grow: 1;
.field-input-wrapper {
display: inline-flex;
float: none;
width: 80%;
input {
padding: 4px 10px;
select {
padding: 3px 10px;
.bitpay-donate-button {
padding: 12px 0;
width: 188px;
box-sizing: border-box;
li {
padding: 0;
margin: 0;
list-style: none;
li {
padding: 10px 0;
.bitpay-donate-field {
clear: both;
label {
float: left;
width: 100px;
div {
float: left;
.bitpay-donate-field-email {
width: 80%;
.bitpay-donate-field-price {
width: 40%;
.bitpay-donate-field-currency {
width: 40%;
.bitpay-donate-button-wrapper {
clear: both;
margin: auto;
text-align: center;
input.bitpay-donate-error {
border: 2px solid red;
\ No newline at end of file
<form class="bitpay-donate" action="" method="post" onsubmit="return bitpayCheckRequiredFields(this);" target="_blank">
<input name="action" type="hidden" value="checkout">
<li class="bitpay-donate-field">
<label>{{ trans('bitpay.amount') }}</label>
<div class="field-input-wrapper">
<input class="bitpay-donate-field-price field-input" name="price" type="number" value="10.00" placeholder="{{ trans('bitpay.amount') }}" maxlength="10" min="1" step="0.01"/>
<select class="bitpay-donate-field-currency field-input" name="currency" value="">
<option selected="selected" value="USD">USD</option>
<option value="BTC">BTC</option>
<option value="EUR">EUR</option>
<option value="GBP">GBP</option>
<option value="AUD">AUD</option>
<option value="BGN">BGN</option>
<option value="BRL">BRL</option>
<option value="CAD">CAD</option>
<option value="CHF">CHF</option>
<option value="CNY">CNY</option>
<option value="CZK">CZK</option>
<option value="DKK">DKK</option>
<option value="HKD">HKD</option>
<option value="HRK">HRK</option>
<option value="HUF">HUF</option>
<option value="IDR">IDR</option>
<option value="ILS">ILS</option>
<option value="INR">INR</option>
<option value="JPY">JPY</option>
<option value="KRW">KRW</option>
<option value="LTL">LTL</option>
<option value="LVL">LVL</option>
<option value="MXN">MXN</option>
<option value="MYR">MYR</option>
<option value="NOK">NOK</option>
<option value="NZD">NZD</option>
<option value="PHP">PHP</option>
<option value="PLN">PLN</option>
<option value="RON">RON</option>
<option value="RUB">RUB</option>
<option value="SEK">SEK</option>
<option value="SGD">SGD</option>
<option value="THB">THB</option>
<option value="TRY">TRY</option>
<option value="ZAR">ZAR</option>
<input type="hidden" name="data" value="7vfsM4tlJTE54JMpsAbG/vza+uhjCUlwTLyNfRIxcXxYZKp0AjWMJdRX/EiOkwvyysCmCtCJew937VQ3e+/NxT79NJMGmDwDFTXOA1P8NSMf2J4skBfMzOVYxEdM5CRiT9M9T+JOpZZUQGD8OVEJ5QbZavJKM/x+5TCagn/l6v9tEOIQrt4t0Qh4qs3GpZlqI0vmyNs+/fNnfdvrI512wBU0dTwM9Qi2+D18wUn2CfvjICMFhKF+j1N9nhow7tjs">
<div class="bitpay-donate-button-wrapper">
<input class="bitpay-donate-button" name="submit" src="/meta/picture?" onerror="this.onerror=null; this.src='/meta/picture?'" type="image" alt="BitPay, the easy way to pay with bitcoins.">
<script src="{{ mix('js/bitpay.js') }}"></script>
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<p><i class="fa fa-info fa-fw fa-lg" aria-hidden="true"></i>{!! trans('spende.bankinfo.3') !!}</p> <p><i class="fa fa-info fa-fw fa-lg" aria-hidden="true"></i>{!! trans('spende.bankinfo.3') !!}</p>
</div> </div>
<div class="two-col"> <div class="two-col">
<div> <div class="col-left">
<div class="card-medium"> <div class="card-medium">
<h3 id="lastschrift">{!! trans('spende.lastschrift.1') !!}</h3> <h3 id="lastschrift">{!! trans('spende.lastschrift.1') !!}</h3>
<p>{!! trans('spende.lastschrift.2') !!}</p> <p>{!! trans('spende.lastschrift.2') !!}</p>
...@@ -47,36 +47,39 @@ ...@@ -47,36 +47,39 @@
</form> </form>
</div> </div>
</div> </div>
<div> <div class="col-right">
<div class="card-medium"> <div class="card-medium">
<h3>{!! trans('spende.bankinfo.1') !!}</h3> <h3>{!! trans('spende.bankinfo.1') !!}</h3>
<p>{!! trans('spende.bankinfo.2') !!}</p> <p>{!! trans('spende.bankinfo.2') !!}</p>
</div> </div>
<div class="card-medium"> <div class="card-medium">
<h3>{!! trans('spende.paypal.1') !!}</h3> <h3>{!! trans('spende.paypal.title') !!}</h3>
<form action="" method="post"> <p>{!! trans('spende.paypal.subtitle') !!}</p>
<input name="cmd" value="_xclick" type="hidden"> <div class="center-wrapper">
<input name="business" value="" type="hidden"> <form action="" method="post">
<input name="item_name" value="SuMa-eV Spende" type="hidden"> <input name="cmd" value="_xclick" type="hidden">
<input name="buyer_credit_promo_code" value="" type="hidden"> <input name="business" value="" type="hidden">
<input name="buyer_credit_product_category" value="" type="hidden"> <input name="item_name" value="SuMa-eV Spende" type="hidden">
<input name="buyer_credit_shipping_method" value="" type="hidden"> <input name="buyer_credit_promo_code" value="" type="hidden">
<input name="buyer_credit_user_address_change" value="" type="hidden"> <input name="buyer_credit_product_category" value="" type="hidden">
<input name="no_shipping" value="0" type="hidden"> <input name="buyer_credit_shipping_method" value="" type="hidden">
<input name="no_note" value="1" type="hidden"> <input name="buyer_credit_user_address_change" value="" type="hidden">
<input name="currency_code" value="EUR" type="hidden"> <input name="no_shipping" value="0" type="hidden">
<input name="tax" value="0" type="hidden"> <input name="no_note" value="1" type="hidden">
<input name="lc" value="DE" type="hidden"> <input name="currency_code" value="EUR" type="hidden">
<input name="bn" value="PP-DonationsBF" type="hidden"> <input name="tax" value="0" type="hidden">
<input src="/img/paypalspenden.gif" name="submit" width="120" alt="{!! trans('spende.paypal.2') !!}" type="image"> <input name="lc" value="DE" type="hidden">
</form> <input name="bn" value="PP-DonationsBF" type="hidden">
<input src="/img/paypalspenden.gif" name="submit" width="120" alt="{!! trans('spende.paypal.2') !!}" type="image">
<div class="card-medium">
<h3>{{ trans('spende.bitpay.title') }}</h3>
</div> </div>
<div class="card-medium"> <div class="card-medium">
<p>{!! trans('spende.lastschrift.10') !!}</p> <p>{!! trans('spende.lastschrift.10') !!}</p>
</div> </div>
</div> </div>
</div> </div>
...@@ -69,6 +69,7 @@ mix ...@@ -69,6 +69,7 @@ mix
.babel("resources/js/focus-creator.js", "public/js/focus-creator.js") .babel("resources/js/focus-creator.js", "public/js/focus-creator.js")
.babel("resources/js/focus-creator.js", "public/js/focus-creator.js") .babel("resources/js/focus-creator.js", "public/js/focus-creator.js")
.babel("resources/js/editLanguage.js", "public/js/editLanguage.js") .babel("resources/js/editLanguage.js", "public/js/editLanguage.js")
.babel("resources/js/bitpay.js", "public/js/bitpay.js")
// utility // utility
.babel( .babel(
["resources/js/utility.js", "resources/js/translations.js"], ["resources/js/utility.js", "resources/js/translations.js"],
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment