For API documentation, Please run this application and hit this route from any browser. http://localhost:9000/api-docs
It's not fully completed yet.
- Authentication and Authorization.
- Role based auth
- Payment.
- Password Reset.
- Client and Admin account management
- Payment Integration
- Logger
- Cache
- Swagger API Documentation
- Node v14+
- npm
- Redis
- Mongo DB
git clone https://github.com/atdan/Dapay.git
cd Dapay
NODE_ENV=development/production
PORT=9036
DATABASE=mongodb://localhost:27017/dapay
JWT_SECRET=sayc-owgn-kktw-kktrw
JWT_EXPIRES_IN=1d
EMAIL_USERNAME_APP=#
EMAIL_PASSWORD_APP=#
REDIS_HOST=localhost
REDIS_PORT=6379
LOCAL_HOST=http://localhost:9036
# yellowcard
YC_API_KEY=yellow card api key
YC_SECRET=yellowcard api secret
YC_BASE_URL=yellowcard base url
install packages: run this command
npm i
Start this application:
npm start
- Dapay is a Business account management system, the owner of the business is registered as an admin and able to signup clients under them and add them to their account. The Admin is given privildges to call the following endpoints
- Single and Bulk Transfers without Approval i.e. their request is force approved
- Accept and Deny Payment Requests
- Create, Update and remove webhooks
- Add and Remove Users linked to their account
- View Account Details and Balance
- All other actions that can be performed by their clients below The Clients added to their Account are able to perform
- Fetch Supported transaction Channels, Countries, Networks and Rates/
- Perform account Lookup using Resolve Bank Account
- Single and Bulk Transfers which require approval from Admin
A System account which Moderates the application is authorized to:
- Credit Accounts
- Fetch System account Retrieve information about System Account with Yellowcard, including available balance.
-
Test Data Consistency: The endpoint to Submit Payment Request returned 401 - Unauthorized - Axios error while the endpoint returned undefined upon further inspection I noticed the request Body params provided in the API Reference and the Submit your first Payment Request Code Recipe were inconsistent. The code recipe included parameters such as country and currency which were not present in the API reference also in the recipe was amountUSD which was called amount in the API reference. The account number which was the recipe was also not a valid one as the valid account number was at the Sandbox testing section of the Guide. I suggest expanding the account numbers that should return success or failure to a more generic example like successful account numbers should end with 111 and failure 000 to increase the range of account numbers that can be used for testing purposes
-
Resolve Bank Account: The endpoint to Resolve Bank Account returned 401 - Unauthorized despite other endpoints like Get Channels, Get Rates, Get Networks working with the same auth
-
Endpoints Dependency: It was not possible to test endpoints like Lookup payment, Accept payment Request, and Deny Payment Request because the payment id needed to be gotten from successfully testing Submit Payment Request endpoint. I believe a default payment Id would help ease development
-
Webhooks: The endpoints to create, Update and remove Webhooks returned 401 - Unauthorised and would suggest adding a default response data to the error returned to facilitate end to end tests during the development process