Switching between Test and Real Price of Course
This includes the step to switch between the charging the price of the course for test purpose and charging the course with the real price as set in the course administration tool.
Go to file (/edx/app/ecommerce/ecommerce/ecommerce/extensions/api/v2/views/checkout.py):
ubuntu@ip-172-31-7-29:~$ sudo su ecommerce -s /bin/bash
ecommerce@ip-172-31-7-29:/home/ubuntu$ cd
ecommerce@ip-172-31-7-29:~$ source ecommerce_env
ecommerce@ip-172-31-7-29:~$ nano /edx/app/ecommerce/ecommerce/ecommerce/extensions/api/v2/views/checkout.py
Edit checkout.py:
Search this parameters\["total_fee"\] = "1"
And replace with parameters\["total_fee"\] = "{}".format(int(basket.total_incl_tax))
Screenshot for reference:

Note: You can also comment it if you like.
Then, restart the ecommerce service:
ubuntu@ip-172-31-7-29:~$ sudo /edx/bin/supervisorctl restart ecommerce ecomworker
