{"id":21241544,"url":"https://github.com/shayanb/bitcoin-pos-php","last_synced_at":"2025-07-10T20:31:06.062Z","repository":{"id":24711245,"uuid":"28122941","full_name":"shayanb/Bitcoin-PoS-PHP","owner":"shayanb","description":"PHP Bitcoin Point of Sale - Customized for Cafe Aunja, Montreal","archived":false,"fork":false,"pushed_at":"2016-01-11T21:21:24.000Z","size":695,"stargazers_count":22,"open_issues_count":1,"forks_count":21,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-04-05T17:11:06.327Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://ieeexplore.ieee.org/document/7816869/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shayanb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-12-17T05:38:07.000Z","updated_at":"2024-10-24T06:00:28.000Z","dependencies_parsed_at":"2022-08-17T17:05:12.514Z","dependency_job_id":null,"html_url":"https://github.com/shayanb/Bitcoin-PoS-PHP","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shayanb/Bitcoin-PoS-PHP","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shayanb%2FBitcoin-PoS-PHP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shayanb%2FBitcoin-PoS-PHP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shayanb%2FBitcoin-PoS-PHP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shayanb%2FBitcoin-PoS-PHP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shayanb","download_url":"https://codeload.github.com/shayanb/Bitcoin-PoS-PHP/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shayanb%2FBitcoin-PoS-PHP/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264652660,"owners_count":23644302,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-21T00:56:09.216Z","updated_at":"2025-07-10T20:31:04.858Z","avatar_url":"https://github.com/shayanb.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"#PHP Bitcoin Point of Sale \n####Customized for [Cafe Aunja], Montreal\n\n\nSome features:\n* Easy to install (PHP and MySQL)\n* Real-time BTC/CAD(/USD) conversion\n* Uses Blockchain.info and Blockexplorer API (No need for Bitcoind)\n* Generates a new address for each transaction (Privacy Preserved)\n* RSA Encrypted private keys\n* Report page for the merchant, with showing the sales price and the realtime price of bitcoin amount\n* Admin page to decrypt and export the private keys associated with the addresses that holds a balance in MultiBit.key format\n\n\n----------------------------------------\nOpen source projects used:\n* [Bitcoin SCI] : Bitcoin Shopping Card Interface (0.5.4 (beta))\n    -   [phpseclib]\n    -   [PHP Elliptic Curve library]\n* [Sweet Alert] : A Beautiful replacement for javascript's \"Alert\"\n* [bitcoin-prices] : Display bitcoin prices in human-friendly manner in fiat currency using bitcoinaverage.com market data\n\n------------------\nInstallation\n===\n1. Download this repo and upload it to your webserver\n2. Create the MySQL database with the same schema as the one in DB_SCHEMA.sql and assign the DB user/password\n3. Edit sci/config.php and sci/dbconnet.php\n  1. Make sure to set admin/report/superadmin password and also Database credentials\n  2. Security String can be ANY 16 characters or more.\n  3. Leave PUBLIC RSA Key alone at this point. (We will come back to it)\n  4. Save and upload config.php and dbconnect.php\n4. visit URL/sci/admin.php\n5. Login with your __admin__ password from config.php\n6. Click RSA KeyGen. Save the private key offline in a safe place, put the public key in config.php\n7. (Optional) Add your logo to /sci/img/logo.jpg (or change the refrence in /css/main.css)\nDone!\n\n----------------------------\nSome clarifications on the admins:\n\n**sci/admin.php**\nto 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\n\n**sci/report.php**\nA simple report page that shows all the confirmed transactions in the database\n\n![alt text](https://github.com/shayanb/Bitcoin-PoS-PHP/raw/master/docs/report.png \"Report Page\")\n\n**sci/superadmin.php**\nAlmost 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.\nYou can easily save the output in a .key file and import it in [MultiBit] or import it in blockchain.info.\n\n------------\nMost of the core functionality is from Bitcoin SCI by Jacob Bruce.\nSome notes by bitfreak group:\n\u003eThe 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.\n\n\u003eAn 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.\n\n\u003eThe 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.\n\n\u003eThe 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:\n\n\u003esci/process-order.php and \n\u003esci/ipn-control.php\n\n\u003e**Note:** PHP 5.3 or later (earlier versions of PHP should work but will not support alt-coins)\nNOTE: 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::\nPHPExtension BCMath must be installed (most webhosts have it enabled by default)\n\n----------------------------------------------\nScreenshots\n===\n![alt text](https://github.com/shayanb/Bitcoin-PoS-PHP/raw/master/docs/First_View.png \"First View - bitcoin-prices.js realtime price CAD/USD\")\n\n![alt text](https://github.com/shayanb/Bitcoin-PoS-PHP/raw/master/docs/Payment_View.png \"Payment View - Bitcoin SCI\")\n\n![alt text](https://github.com/shayanb/Bitcoin-PoS-PHP/raw/master/docs/Success_View.png \"Success View - SweetAlert\")\n\n-----------------------------------------------\nThis 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)\n\nContributions are more than welcome.\n\n1ARH4G6BCKM8xoFucEtaKP3Vq5Ahr7dqcv\n\n### Todo's\n\n - __Fast Confirmation__, check blockchain.info API with Z0ro confirmation (who is going to do a successful double spend for a coffee?)\n - One complete admin panel, preferebly with a seperate report page\n - Nicer User Interface\n - __BIP32__ for address generation\n\nLicense\n----\n\nGNU General Public License v2 (GPL-2)\n\nYou 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.\n\n[Bitcoin SCI]:http://bitfreak.info/?page=tools\u0026t=bitsci\n[Sweet Alert]:http://tristanedwards.me/sweetalert\n[phpseclib]:http://phpseclib.sourceforge.net/\n[PHP Elliptic Curve library]:http://matejdanter.com/\n[Cafe Aunja]:http://blog.theshayan.com/2014/10/23/have-your-coffee-with-bitcoin/\n[Multibit]: https://multibit.org/\n[bitcoin-prices]:https://github.com/miohtama/bitcoin-prices\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshayanb%2Fbitcoin-pos-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshayanb%2Fbitcoin-pos-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshayanb%2Fbitcoin-pos-php/lists"}