Skip to content

Commit

Permalink
Update form. Separated icons. New payment page
Browse files Browse the repository at this point in the history
  • Loading branch information
leviothan committed Mar 27, 2018
1 parent 7a345ee commit 431292a
Show file tree
Hide file tree
Showing 8 changed files with 547 additions and 35 deletions.
34 changes: 34 additions & 0 deletions assets/form/widget.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
(function () {
var container = document.getElementById('paybear');
if (!container) {
return;
}
window.paybearWidget = new Paybear({
button: '#paybear-all',
fiatValue: parseFloat(container.getAttribute('data-fiat-value')),
currencies: JSON.parse(htmlDecode(container.getAttribute('data-currencies'))),
statusUrl: container.getAttribute('data-status'),
redirectTo: container.getAttribute('data-redirect'),
fiatCurrency: container.getAttribute('data-fiat-currency'),
fiatSign: container.getAttribute('data-fiat-sign'),
minOverpaymentFiat: container.getAttribute('data-min-overpayment-fiat'),
maxUnderpaymentFiat: container.getAttribute('data-max-underpayment-fiat'),
modal: true,
enablePoweredBy: false,
redirectPendingTo: container.getAttribute('data-redirect')
});

function htmlDecode(input){
var e = document.createElement('div');
e.innerHTML = input;
// handle case of empty input
return e.childNodes.length === 0 ? "" : e.childNodes[0].nodeValue;
}

var autoopen = container.getAttribute('data-autoopen');

if (autoopen && autoopen == 'true') {
document.getElementById('paybear-all').click();
}

})();
12 changes: 12 additions & 0 deletions assets/images/icons/bch.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions assets/images/icons/btc.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions assets/images/icons/dash.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
56 changes: 56 additions & 0 deletions assets/images/icons/eth.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions assets/images/icons/ltc.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 431292a

Please sign in to comment.