Demo code for creating and monitoring Yellow invoices using our Ruby SDK.
This is a simple Rails server with two pages:
- A page to create an invoice in USD
- A page to display the embedded invoice widget
This demo server just prints to the terminal when the invoice status changes - a real shopping cart integration would likely update an order management system and redirect customers to an order confirmation page.
Code comments contain additional documentation. For any other questions please email info@yellowpay.co
Thanks for using Yellow!
git clone https://github.com/YellowPay/yellowdemo-ruby.git
- Install ngrok and run it, point it at local port 3000 (
ngrok 3000
). Make note of the URL ngrok gives you. - Within the root directory of yellowdemo-ruby, type:
bundle install
- open the
env.sh
file and add yourAPI_KEY
,API_SECRET
andDEMO_HOST
. Then source the file with the following command:
source env.sh
- Run the server!
rails s