Giter Club home page Giter Club logo

bitcoin-pos-php's Introduction

#PHP Bitcoin Point of Sale ####Customized for Cafe Aunja, Montreal

Some features:

  • Easy to install (PHP and MySQL)
  • Real-time BTC/CAD(/USD) conversion
  • Uses Blockchain.info and Blockexplorer API (No need for Bitcoind)
  • Generates a new address for each transaction (Privacy Preserved)
  • RSA Encrypted private keys
  • Report page for the merchant, with showing the sales price and the realtime price of bitcoin amount
  • Admin page to decrypt and export the private keys associated with the addresses that holds a balance in MultiBit.key format

Open source projects used:


Installation

  1. Download this repo and upload it to your webserver
  2. Create the MySQL database with the same schema as the one in DB_SCHEMA.sql and assign the DB user/password
  3. Edit sci/config.php and sci/dbconnet.php
  4. Make sure to set admin/report/superadmin password and also Database credentials
  5. Security String can be ANY 16 characters or more.
  6. Leave PUBLIC RSA Key alone at this point. (We will come back to it)
  7. Save and upload config.php and dbconnect.php
  8. visit URL/sci/admin.php
  9. Login with your admin password from config.php
  10. Click RSA KeyGen. Save the private key offline in a safe place, put the public key in config.php
  11. (Optional) Add your logo to /sci/img/logo.jpg (or change the refrence in /css/main.css) Done!

Some clarifications on the admins:

sci/admin.php to be used on the first time to generate the RSA keys, and also in case you want to decrypt or check balance any specific address

sci/report.php A simple report page that shows all the confirmed transactions in the database

alt text

sci/superadmin.php Almost same as report.php but has the option to rescan the whole database to check the balances or just checks the temporary table to see if there was any transactions that has not been added to the final table, also you can extract all the bitcoin private keys assosiated with the addresses that has balance in them with MultiBit.key style. You can easily save the output in a .key file and import it in MultiBit or import it in blockchain.info.


Most of the core functionality is from Bitcoin SCI by Jacob Bruce. Some notes by bitfreak group:

The Bitcoin Shopping Cart Interface package is a set of libraries and tools that enable you to process bitcoin tansactions with only PHP. You can have your own Instant Payment Notification system without the need for a middleman. If you've been wondering how to handle customer payment since MyBitcoin went down, look no further, because this is the safest solution.

An elliptic curve library written in PHP is used to achieve server side generation of FRESH bitcoin addresses for each customer. The script monitors the status of a payment by making use of the data supplied by blockexplorer.com. As such, there is no need to install a heavy duty service such as bitcoind on your server. The only limitation with this PHP package is that you can't make outgoing payments.

The bitcoin private keys are now encrypted using RSA public-key cryptography technology. This means that the bitcoins keys are encrypted with a public RSA key, but they can only be decrypted with a private RSA key. So even if a hacker gains access to your bitcoin keys, they wont be able to decrypt that data unless they have your private RSA key. You can manage your keys by visiting the sci/admin.php script.

The SCI package comes with a simple example to give you an idea about how to generate new keys and initiate a new payment through the Bitcoin Payment Gateway. This is NOT full shopping cart software, you would typically use this script to offer Bitcoins as one method of payment. The sci/config.php file needs to be modified to work properly on your website. You may also need to customize the following files:

sci/process-order.php and sci/ipn-control.php

Note: PHP 5.3 or later (earlier versions of PHP should work but will not support alt-coins) NOTE: if you do not have 5.3 installed and wish to use BitcoinSCI, open up lib/bitcoin.lib.php and change line 38 and 42 from return static:: to return self:: PHPExtension BCMath must be installed (most webhosts have it enabled by default)


Screenshots

alt text

alt text

alt text


This project was done to meet client's requirments, most of the funtionalities have the potencial to be a lot more complete or have another model for implementation (such as admin/report view)

Contributions are more than welcome.

1ARH4G6BCKM8xoFucEtaKP3Vq5Ahr7dqcv

Todo's

  • Fast Confirmation, check blockchain.info API with Z0ro confirmation (who is going to do a successful double spend for a coffee?)
  • One complete admin panel, preferebly with a seperate report page
  • Nicer User Interface
  • BIP32 for address generation

License

GNU General Public License v2 (GPL-2)

You may copy, distribute and modify the software as long as you track changes/dates of in source files and keep all modifications under GPL. You can distribute your application using a GPL library commercially, but you must also disclose the source code.

bitcoin-pos-php's People

Contributors

geopayme avatar shayanb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bitcoin-pos-php's Issues

Issue can be deleted

I edited this issue to remove cryptocurrency adspam. My account was used by a bad actor because of a leaked access token. This bad actor created lots of issues with cryptocurrency adspam. I am sorry. Sadly I can only update issues, not delete them.

Question on wif-keys.csv

I was curious, where is this file created, since I do not see any comments, but when I use the admin section to read keys I get the message that "Your wif-keys.csv file does not exist."

What keys are kept in the file? Private or Public?

Any thoughts?

Issue can be deleted

I edited this issue to remove cryptocurrency adspam. My account was used by a bad actor because of a leaked access token. This bad actor created lots of issues with cryptocurrency adspam. I am sorry. Sadly I can only update issues, not delete them.

Question

How are the values in the altcoins.lib.php are derived?

If I wanted to add the DOGE coin or other coins...

Incomplete Transaction Question

Since I had the error from my previous posting, I see this message, when I click on the link to complete the transaction I receive this error "No input file specified."

I am sure the message is handled by a cookie that can be deleted, is there a place to see incomplete transactions? or all of it is related to the previous posted error about the incomplete transaction.

btc-error

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.