AJ-54 / Blockonomics_Programming_Links

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Blockonomics Programming Payment Links/Buttons in Laravel

This demo shows how to program the Payment Button/Link API to dynamically change the order price and also learn how to pass extra data to the API calls. Here is the youtube video describing the tutorial.

Installing Guide

Cloning Repository
git clone https://github.com/AJ-54/Blockonomics_Programming_Links.git
cd Blockonomics_Programming_Links
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 payment link from here by going to PAYMENT BUTTONS/URL tab.
  • Head to this line and replace the parent_uid with your value. Note that parent_uid is the one which is appended in your payment link after https://www.blockonomics.co/pay-url/.
  • 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!

Troubleshooting

SSL Certification Error when trying to click on apply button
  • Note that this error can be traced either inside php logs or by looking at network in inspection mode.
  • Please refer to this link to help you solve the issue.

About


Languages

Language:PHP 76.5%Language:Blade 22.5%Language:Shell 0.6%Language:Vue 0.5%