-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
11 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -463,10 +463,12 @@ <h1 class="smaller">NanoPay.js</h1> | |
address: '@development', // required | ||
// amount: 30, // required | ||
notify: '[email protected]', | ||
// debug: true, | ||
contact: true, | ||
// button: "Open Cake", | ||
// wallet: "cake", | ||
// random: false, | ||
strings: { | ||
email_placeholder: 'Required *', | ||
shipping_placeholder: 'Required *', | ||
}, | ||
line_items: [ | ||
{ name: "Shirt (X-Small)", price: 0.122 }, | ||
{ name: "Mens Shoes (9.5)", price: 0 } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// NanoPay 1.1.1 | ||
// NanoPay 1.1.2 | ||
// February 28, 2024 | ||
// https://github.com/fwd/NanoPay | ||
// (c) @nano2dev <[email protected]> | ||
|
@@ -14,7 +14,7 @@ | |
window.check_interval = false | ||
window.expiration_interval = false | ||
|
||
if (window.NanoPay === undefined) window.NanoPay = { version: '1.1.1', support: '[email protected]' } | ||
if (window.NanoPay === undefined) window.NanoPay = { version: '1.1.2', support: '[email protected]' } | ||
|
||
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) { | ||
window.NanoPay.dark_mode = true | ||
|
@@ -337,6 +337,8 @@ | |
quantity: config.strings && config.strings.quantity ? config.strings.quantity : 'Amount', | ||
alias: config.strings && config.strings.alias ? config.strings.alias : 'Your Name', | ||
account: config.strings && config.strings.account ? config.strings.account : 'Account', | ||
email_placeholder: config.strings && config.strings.email_placeholder ? config.strings.email_placeholder : 'N/A', | ||
shipping_placeholder: config.strings && config.strings.shipping_placeholder ? config.strings.shipping_placeholder : 'N/A', | ||
} | ||
|
||
if (!wallets[wallet]) return alert("NanoPay: Invalid wallet option. Supported: natrium, nault, nautilus, cake.") | ||
|
@@ -570,13 +572,13 @@ | |
<div style="display: ${config.contact ? 'flex' : 'none'}" onclick="window.NanoPay.configEmailAddress()" id="nano-pay-contact"> | ||
<div id="nano-pay-contact-label">${strings.email}</div> | ||
<div id="nano-pay-user-contact-email" style="line-height: 1.1; opacity: ${window.NanoPay.config.contact_email ? '1' : '0.5'}">${window.NanoPay.config.contact_email || 'N/A'}</div> | ||
<div id="nano-pay-user-contact-email" style="line-height: 1.1; opacity: ${window.NanoPay.config.contact_email ? '1' : '0.5'}">${window.NanoPay.config.contact_email || strings.email_placeholder}</div> | ||
<svg id="Layer_1" version="1.1" viewBox="0 0 512 512" width="512px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><polygon points="160,115.4 180.7,96 352,256 180.7,416 160,396.7 310.5,256 "></polygon></svg> | ||
</div> | ||
<div style="display: ${Number(config.shipping) || config.shipping === true || config.shipping === "true" ? 'flex' : 'none'}" onclick="window.NanoPay.configMailingAddress()" id="nano-pay-shipping"> | ||
<div id="nano-pay-shipping-label">${strings.shipping}</div> | ||
<div id="nano-pay-user-mailing-address" style="line-height: 1.1; opacity: ${window.NanoPay.config.mailing_address ? '1' : '0.5'}">${window.NanoPay.config.mailing_address || 'N/A'}</div> | ||
<div id="nano-pay-user-mailing-address" style="line-height: 1.1; opacity: ${window.NanoPay.config.mailing_address ? '1' : '0.5'}">${window.NanoPay.config.mailing_address || strings.shipping_placeholder}</div> | ||
<svg id="Layer_1" version="1.1" viewBox="0 0 512 512" width="512px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><polygon points="160,115.4 180.7,96 352,256 180.7,416 160,396.7 310.5,256 "></polygon></svg> | ||
</div> | ||
|