How to Run:
- Open the project folder
- Run on command prompt: python -m pipenv install
- Run on command prompt: python -m flask run
How to Test:
A. Test with Postman:
- Open postman
- Copy following url in urlbar with post type method : http://127.0.0.1:5000/ProcessPayment
- Copy following header in header's bar :
Content-Type:application/json - Copy following data in body parameter bar : {"CreditCardNumber": "1234123412341234", "CardHolder": "Mohit Verma", "ExpirationDate": "2022/01/01", "Amount": 100}
- Click on send button
- Got 200 response and also check flask api cmd promot for request processed
B. Test with pytest
- Open the project folder
- Open cmd promt and type following command in prompt: python -m pytest testing_code.py
- All the test are passed and also check api command prompt for request processed