In this project, a simplified implementation of card and eWallet payment has been developed on IntelliJ by Giorgos Karypidis, Alexander Kyriakou, Dimitris Fountoulis and Alexis Kotsampasis. The eWallet payment functionality was built on an existing source code provided by the Code.Hub team, which assisted us during the whole journey.
You'll need certain tools in order to be able to execute the code.
The database entries used here are pulled from the implemented H2 server in IntelliJ.
- Run Edge module
- Run Integration module
- Run Docker
- Run Postman
- Via a browser login to
http://localhost:15672
with credentialsguest
-guest
- In Postman select
Post
method with URLhttp://localhost:8080/api/feeder
for Card payments orhttp://localhost:8080/api/wallet/feeder
for eWallet payments. Then you'll need to supply a simple JSON query as follows (copy-paste it in Body tab and fill the gaps):
Card payment:
{
"cid": "CU#########",
"creditorName": "@@@ @@@",
"creditorIBAN": "@@##############",
"debtorName": "@@@ @@@",
"debtorIBAN": "@@##############",
"paymentAmount": "##.#",
"valuerDate": "Year/Month/Day",
"paymentCurrency": "EUR",
"feeAmount": "#",
"feeCurrency": "EUR"
}
eWallet payment:
{
"cid": "CU#########",
"creditorName": "@@@ @@@",
"creditorIBAN": "@@##############",
"debtorName": "@@@ @@@",
"debtorIBAN": "@@##############",
"paymentAmount": "##.#",
"valuerDate": "Year/Month/Day",
"paymentCurrency": "EUR",
}
Once the respective query has been sent, check on RabbitMQ that it has registered in Queues. If the payment can be processed, it'll be shown in the log file payments.
ps: Note that in eWallet payments, no fee amount and fee currency needs to be declared, as they're both calculated by the respective module.
Thank you Code.Hub, Piraeus Bank and ReGeneration for this amazing learning experience.