Skip to content

Commit

Permalink
nano alias
Browse files Browse the repository at this point in the history
  • Loading branch information
nano2dev committed Mar 19, 2024
1 parent 55fbefe commit aba3e2f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
26 changes: 13 additions & 13 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -460,20 +460,20 @@ <h1 class="smaller">NanoPay.js</h1>
setTimeout(() => {

NanoPay.open({
address: '@development', // required
alias: true, // required
// amount: 30, // required
notify: 'support@nano.to',
contact: true,
// 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 }
],
shipping: 0.011,
// notify: 'support@nano.to',
// contact: true,
// // 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 }
// ],
// shipping: 0.011,
// currency: 'EUR',
success: (block) => {
document.getElementById('success').innerText = 'Success'
Expand Down
4 changes: 3 additions & 1 deletion latest.js
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,9 @@
})
}

if (rpc_checkout && rpc_checkout.id) localStorage.setItem('NanoPayCheckoutId', rpc_checkout.id)
// needs more testing
// goal is to prevent un-intentional browser refresh from breaking checkout flow
// if (rpc_checkout && rpc_checkout.id) localStorage.setItem('NanoPayCheckoutId', rpc_checkout.id)

}

Expand Down

0 comments on commit aba3e2f

Please sign in to comment.