Open prshant70 opened 2 months ago
Sensitive data stored in DB (like channels partners tokens or other credentials) must be in encrypted form. Encryption and Decryption to be taken care of by the application layer.
API to fetch the channel partners configurations -
GET /channel_partners/configurations
Request Params :
{
"channels": "SMS,EMAIL"
}
Response -
{
"SMS": {
"DEFAULT_PRIORITY": [
"SMS_COUNTRY",
"PLIVO",
"AWS_SNS"
],
"PRIORITY_LOGIC": "['SMS_COUNTRY', 'PLIVO', 'AWS_SNS'] if True else ['SMS_COUNTRY', 'PLIVO', 'AWS_SNS']",
"GATEWAYS": {
"SMS_COUNTRY": {
"ID": "SMS_COUNTRY",
"GATEWAY": "SMS_COUNTRY",
"CONFIGURATION": {
"SMS_COUNTRY_USERNAME": "otp_sc_stag",
"SMS_COUNTRY_PASSWORD": "xxxxx",
"SMS_COUNTRY_SENDER_ID": "HKPLUS",
"SMS_COUNTRY_URL": "http://www.smscountry.com/SMSCwebservice_bulk.aspx"
}
},
"SMS_COUNTRY1": {
"ID": "SMS_COUNTRY1",
"GATEWAY": "SMS_COUNTRY",
"CONFIGURATION": {
"SMS_COUNTRY_USERNAME": "otp_sc_stag",
"SMS_COUNTRY_PASSWORD": "xxxxx",
"SMS_COUNTRY_SENDER_ID": "HKPLUS",
"SMS_COUNTRY_URL": "http://www.smscountry.com/SMSCwebservice_bulk.aspx"
}
},
"PLIVO": {
"ID": "PLIVO",
"GATEWAY": "PLIVO",
"CONFIGURATION": {
"PLIVO_SMS_URL": "https://api.plivo.com/v1/Account/xxxxxx/Message/",
"PLIVO_AUTH_ID": "xxxxx",
"PLIVO_AUTH_TOKEN": "ZTFmMzYxODBmZWZiNGQwNjYyZmY5ODhmYjYxMjA1",
"PLIVO_SENDER_ID": "HKPLUS",
"PLIVO_CALLBACK_URL": "https://stagapi.1mg.com/analytics/lara_logging"
}
}
}
},
"EMAIL": {
"DEFAULT_PRIORITY": [
"SPARK_POST",
"AWS_SES"
],
"PRIORITY_LOGIC": "['SPARK_POST', 'AWS_SES'] if True else ['SPARK_POST', 'AWS_SES']",
"GATEWAYS": {
"SPARK_POST": {
"ID": "SPARK_POST",
"GATEWAY": "SPARK_POST",
"CONFIGURATION": {
"BASE_URL": "https://api.sparkpost.com",
"PATH": "/api/v1/transmissions?num_rcpt_errors=3",
"API_KEY": "cc1a8516911d983877e16642958007732a924187"
}
},
"AWS_SES": {
"ID": "AWS_SES",
"GATEWAY": "AWS_SES",
"CONFIGURATION": {
"AWS_REGION": "ap-south-1"
}
}
}
}
}
tata1mg/notifyone#16
Develop functionality to Create, Store, Update and Delete channel partners configurations.
Expose necessary APIs for CMS to manage Channel Partners configurations.
APIs to be consumed by Handlers for fetching the channel partners configuration.
Mechanism to push any changes in the channel partners configurations to the Handlers
We store only the operator name in notification_request_log table. As we can now have more than one instance of the same operator active in the system, storing only the operator name can be ambiguous. Store operator unique identifier as well along with the operator name in the logs.