Demo code for creating and monitoring Yellow invoices using our Python SDK.
This is a simple Django server with two pages:
- A page to create an invoice in USD or AED
- 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!
- Create a python virtual environment and activate it
- Install ngrok and run it, point it at local port 8080. Make note of the URL ngrok gives you.
- Within the root directory of yellowdemo, type:
pip install -r requirements.txt
- 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!
python manage.py runserver 127.0.0.1:8080