diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..d6783e2 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,33 @@ +# This is a basic workflow to help you get started with Actions + +name: CI + +# Controls when the action will run. Triggers the workflow on push or pull request +# events but only for the master branch +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + + # Runs a single command using the runners shell + - name: Run a one-line script + run: echo Hello, world! + + # Runs a set of commands using the runners shell + - name: Run a multi-line script + run: | + echo Add other actions to build, + echo test, and deploy your project. diff --git a/.history/_config_20200524140634.yml b/.history/_config_20200524140634.yml new file mode 100644 index 0000000..c419263 --- /dev/null +++ b/.history/_config_20200524140634.yml @@ -0,0 +1 @@ +theme: jekyll-theme-cayman \ No newline at end of file diff --git a/.history/_config_20200524145848.yml b/.history/_config_20200524145848.yml new file mode 100644 index 0000000..c419263 --- /dev/null +++ b/.history/_config_20200524145848.yml @@ -0,0 +1 @@ +theme: jekyll-theme-cayman \ No newline at end of file diff --git a/db.sql b/.history/db_20200524140634.sql similarity index 100% rename from db.sql rename to .history/db_20200524140634.sql diff --git a/.history/db_20200524183003.sql b/.history/db_20200524183003.sql new file mode 100644 index 0000000..7e26deb --- /dev/null +++ b/.history/db_20200524183003.sql @@ -0,0 +1,80 @@ +-- phpMyAdmin SQL Dump +-- version 4.0.10.7 +-- http://www.phpmyadmin.net +-- +-- Host: localhost +-- Generation Time: Nov 25, 2015 at 12:02 AM +-- Server version: 5.5.45-cll-lve +-- PHP Version: 5.4.23 + +SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; +SET time_zone = "+00:00"; + + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; + + + +-- -------------------------------------------------------- + +-- +-- Table structure for table `orders` +-- + +CREATE TABLE IF NOT EXISTS `orders` ( + `orderid` varchar(50) NOT NULL, + `time` int(100) NOT NULL, + `name` varchar(50) NOT NULL, + `address` varchar(100) NOT NULL, + `address2` varchar(100) NOT NULL, + `city` varchar(50) NOT NULL, + `state` varchar(30) NOT NULL, + `zip` varchar(15) NOT NULL, + `country` varchar(50) NOT NULL, + `email` varchar(100) NOT NULL, + `cost` decimal(7,4) NOT NULL, + `recd` int(11) NOT NULL, + `payto` varchar(100) NOT NULL, + `items` varchar(300) NOT NULL, + `paid` int(1) NOT NULL, + `complete` int(1) NOT NULL, + PRIMARY KEY (`orderid`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `orders` +-- + +INSERT INTO `orders` (`orderid`, `time`, `name`, `address`, `address2`, `city`, `state`, `zip`, `country`, `email`, `cost`, `recd`, `payto`, `items`, `paid`, `complete`) VALUES +('123', 12345, 'Satoshi N', '1 Bit Way', 'Suite 256', 'Anytown', 'CA', '92121', 'United States', 'satoshi@vistomail.com', '0.1500', 15200000, '1J9ikqFuwrzPbczsDkquA9uVYeq6dEehsj', '1000 1001', 1, 0); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `products` +-- + +CREATE TABLE IF NOT EXISTS `products` ( + `id` int(50) NOT NULL AUTO_INCREMENT, + `name` varchar(200) NOT NULL, + `price` decimal(11,2) NOT NULL, + `image` varchar(300) NOT NULL, + `in_stock` int(1) NOT NULL DEFAULT '1', + `description` mediumtext NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1003 ; + +-- +-- Dumping data for table `products` +-- + +INSERT INTO `products` (`id`, `name`, `price`, `image`, `in_stock`, `description`) VALUES +(1000, 'Bitcoin Window Decal', '4.00', 'http://i.stack.imgur.com/m9uaE.png', 1, 'GREAT GIFT! Bitcoin Accepted Here Sticker For Inside Window is for indoor use, non water proof, for merchants. This sticker applies inside on glass or any other transparent surface. Printed on self-adhesive vinyl with easy peel-and-stick back using high quality inks with protective PVC coating. Available in Opaque (white). No minimum order.'), +(1001, 'Physical Bitcoins', '20.00', 'https://www.casascius.com/silvercoin.jpg', 1, 'Bag of 100
How they work:
The "private key" is on a card embedded inside the coin and is protected by a tamper-evident hologram. The hologram leaves behind a honeycomb pattern if it is peeled. If the hologram is intact, the bitcoin is good. If you have purchased a 2-factor item, the private key is encrypted and will need to be decrypted using your original preselected passphrase before you can redeem the funds.\r\n\r\nThe 8-character code you see on the outside of the coin is the first eight characters of the Bitcoin address assigned specifically to that coin. You can verify the coin''s balance on Block Explorer. There is a mathematical relationship between the Bitcoin address and the private key inside the coin. The digital bitcoin is actually located on the public "block chain" stored on the internet, but it is completely inaccessible to anyone unless the private key from the coin is loaded into a Bitcoin wallet.\r\n\r\nTo recover the digital bitcoins, there are several ways to convert the embedded code back into a digital bitcoin so it can be spent over the internet. Most importantly, none of the methods relies on me or any other central issuer, due to Bitcoin''s completely decentralized design. The embedded private key code is everything a Bitcoin client needs to find and claim the digital Bitcoins from the peer-to-peer network. For example, you can enter (or "import") your coin''s private key code directly into Bitcoin clients such as Armory, Blockchain.info, or directly into Mt. Gox as a deposit method. (Casascius coins use the "minikey" private key format, and the main Bitcoin.org client does not yet support redeeming minikeys.)\r\n\r\nOf course, since the face value of the coins depends on the integrity of the embedded key code, you should only accept Casascius Bitcoins bearing an undamaged Casascius hologram from others.\r\n\r\nE-mail is casascius at mc2cs.com.'); + +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; diff --git a/.history/db_20200524183144.sql b/.history/db_20200524183144.sql new file mode 100644 index 0000000..7e26deb --- /dev/null +++ b/.history/db_20200524183144.sql @@ -0,0 +1,80 @@ +-- phpMyAdmin SQL Dump +-- version 4.0.10.7 +-- http://www.phpmyadmin.net +-- +-- Host: localhost +-- Generation Time: Nov 25, 2015 at 12:02 AM +-- Server version: 5.5.45-cll-lve +-- PHP Version: 5.4.23 + +SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; +SET time_zone = "+00:00"; + + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; + + + +-- -------------------------------------------------------- + +-- +-- Table structure for table `orders` +-- + +CREATE TABLE IF NOT EXISTS `orders` ( + `orderid` varchar(50) NOT NULL, + `time` int(100) NOT NULL, + `name` varchar(50) NOT NULL, + `address` varchar(100) NOT NULL, + `address2` varchar(100) NOT NULL, + `city` varchar(50) NOT NULL, + `state` varchar(30) NOT NULL, + `zip` varchar(15) NOT NULL, + `country` varchar(50) NOT NULL, + `email` varchar(100) NOT NULL, + `cost` decimal(7,4) NOT NULL, + `recd` int(11) NOT NULL, + `payto` varchar(100) NOT NULL, + `items` varchar(300) NOT NULL, + `paid` int(1) NOT NULL, + `complete` int(1) NOT NULL, + PRIMARY KEY (`orderid`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `orders` +-- + +INSERT INTO `orders` (`orderid`, `time`, `name`, `address`, `address2`, `city`, `state`, `zip`, `country`, `email`, `cost`, `recd`, `payto`, `items`, `paid`, `complete`) VALUES +('123', 12345, 'Satoshi N', '1 Bit Way', 'Suite 256', 'Anytown', 'CA', '92121', 'United States', 'satoshi@vistomail.com', '0.1500', 15200000, '1J9ikqFuwrzPbczsDkquA9uVYeq6dEehsj', '1000 1001', 1, 0); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `products` +-- + +CREATE TABLE IF NOT EXISTS `products` ( + `id` int(50) NOT NULL AUTO_INCREMENT, + `name` varchar(200) NOT NULL, + `price` decimal(11,2) NOT NULL, + `image` varchar(300) NOT NULL, + `in_stock` int(1) NOT NULL DEFAULT '1', + `description` mediumtext NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1003 ; + +-- +-- Dumping data for table `products` +-- + +INSERT INTO `products` (`id`, `name`, `price`, `image`, `in_stock`, `description`) VALUES +(1000, 'Bitcoin Window Decal', '4.00', 'http://i.stack.imgur.com/m9uaE.png', 1, 'GREAT GIFT! Bitcoin Accepted Here Sticker For Inside Window is for indoor use, non water proof, for merchants. This sticker applies inside on glass or any other transparent surface. Printed on self-adhesive vinyl with easy peel-and-stick back using high quality inks with protective PVC coating. Available in Opaque (white). No minimum order.'), +(1001, 'Physical Bitcoins', '20.00', 'https://www.casascius.com/silvercoin.jpg', 1, 'Bag of 100
How they work:
The "private key" is on a card embedded inside the coin and is protected by a tamper-evident hologram. The hologram leaves behind a honeycomb pattern if it is peeled. If the hologram is intact, the bitcoin is good. If you have purchased a 2-factor item, the private key is encrypted and will need to be decrypted using your original preselected passphrase before you can redeem the funds.\r\n\r\nThe 8-character code you see on the outside of the coin is the first eight characters of the Bitcoin address assigned specifically to that coin. You can verify the coin''s balance on Block Explorer. There is a mathematical relationship between the Bitcoin address and the private key inside the coin. The digital bitcoin is actually located on the public "block chain" stored on the internet, but it is completely inaccessible to anyone unless the private key from the coin is loaded into a Bitcoin wallet.\r\n\r\nTo recover the digital bitcoins, there are several ways to convert the embedded code back into a digital bitcoin so it can be spent over the internet. Most importantly, none of the methods relies on me or any other central issuer, due to Bitcoin''s completely decentralized design. The embedded private key code is everything a Bitcoin client needs to find and claim the digital Bitcoins from the peer-to-peer network. For example, you can enter (or "import") your coin''s private key code directly into Bitcoin clients such as Armory, Blockchain.info, or directly into Mt. Gox as a deposit method. (Casascius coins use the "minikey" private key format, and the main Bitcoin.org client does not yet support redeeming minikeys.)\r\n\r\nOf course, since the face value of the coins depends on the integrity of the embedded key code, you should only accept Casascius Bitcoins bearing an undamaged Casascius hologram from others.\r\n\r\nE-mail is casascius at mc2cs.com.'); + +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..8fe5fb6 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,113 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "node", + "request": "attach", + "name": "Attach", + "port": 9229, + "skipFiles": [ + "/**" + ] + }, + { + "type": "node", + "request": "attach", + "name": "Attach", + "port": 9229, + "skipFiles": [ + "/**" + ] + }, + { + "type": "node", + "request": "attach", + "name": "Attach to Remote", + "address": "TCP/IP address of process to be debugged", + "port": 9229, + "localRoot": "${workspaceFolder}", + "remoteRoot": "Absolute path to the remote directory containing the program", + "skipFiles": [ + "/**" + ] + }, + + + { + "type": "node", + "request": "launch", + "name": "n", + "runtimeExecutable": "npm", + "runtimeArgs": [ + "run-script", + "debug" + ], + "port": 9229, + "skipFiles": [ + "/**" + ] + }, + { + "type": "node", + "request": "attach", + "name": "Attach to Remote", + "address": "TCP/IP address of process to be debugged", + "port": 9229, + "localRoot": "${workspaceFolder}", + "remoteRoot": "Absolute path to the remote directory containing the program", + "skipFiles": [ + "/**" + ] + }, + { + "type": "node", + "request": "attach", + "name": "Attach to Remote", + "address": "TCP/IP address of process to be debugged", + "port": 9229, + "localRoot": "${workspaceFolder}", + "remoteRoot": "Absolute path to the remote directory containing the program", + "skipFiles": [ + "/**" + ] + }, + { + "type": "node", + "request": "attach", + "name": "Attach", + "port": 9229, + "skipFiles": [ + "/**" + ] + }, + { + "type": "node", + "request": "attach", + "name": "local", + "address": "TCP/IP address of process to be debugged", + "port": 9229, + "localRoot": "${workspaceFolder}", + "remoteRoot": "Absolute path to the remote directory containing the program", + "skipFiles": [ + "/**" + ] + }, + { + "name": "Listen for XDebug", + "type": "php", + "request": "launch", + "port": 9000 + }, + { + "name": "Launch currently open script", + "type": "php", + "request": "launch", + "program": "${file}", + "cwd": "${fileDirname}", + "port": 9000 + } + ] +} \ No newline at end of file diff --git a/404.html b/404.html new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/404.html @@ -0,0 +1 @@ + diff --git a/_config.yml b/_config.yml new file mode 100644 index 0000000..c419263 --- /dev/null +++ b/_config.yml @@ -0,0 +1 @@ +theme: jekyll-theme-cayman \ No newline at end of file diff --git a/config.php b/config.php index 196d452..e92e646 100644 --- a/config.php +++ b/config.php @@ -6,22 +6,20 @@ $db = "databse_Name"; //blockchain info API Key and your xpub BIP32 public key -$api_key = "your_blockchain_api_Key"; -$xpub = "xpubYour_extended_public_key"; -$secret = "your_secret"; //this can be anything you want +$api_key = "Y2BhjljBRMdoWUeSQRq75RyHtlNJBd8FRLa1BT5oL2Vr3zaHGoumNnI8i87BJkhZ"; +$xpub = "xpub6BgyETiwKAAbFLS1so6AqCaoVzqmh3KNnxiZmExjwZPfwMxc7TBqnFiqGhVEvFSzQqMdnpnPQ3pRGzqiRWgRCk39XnvkccQnR6te63cPps4"; +$secret = "Hell Mary, All Eyes On Me"; //this can be anything you want //Specific to you the store owner -$storeName = "Shop Name"; -$rootURL = "http://yourrooturl.com/directory"; //example https://mysite.org or http://yourhomepage.com/store -$yourEmail = "your@email.com"; //email notifications will be sent to this email when a new order is placed +$storeName = "BlocMoney"; +$rootURL = "https://github.com/godbody93/Blockchain-Receive-Payments-API-Shopping-Cart"; //example https://mysite.org or http://yourhomepage.com/store +$yourEmail = "ladon.loggins@gmail.com"; //email notifications will be sent to this email when a new order is placed //pw to access the admin pages -$adminPW = "honeybadgerbubblegum"; +$adminPW = "Hell Mary, All Eyes On Me"; //connect to the database $conn = mysqli_connect("localhost", $dbuser, $dbpw, $db); if(!$conn){ die('Connection Error: '.mysqli_errno()); } - -?> \ No newline at end of file diff --git a/google8d43b47f9323ff02.html b/google8d43b47f9323ff02.html new file mode 100644 index 0000000..f3b4f64 --- /dev/null +++ b/google8d43b47f9323ff02.html @@ -0,0 +1 @@ +google-site-verification: google8d43b47f9323ff02.html \ No newline at end of file diff --git a/readme.txt b/readme.txt deleted file mode 100644 index 7ed8cff..0000000 --- a/readme.txt +++ /dev/null @@ -1,21 +0,0 @@ -###################################### -# Blockchain Receive Payments API v2 # -# Open Shopping Cart # -###################################### - -No account with blockchain.info required however you will need an API key. -Request one here: https://api.blockchain.info/v2/apikey/request/ - -Blockchain.info's new Receive Payments API uses HD addresses to generate unique addresses for taking bitcoin payments. -Since these addresses are deterministic no payment forwarding is needed like the previous version of the API. -All you need is a API key and an extended public key (BIP 32) - -1. Download the files in the repository -2. Create and configure a database on your webserver (How to: http://www.fastcomet.com/tutorials/cpanel/create-database) -3. Import the included SQL database files using PHPmyadmin or similar database manager (How to: https://www.namecheap.com/support/knowledgebase/article.aspx/9143/29/how-to-import-and-export-database-in-cpanel-access-denied-create-database-dbname-error-and-how-to-fix-it -4. Open the config.php file and update the fields - -That's it! - -Access the admin panel to manage your orders and products with login.php -The password to access the admin page is set in your config.php diff --git a/style.css b/style.css deleted file mode 100644 index 8b41a33..0000000 --- a/style.css +++ /dev/null @@ -1,255 +0,0 @@ -html, body{ - margin: 0; - padding: 0; - font-family: "Calibri", Arial, sans-serif; -} -a{ - color: #e65c00; -} -h1{ - font-family: "Calibri", Arial, sans-serif; - background-color: #fff; - color: #e65c00; - padding: 20px; - border-bottom: 2px solid #ccc; - position: relative; - top: -30px; -} -hr{ - width: 90%; - height: 0; - border-top: 1px solid #eee; -} -.shopCont{ - width: 75%; - margin: 10px; - display: table; -} -.shopImg{ - position: relative; - float: left; - width: 20%; - max-width: 20%; - display: inline-block; -} -.shopImg img{ - max-width: 100%; -} -.shopDesc{ - position: relative; - float: left; - width: 50%; - display: inline-block; - padding: 20px; -} -.shopAdd{ - position: relative; - float: left; - width: 20%; - padding: 10px; - border: 1px solid #ccc; -} -.shopAdd input{ - width: 100%; - font-size: 18px; -} -.itemName{ - font-weight: bold; - font-size: 20px; - display: block; -} -.itemCost{ - color: #333; - font-weight: bold; - display: block; -} -.itemInfo{ - color: #333; -} -#cartCont{ - position: absolute; - top: 100px; - right: 10px; - width: 22%; - text-align: center; -} -#cartCont input{ - padding: 15px; - background-color: #e65c00; - color: #fff; - width: 100%; - float: right; - border: 1px solid #fff; - font-weight: strong; - font-size: 18px; -} -#cartCont input:hover{ - padding: 15px; - background-color: #ff8534; - color: #fff; - width: 100%; - float: right; - border: 1px solid #fff; - font-weight: strong; - font-size: 18px; -} -#cartSpace{ - background-color: #fff; - color: #000; - text-align: left; - border: 1px solid #ccc; - padding-top: 15px; - padding-bottom: 15px; -} -#cartCost{ - background-color: #ccc; - padding: 5px; - text-align: right; - font-weight: bold; -} -#cartHeader{ - text-align: center; - font-size: 18px; - background-color: #eee; - color: #000; - font-weight: bold; - padding: 15px; -} -.cartPrice{ - margin: 3px; - float: right; - color: #666; -} -#checkCont{ - width: 75%; - padding: 10px; -} -#viewCart{ - position: relative; - margin-left: auto; - margin-right: auto; - border: 1px solid #eee; - padding: 35px; - width: 75%; -} -#viewCart input.text{ - width: 75%; - padding: 7px; -} -#viewCart input.button{ - padding: 15px; - background-color: #e65c00; - color: #fff; - width: 200px; - float: right; - border: 1px solid #fff; - font-weight: strong; - font-size: 18px; -} -#viewTitle{ - font-size: 26px; - color: #000; - display: block; -} -#viewTable{ - position: relative; - margin-left: auto; - margin-right: auto; - padding: 15px; - width: 75%; -} -#viewTable td{ - border-bottom: 1px solid #ccc; - padding: 15px; -} -#viewTable td.blank{ - border-bottom: 1px solid #fff; - padding: 15px; - font-weight: bold; -} -#viewTable input{ - padding: 15px; - background-color: #e65c00; - color: #fff; - width: 200px; - float: right; - border: 1px solid #fff; - font-weight: strong; - font-size: 18px; -} -#viewTable input:hover{ - padding: 15px; - background-color: #ff8534; - color: #fff; - width: 200px; - float: right; - border: 1px solid #fff; - font-weight: strong; - font-size: 18px; -} -.confirmShip{ - width: 75%; - text-align: right; - padding: 15px; -} -#payAmt{ - position: relative; - margin-left: auto; - margin-right: auto; - padding: 15px; - font-size: 20px; - width: 70%; - text-align: center; -} -#payBox{ - width: 60%; - height: 30px; - font-size: 19px; - position: relative; - top: -40px; - text-align: center; -} -#messages{ - font-size: 21px; - font-weight: bold; - color: #009933; -} -.tableHeader{ - font-weight: bold; -} -.productTable{ - width: 90%; -} -.productTable td{ - max-width: 30%; - border-bottom: 1px solid #ccc; - border-right: 1px solid #ccc; -} -.inputArea{ - height: 120px; - width: 70%; - padding: 7px; -} -.errMsg{ - font-size: 20px; - color: #e65c00; - font-weight: bold; -} -#logout{ - position: relative; - float: right; - padding: 15px; - background-color: #fff; - border: 1px solid #ccc; - color: #e65c00; - font-weight: bold; -} -#add{ - position: relative; - padding: 15px; - background-color: #fff; - border: 1px solid #ccc; - color: #e65c00; - font-weight: bold; -} -