Start by pulling down the microservices environment and the authentication api.
cd ~/code/divido
git clone git@github.com:DividoFinancialServices/microservices-environment.git
cd microservices-environment
make down && make base
cd ~/code/divido
git clone git@github.com:DividoFinancialServices/authentication-service.git
cd authentication-service
make down && make up
Then clone this repo.
cd ~/code/divido
git clone git@github.com:DividoFinancialServices/application-service.git
cd application-service
make down && make up
composer install
You will also need the lambda calculator service if you want to create applications.
cd ~/code/divido
git clone git@github.com:DividoFinancialServices/lambda-calculator.git
cd lambda-calculator
make down && make up
And in order to use platform triggers to update activations/cancellations/refunds:
cd ~/code/divido
git clone git@github.com:DividoFinancialServices/platform.git
cd platform/app/library
composer install
cd ../../
make down && make up
You can now call the application service endpoints directly, or through the public apis. To do this, clone one (or both) of the following:
cd ~/code/divido
git clone git@github.com:DividoFinancialServices/merchant-api.git
cd merchant-api
make down && make up
composer install
cd ~/code/divido
git clone git@github.com:DividoFinancialServices/merchant-portal-api.git
cd merchant-portal-api
make down && make up
composer install
If you want to fetch applications using cloudsearch, you will need to have aws credentials in place. Make sure you have aws credentials in your local ~/.aws/credentials
file eg:
[default]
aws_access_key_id = YOUR-KEY-HERE
aws_secret_access_key = YOUR-SECRET-HERE
You can get these credentials from logging in to AWS, navigating to: IAM -> Users -> [Your Name] -> Security credentials [tab] -> Create access key
Open Paw project "Merchant Api" and test GET Health
and GET Health from Application Service
. The former will test the merchant-api. The latter will test http calls to the application service through the merchant api.
The database schema/seeds are a bit tricky and needs some modification before it can be used.
Here are the credentials:
Divido Microservices Local
Host: 127.0.0.1
Username: root
Password: divido
Port 3306
Get a copy of the database from either sandbox or testing.
Notes:
- Ignore warnings regarding
Table 'divido.schema_version'
. It doesn't affect the integrity of the application. - In document, change the schema deleted_at to have a default value of NULL instead of CURRENT_TIMESTAMP otherwise every document created will immediately be soft-deleted.
- You may need to alter the application table:
ALTER TABLE application ALTER deposit_status SET DEFAULT '', ALTER deposit_reference SET DEFAULT '';
ALTER TABLE application MODIFY purchase_price int(11) null;
ALTER TABLE application MODIFY deposit_amount int(11) null;
ALTER TABLE application MODIFY commission int(11) null;
ALTER TABLE application MODIFY partner_commission int(11) null;
ALTER TABLE application MODIFY lender_fee int(11) null;