Skip to content

AJ-54/Blockonomics_Payment_Button_Demo

Repository files navigation

Blockonomics Payment Button API Demo in Laravel

This demo uses the Payment Button API provided by Blockonomics to receive Bitcoin payments. It can be easily integrated with your online store. The video tutorial for this demo can be found here.

Installing Guide

Cloning Repository
  • git clone https://github.com/AJ-54/Blockonomics_Payment_Button_Demo.git
  • cd Blockonomics_Payment_Button_Demo
Installing dependencies
  • composer install
  • npm install
  • cp .env.example .env
  • php artisan key:generate
  • By now, you have installed all the dependencies and also created copy of the .env file.
Setting up Environment Configurations
  • In the .env file, add database information to allow Laravel to connect to the database, fill in the DB_HOST, DB_PORT, DB_DATABASE, DB_USERNAME, and DB_PASSWORD options to match the credentials of the local database you created.
  • Place your Blockonomics API Key in the Blockonomics_API field. This will allow us to run migrations in the next step.
Migration Code
  • php artisan migrate
  • php artisan storage:link
Blockonomics Website Setup
  • Create your Blockonomics Account- here
  • Create your payment button from here by going to PAYMENT BUTTONS/URL tab. Get the button code to paste in the html page from step 01.
  • Head to this line and replace the payment button code with your code.
  • Go to OPTIONS in the PAYMENT BUTTONS/URL tab on this page. You need to setup the ORDER HOOK URL and Redirection URL.
  • To test the code locally, follow instructions from this video and make sure to place the <domain>/receive as your order hook url and <domain>/home as redirection url. Here <domain> is the domain you get from reverse proxy (Ngrok/localtunnel).
  • Please make sure you are using http and not https. Your domain would be in https but place http URL in the order hook url and redirection url.
  • Make sure to save your changes!
The Last Line!
  • php artisan serve

Now you are all set to locally run the demo!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages