GithubHelp home page GithubHelp logo

brainblocks-android's Introduction

logo

<div id="nano-button"></div>

<script src="https://brainblocks.io/brainblocks.js"></script>

<script>
    // Render the Nano button

    brainblocks.Button.render({

        // Pass in payment options

        payment: {
            destination: 'nano_164xaa1ojy6qmq9e8t94mz8izr4mkf1sojb6xrmstru5jsif48g5kegcqg7y',
            currency:    'rai',
            amount:      1000
        },

        // Handle successful payments

        onPayment: function(data) {
            console.log('Payment successful!', data.token);
        }

    }, '#nano-button');
</script>
> curl https://brainblocks.io/api/session/<token>/verify

{
    "token": "ZXlKaGJHY...",
    "destination": "nano_164xa...",
    "currency": "rai",
    "amount": "1000",
    "amount_rai": 1000,
    "received_rai": 1000,
    "fulfilled": true,
    "send_block": "0B36663...",
    "sender": "nano_1jnat..."
}

Installation

Node module

# npm
npm install --save brainblocks

# yarn
yarn add brainblocks
import * as brainblocks from 'brainblocks'

Browser

<!-- From Brainblocks -->
<script src="https://brainblocks.io/brainblocks.js"></script>

<!-- From CDN -->
<script src="https://unpkg.com/brainblocks"></script>

<!-- Local file -->
<script src="brainblocks/dist/brainblocks.js"></script>

brainblocks-android's People

Contributors

alexmok avatar nareshvrao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

brainblocks-android's Issues

REQUEST: Let users change amount to send

Add option to let the user change the amount using a drop down menu or a slider. Use full screen height & width to avoid clutter.

This could be done in another window/another screen but IMO the less windows the better the user experience.

edit: doesn't make sense if QR code doesn't include amount

1.0E-4 XRB instead of 0.0001 NANO

First of all thank you for your amazing work.

  • 1.0E-4 is not user friendly IMO
  • The amount to pay text is a bit hidden in the upper left corner. The font is kind of small even on my 6.4 inch device
  • Still using XRB & Raiblocks instead of NANO & Nano

edit: title should say: instead of 0.0001 NANO

Recurrent Micropayments Possible?

I am trying to build an application which provides media content/stream on a per minute basis, I would like to take payments each minute, But i dont want the user to click on pay each time I ask for a payment. Is there any functionality where a user can set a max limit they wanna pay and the app can automatically deduct from the wallet?
Or something similar is possible? Any comment is appreciated.

REQUEST: Add option to add hash code for identification

It would be great to be able to check at any time if a payment has already been made from a specific user. This could be done by adding an option to automatically refund the sender/user a small amount (numeric hash entered by app developer) to the sender address. Kind of how the system works now when you overpay.

For example: user pays 0.1 NANO
He automatically get a refund of 0.000000000000000052505352525048 NANO or 52505352525048 RAW

That hash in combination with the sender address and user id could later be used to verify a payment has been made which would be pretty awesome.

The problem might be that the current nodes don't accept transfers that small.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.