You will need to create your own order management system API for the cloud function script to work so that it can fetch the order status from the API. You can find a quick sample at http://tiny.cc/omsapi. Your API must run on an HTTPS URL. To achieve this, you can use services such as PythonAnywhere and ngrok. While PythonAnywhere hosts your code on their servers and provides a fixed URL, ngrok can be installed and run locally to provide a forwarding address to localhost.
Say you have to run your Django project for the order management API on port 8000 of your system and now wish to provide an HTTPS URL so that you can test it; you can do so easily with ngrok by following these steps:
- Download the ngrok tool.
First, head over to https://ngrok.com and click on the Download button in the top navigation menu. Choose the correct...