This Payment Gateway currently is mocking the Bank Api integration. The PaymentGateway consist of module:
- MakePayment : This is post request which takes in the card details. The Card details consist of CardNumber, Amount, Cvv, Currency and ExpiryDate. This module is used by marchant to make payments and it returns unique identifier and status of the payment
- RetrievePayment: This is a get request. This takes in Unique Identifier of the previous payment and returns the status code of the payment and card details. This module is used by merchant to retreive payment information.
.Net Framework 4.7.2 and more
-
Process Payment: Http Post:
Url : http://localhost:55653/PaymentGateway/ProcessPayments
Example Post Body:
"cardDetail" : { "Amount" : 100, "CardNumber" : "1234567891234567", "Currency" : "Euro", "Cvv" : 123, "ExpiryDate" : "07/2022" } -
Retreive Payment: HttpGet:
Url : http://localhost:55653/PaymentGateway/RetreivePayments
Parameter Identifier : Guid value
The web api used the business logic to interact with banking interface. The business logic is a middleware between web-api and the banking service. Currently the Banking service is mocked which should be easily replaced by the actual banking service.
Take is in 2 method call.
- Make Payment: This method is called to make payments and returns unique identifier and the status of the payment
- RetrievePreviousPayment: This methos is called to retrieve previous payment made. This takes in a unique Identifier and returns the status code and the card details.
Credit Card Expiry Date validation: Validating if the credit card is still valid. The expiry should be in MM/yyyy format.
Credit Card Cvv validation: The Cvv should be 3 digit only .