Crypto uid

Comment

Author: Admin | 2025-04-28

Is to attach the widget to a button onclick function, so that when clicks Pay with Bitcoin, he is shown the widget having payment details. Note that here we already have customer email details in our session so it is supplied directly to the widget via function callPay with Bitcoin function pay() { Blockonomics.widget({ msg_area: 'payment_area', uid: 'e4e70ddd65494fa6', email: '[email protected]' }); } document.getElementById('pay').onclick = function() { pay() };Fetch the customer email from an inputWe can collect the customers email from an input field, session or cookie as in the example below.Pay with Bitcoin function pay() { var email = document.getElementById('email').value; Blockonomics.widget({ msg_area: 'bitcoinpay', uid: 'e4e70ddd65494fa6', email: email }); } document.getElementById('pay').onclick = function() { pay() };Supply a quantity or amountQuantity:We can supply a quantity to the payment widget to allow users to order more than one item. The quantity field must be checked from your product settings on Blockonomics. Blockonomics.widget({ msg_area: 'blockonomics_widget', uid: 'e4e70ddd65494fa6', email: '[email protected]', quantity: 2 });Amount:We can also alternatively supply an amount to pay via the amount field (This only applies in donation mode). Blockonomics.widget({ msg_area: 'blockonomics_widget', uid: 'e4e70ddd65494fa6', email: '[email protected]', amount: 20 });Add any custom dataWe can supply any custom data to the order using the extra_data parameter. This is useful for adding customer user id's or special order notes. Blockonomics.widget({ msg_area: 'blockonomics_widget', uid: 'e4e70ddd65494fa6', email: '[email protected]', extra_data: 'user10' });The Payment Widget can be loaded asynchronously, which means that it does not block loading other elements of your page. The function assigned to

Add Comment