diff --git a/server/ArpaWebservice.js b/server/ArpaWebservice.js index a4912ee..4c535b1 100644 --- a/server/ArpaWebservice.js +++ b/server/ArpaWebservice.js @@ -99,7 +99,7 @@ module.exports.saveTransactionToArpa = (data, items, db) => { // "Data": {"TransactionID": null, "BusinessID": 3, "DocAliasId": 144, "Description": "تست", "cAddress1": "تهران", "cTel1": "0218884455", "TransCCustom1": "آقای موسوی"}, // "Items": [{"TransLineID": null, "itemId": 5302, "MjQty": 20, "StockAreaId": 1}, {"TransLineID": null, "itemId": 5302, "MjQty": 20, "StockAreaId": 1}] // } - + return new Promise(async (resolve, reject) => { try { const transaction = await axios.post('/api/NewTransaction', ArpaData, axiosConfig(db)) diff --git a/server/controllers/transactionController.js b/server/controllers/transactionController.js index 719370e..f1c0d61 100644 --- a/server/controllers/transactionController.js +++ b/server/controllers/transactionController.js @@ -73,8 +73,7 @@ module.exports.add_transaction = [ ] return msgArray.join(' ') } - - // save transaction + if (agent === 'main') { const ArpaResponse = await saveTransactionToArpa(data, items, db_name) await TransactionDraft.findByIdAndRemove(draftId) diff --git a/server/plugins/SMS_Module.js b/server/plugins/SMS_Module.js index 252b4f2..bc59e6c 100644 --- a/server/plugins/SMS_Module.js +++ b/server/plugins/SMS_Module.js @@ -2,7 +2,7 @@ const axios = require('axios') const accountInfo = { Username: 'asanservice.sms@gmail.com', - Password: '7ea2243a', + Password: '9u&8[Ve9', Number: '5000467341', url: 'http://www.afe.ir/WebService/V4/BoxService.asmx' }