GithubHelp home page GithubHelp logo

deanb1982 / rezin-checkout Goto Github PK

View Code? Open in Web Editor NEW

This project forked from benjaminmoe/trtlcheckout

0.0 0.0 0.0 3.31 MB

A Sample Page for Checking Out with TurtleCoin

License: MIT License

JavaScript 77.99% CSS 9.32% HTML 12.69%

rezin-checkout's Introduction

TrtlCheckout

This repository provides a sample page for providing an online checkout, powered by TurtlePay.

Screenshot 2021-06-24 at 16-45-10 Shell Shop

Live Version

https://shellshop.lol/

How to Use

This is a simple page that was created for a proof of concept to use Turtlecoin as a payment option for online checkout. To complete the payment process, click on the 'Checkout' button, scan the QR code with the TonChan wallet, and send the amount. From there confirmation of the payment will take anywhere from two to five minutes. After which, your download will start automatically.

How to Replicate

To replicate this repository, clone on a Linux computer running Nodejs. Run npm install to install the requires modules to run the application. In the TrtlCheckout.js change the addr variable to your wallet address, and change the view variable to your private view key. And then finally run node on the TrtlCheckout.js file to run the web server to run the example store application.

Limitations

The limitations of this checkout method if you have no control over if and when the QR code has been read by the end user. Right now this would rely on honest reporting from an end user to click a button that said, "i scanned the QR code", or "I sent the payment", to change the state of the checkout modal from a QR code to a waiting spinner for the callback from Turtlepay. This could potentially be amended by adding in webhooks to the wallet application in some shape or form to let the checkout application know the state and intention of the end-user to be able to respond accordingly.

Another assumption is made with respects to timing. The Turtlepay API provides multiple callbacks for the number of confirmations a transaction has before finally providing a final callback for the transaction to complete. At minimum, the first callback seems to take about two minutes, and for the default 60 confirmations, the final callback will take a lot longer. This checkout makes the assumption that once the transaction is in the pipeline, it will eventually be verified. it is not known if this can cause complications with transactions that might somehow get rejected later.

The alternative for smoother or faster payments would be for the store or another trusted service to host their own wallets. The shop could query the service for the user's balance and approval. The user would give their approval, likely via some form of second factor authorization, such as a code sent to their phone or a future perfect password. And then that service would provide a 'promise' to the shop. The shop would complete the sale, and the wallet service would provide the actual transfer at a later time.

License

MIT License 2021 Benjamin Collins

rezin-checkout's People

Contributors

benjaminmoe avatar

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.