- Wallet Transaction Engine (WTE)
Wallet Transaction Engine is a stateless REST API service for the purpose of processing Wallet transactions and recording Financial Journal entries. This application is compliant with Double Entry Accounting standards for bank ledgers.
WTE is capable of (but not limited to) the following features:
- Processing of debit/credit fund movements between accounts
- Reverse transactions
- Record and log financial journal entries
- Notify transactional exceptions through Slack channels
- Perform OAuth 2.0 validation for all requests
This application will require an OAuth 2.0 token to be provided for each request in the form of a "Bearer Token" authentication HTTP Header.
Due to the nature of OAuth 3-legged flows, WTE depends on an external OAuth 2.0 server to be configured.
The present application does not provide migrations or any provision of User or Wallet data. Such information must be provisioned to this application for it to handle transactions.
WTE ships with 2 versions. Although there are breaking changes between them, the nature of the application remains the same; to process and record transactions.
This version allows for Client Credentials Grant tokens to authenticate and perform fund movements and balance inquiries on behalf of the Server's users. This version was created in order to provide backwards compatibility with some legacy banking systems in the Philippines and Singapore where it is common to find systems that don't implement Auth Code Grant authorization, so Client Credentials Grant is easier to configure.
This version will be deprecated in the future in favour of Version 2.
The latest version of WTE forces all credit/debit related requests to be authenticated using a Auth Code Grant (i.e. using an Access Token that belongs to a User). This provides tighter security when executing transactions.
Additionally, Version 2 uses a different Database Schema, so transactions will be stored differently. This new schema is more efficient and enables faster queries, but does imply migrating data from the V1 model to V2. So any systems using WTE V1 but wanting to use V2 must ensure they have the capability of either using both versions simultaneously or stick to one.
Please install in order and ensure to read the instructions thoroughly.
This is the recommended WSL engine version for this container because it is faster for the container to access the shared files between the Linux subsystem and the Windows host.
Linux and Windows have different filesystems, so sharing directories between them takes a long time.
If you have no choice but running WSL2, you must create a file
C:/Users/<username>/.wslconfig with the following contents:
[wsl2]
memory=8GB # Limits amount of VM memory
processors=4 # Limits number VM virtual processorsYou may increase the limits, if your computer has enough resources.
Clone this repository or copy the files from this repository into a new folder:
git clone git@github.com:cris005/wte.gitOpen a terminal, cd to the folder in which docker compose.yml is saved, and run:
docker build -t wte .Please ensure you have all the prerequisites completed before running this
This application is meant to be used as part of a distributed system made up of microservices. That said, in order to use this application you will have to add it as a service to your container and interact with it from there.
And then simply run the container.
docker compose upTo generate the API documentation, please run the following command.
php artisan scribe:generateYou will be able to see a list of endpoints as well as examples of request parameters and sample responses by opening the below URL.
https://<YOUR_HOST_NAME>/docs