-
Notifications
You must be signed in to change notification settings - Fork 32
Closed
Description
When we create payment records using API POST /work-period-payments the actual payment would be created https://github.com/topcoder-platform/taas-apis/blob/dev/src/services/WorkPeriodPaymentService.js#L99-L105.
During testing on PROD we would like to be able to disable the actual payment processing.
Task
- Introduce a new config/env variblae
PAYMENT_PROCESSING_SWITCH, with the default valueOFF - If
PAYMENT_PROCESSING_SWITCH===OFF, then don't callcreatePaymentmethod here https://github.com/topcoder-platform/taas-apis/blob/dev/src/services/WorkPeriodPaymentService.js#L99-L105. And just set a dummy challenge id value00000000-0000-0000-0000-000000000000.
Unit test
Create unit tests to check this:
- should not create actual payment when "PAYMENT_PROCESSING_SWITCH" if "OFF"
- should create actual payment when "PAYMENT_PROCESSING_SWITCH" is "ON"