- Node.js installed
- MongoDB installed
git clone https://github.com/DiyRex/MockPay-API.git
cd MockPay-API npm install- Create a .env file in the root of the project and add the following configurations:
PORT=<Port>
MONGO_CONN_STRING=<mongodb-connection-string>- Replace mongodb-connection-string with your actual MongoDB connection string and Port you want to run the server.
npm run devnpm run start- The server will be running at http://localhost:PORT
- Method: GET
- Route:
/payment/pay/{id} - Response Code: 200
- Method: POST
- Route:
/payment/pay/ - Body:
amount: Amount (int)currency: Currency type (String)payment_method: Payment method (String)
- Response Code: 201
- Method: PUT
- Route:
/payment/pay/{id} - Body:
card_number: Card Number (XXXX XXXX XXXX XXXX - String)exp_year: Expiry Year (YYYY - String)exp_month: Expiry Month (MM - String)ccv: CCV (XXX - String)cardholder_name: Cardholder Name (String)
- Response Code: 201
- Method: DELETE
- Route:
/payment/pay/{id} - Response Code: 200
This project is licensed under the ISC License.