dummyMPN.js 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456
  1. const http = require('http');
  2. const server = http.createServer((req, res) => {
  3. let body = '';
  4. let hasInquiry = false;
  5. let hasPayment = true
  6. req.on('data', (chunk) => {
  7. body += chunk;
  8. });
  9. req.on('end', () => {
  10. hasInquiry = /<(\w+:)?Inquiry\b/.test(body);
  11. hasPayment = /<(\w+:)?Payments\b/.test(body);
  12. const regeXpaymentCode = /<NS1:paymentCode>(.*?)<\/NS1:paymentCode>/;
  13. const matcHpaymentCode = body.match(regeXpaymentCode);
  14. const paymentCode = matcHpaymentCode ? matcHpaymentCode[1] : null;
  15. let xmlInquiryResponse = 'a';
  16. let xmlPaymentsResponse = 'a';
  17. if (req.url === '/dummy-mpn' && req.method === 'POST') {
  18. if (paymentCode != '88888888') {
  19. xmlInquiryResponse = `<?xml version="1.0" encoding="utf-8"?>
  20. <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  21. <SOAP-ENV:Body>
  22. <InquiryResponse xmlns="http://btn.co.id/MPNService">
  23. <InquiryResult>
  24. <PaymentCode>820260622861293</PaymentCode>
  25. <BillingInfo1>056</BillingInfo1>
  26. <BillingInfo2>01</BillingInfo2>
  27. <BillingInfo3>430266</BillingInfo3>
  28. <BillingInfo4></BillingInfo4>
  29. <BillingInfo5></BillingInfo5>
  30. <BillingInfo6></BillingInfo6>
  31. <BillingInfo7></BillingInfo7>
  32. <BillingInfo8></BillingInfo8>
  33. <BillingInfo9></BillingInfo9>
  34. <BillingInfo10></BillingInfo10>
  35. <BranchCode>502</BranchCode>
  36. <ChannelType>7012</ChannelType>
  37. <Currency>IDR</Currency>
  38. <Gmt>2026-06-23 15:54:37</Gmt>
  39. <LocalDateTime>2026-06-23 15:54:37</LocalDateTime>
  40. <SettlementDate>0624</SettlementDate>
  41. <SwitcherCode>171</SwitcherCode>
  42. <TerminalId>21688</TerminalId>
  43. <TerminalLocation>F02</TerminalLocation>
  44. <TransactionId>773956</TransactionId>
  45. <Amount>50000</Amount>
  46. <ResponseCode>00</ResponseCode>
  47. <CustomerName>ABDUL MALIK EFENDI</CustomerName>
  48. <Ntb></Ntb>
  49. <Ntpn></Ntpn>
  50. <Status>
  51. <Status>
  52. <isError>false</isError>
  53. <errorCode>00</errorCode>
  54. <statusDescription>Tagihan Sukses</statusDescription>
  55. </Status>
  56. </Status>
  57. </InquiryResult>
  58. </InquiryResponse>
  59. </SOAP-ENV:Body>
  60. </SOAP-ENV:Envelope>`;
  61. xmlPaymentsResponse = `<?xml version="1.0" encoding="utf-8"?>
  62. <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  63. <SOAP-ENV:Body>
  64. <PaymentsResponse xmlns="http://btn.co.id/MPNService">
  65. <PaymentsResult>
  66. <PaymentCode>926062310585879</PaymentCode>
  67. <BankId>520200000990</BankId>
  68. <BillingInfo1>999</BillingInfo1>
  69. <BillingInfo2>01</BillingInfo2>
  70. <BillingInfo3>960186</BillingInfo3>
  71. <BillingInfo4></BillingInfo4>
  72. <BillingInfo5></BillingInfo5>
  73. <BillingInfo6>Jl. H. R. Rasuna Said No.1, RT.1/RW.6, Guntur</BillingInfo6>
  74. <BillingInfo7></BillingInfo7>
  75. <BillingInfo8></BillingInfo8>
  76. <BillingInfo9></BillingInfo9>
  77. <BillingInfo10></BillingInfo10>
  78. <BranchCode>999</BranchCode>
  79. <ChannelType>7015</ChannelType>
  80. <Currency>IDR</Currency>
  81. <Gmt>2026-06-23 14:51:56</Gmt>
  82. <LocalDateTime>2026-06-23 14:51:53</LocalDateTime>
  83. <SettlementDate>0623</SettlementDate>
  84. <SwitcherCode>011</SwitcherCode>
  85. <TerminalId>3000009</TerminalId>
  86. <TerminalLocation>I99</TerminalLocation>
  87. <TransactionId>001685</TransactionId>
  88. <Amount>1000000</Amount>
  89. <BillerAccountNumber>1601300020711</BillerAccountNumber>
  90. <ResponseCode>00</ResponseCode>
  91. <CustomerName>MUFID MAN</CustomerName>
  92. <Ntb>300000003125</Ntb>
  93. <Ntpn>BDCB88Q3MDT0KTGN</Ntpn>
  94. <Status>
  95. <Status>
  96. <isError>false</isError>
  97. <errorCode>00</errorCode>
  98. <statusDescription>Payment Sukses</statusDescription>
  99. </Status>
  100. </Status>
  101. </PaymentsResult>
  102. </PaymentsResponse>
  103. </SOAP-ENV:Body>
  104. </SOAP-ENV:Envelope>`;
  105. } else {
  106. xmlInquiryResponse = `<?xml version="1.0" encoding="utf-8"?>
  107. <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  108. <SOAP-ENV:Body>
  109. <InquiryResponse xmlns="http://btn.co.id/MPNService">
  110. <InquiryResult>
  111. <PaymentCode></PaymentCode>
  112. <BillingInfo1></BillingInfo1>
  113. <BillingInfo2></BillingInfo2>
  114. <BillingInfo3></BillingInfo3>
  115. <BillingInfo4></BillingInfo4>
  116. <BillingInfo5></BillingInfo5>
  117. <BillingInfo6></BillingInfo6>
  118. <BillingInfo7></BillingInfo7>
  119. <BillingInfo8></BillingInfo8>
  120. <BillingInfo9></BillingInfo9>
  121. <BillingInfo10></BillingInfo10>
  122. <BranchCode></BranchCode>
  123. <ChannelType></ChannelType>
  124. <Currency></Currency>
  125. <Gmt></Gmt>
  126. <LocalDateTime></LocalDateTime>
  127. <SettlementDate></SettlementDate>
  128. <SwitcherCode></SwitcherCode>
  129. <TerminalId></TerminalId>
  130. <TerminalLocation></TerminalLocation>
  131. <TransactionId></TransactionId>
  132. <Amount></Amount>
  133. <ResponseCode></ResponseCode>
  134. <CustomerName></CustomerName>
  135. <Ntb></Ntb>
  136. <Ntpn></Ntpn>
  137. <Status>
  138. <Status>
  139. <isError>true</isError>
  140. <errorCode>01</errorCode>
  141. <statusDescription>Invalid Customer Id</statusDescription>
  142. </Status>
  143. </Status>
  144. </InquiryResult>
  145. </InquiryResponse>
  146. </SOAP-ENV:Body>
  147. </SOAP-ENV:Envelope>`;
  148. xmlPaymentsResponse = `<?xml version="1.0" encoding="utf-8"?>
  149. <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  150. <SOAP-ENV:Body>
  151. <PaymentsResponse xmlns="http://btn.co.id/MPNService">
  152. <PaymentsResult>
  153. <PaymentCode></PaymentCode>
  154. <BankId></BankId>
  155. <BillingInfo1></BillingInfo1>
  156. <BillingInfo2></BillingInfo2>
  157. <BillingInfo3></BillingInfo3>
  158. <BillingInfo4></BillingInfo4>
  159. <BillingInfo5></BillingInfo5>
  160. <BillingInfo6></BillingInfo6>
  161. <BillingInfo7></BillingInfo7>
  162. <BillingInfo8></BillingInfo8>
  163. <BillingInfo9></BillingInfo9>
  164. <BillingInfo10></BillingInfo10>
  165. <BranchCode></BranchCode>
  166. <ChannelType></ChannelType>
  167. <Currency></Currency>
  168. <Gmt></Gmt>
  169. <LocalDateTime></LocalDateTime>
  170. <SettlementDate></SettlementDate>
  171. <SwitcherCode></SwitcherCode>
  172. <TerminalId></TerminalId>
  173. <TerminalLocation></TerminalLocation>
  174. <TransactionId></TransactionId>
  175. <Amount></Amount>
  176. <BillerAccountNumber></BillerAccountNumber>
  177. <ResponseCode></ResponseCode>
  178. <CustomerName></CustomerName>
  179. <Ntb></Ntb>
  180. <Ntpn></Ntpn>
  181. <Status>
  182. <Status>
  183. <isError>true</isError>
  184. <errorCode>01</errorCode>
  185. <statusDescription>Invalid Customer Id</statusDescription>
  186. </Status>
  187. </Status>
  188. </PaymentsResult>
  189. </PaymentsResponse>
  190. </SOAP-ENV:Body>
  191. </SOAP-ENV:Envelope>`;
  192. }
  193. if (paymentCode.startsWith('0') || paymentCode.startsWith('1') || paymentCode.startsWith('2') || paymentCode.startsWith('3')) {
  194. xmlInquiryResponse = `<?xml version="1.0" encoding="utf-8"?>
  195. <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  196. <SOAP-ENV:Body>
  197. <Inquiry xmlns="http://btn.co.id/MPNService">
  198. <paymentCode>031411231406157</paymentCode>
  199. <branchCode>F86</branchCode>
  200. <channelType>7012</channelType>
  201. <gmt>2026-07-22 06:06:32</gmt>
  202. <localDateTime>2026-07-22 06:06:32</localDateTime>
  203. <settlementDate>0722</settlementDate>
  204. <currency>IDR</currency>
  205. <switcherCode>001</switcherCode>
  206. <terminalId>21342</terminalId>
  207. <terminalLocation>F86</terminalLocation>
  208. <transactionId>000001</transactionId>
  209. <billingInfo1></billingInfo1>
  210. </Inquiry>
  211. </SOAP-ENV:Body>
  212. </SOAP-ENV:Envelope>`
  213. xmlPaymentsResponse = `<?xml version="1.0" encoding="utf-8"?>
  214. <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  215. <SOAP-ENV:Body>
  216. <PaymentsResult xmlns="http://btn.co.id/MPNService">
  217. <PaymentCode>031411231406157</PaymentCode>
  218. <BankId>520200000990</BankId>
  219. <BillingInfo1>827882283955000</BillingInfo1>
  220. <BillingInfo2>1</BillingInfo2>
  221. <BillingInfo3></BillingInfo3>
  222. <BillingInfo4></BillingInfo4>
  223. <BillingInfo5></BillingInfo5>
  224. <BillingInfo6>7371032206720005000000-JL. MERDEKA - KABUPATEN MA</BillingInfo6>
  225. <BillingInfo7></BillingInfo7>
  226. <BillingInfo8></BillingInfo8>
  227. <BillingInfo9></BillingInfo9>
  228. <BillingInfo10></BillingInfo10>
  229. <BranchCode>586</BranchCode>
  230. <ChannelType>7012</ChannelType>
  231. <Currency>IDR</Currency>
  232. <Gmt>2026-07-22 06:06:41</Gmt>
  233. <LocalDateTime>2026-07-22 06:06:41</LocalDateTime>
  234. <SettlementDate>0722</SettlementDate>
  235. <SwitcherCode>171</SwitcherCode>
  236. <TerminalId>21342</TerminalId>
  237. <TerminalLocation>F86</TerminalLocation>
  238. <TransactionId>638096</TransactionId>
  239. <Amount>2007687</Amount>
  240. <BillerAccountNumber>1401390005391</BillerAccountNumber>
  241. <ResponseCode>00</ResponseCode>
  242. <CustomerName>TEDY PANDY</CustomerName>
  243. <Ntb>002134200002</Ntb>
  244. <Ntpn>8F1D967R100BFE2D</Ntpn>
  245. <Status>
  246. <Status>
  247. <isError>false</isError>
  248. <errorCode>00</errorCode>
  249. <statusDescription>Payment Sukses</statusDescription>
  250. </Status>
  251. </Status>
  252. <BranchId>00586</BranchId>
  253. </PaymentsResult>
  254. </SOAP-ENV:Body>
  255. </SOAP-ENV:Envelope>`
  256. } else if (paymentCode.startsWith('4') || paymentCode.startsWith('5') || paymentCode.startsWith('6')) {
  257. xmlInquiryResponse = `<?xml version="1.0" encoding="utf-8"?>
  258. <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  259. <SOAP-ENV:Body>
  260. <InquiryResponse xmlns="http://btn.co.id/MPNService">
  261. <InquiryResult>
  262. <PaymentCode>620191000189290</PaymentCode>
  263. <BankId>520200000990</BankId>
  264. <BillingInfo1>000000000000000</BillingInfo1>
  265. <BillingInfo2>73</BillingInfo2>
  266. <BillingInfo3>A000091909230EDH20190930</BillingInfo3>
  267. <BillingInfo4>2019-10-21</BillingInfo4>
  268. <BillingInfo5>050100</BillingInfo5>
  269. <BillingInfo6></BillingInfo6>
  270. <BillingInfo7></BillingInfo7>
  271. <BillingInfo8></BillingInfo8>
  272. <BillingInfo9></BillingInfo9>
  273. <BillingInfo10></BillingInfo10>
  274. <BranchCode>35</BranchCode>
  275. <ChannelType>7010</ChannelType>
  276. <Currency>IDR</Currency>
  277. <Gmt>2019-10-22 08:37:21</Gmt>
  278. <LocalDateTime>2019-10-22 08:42:30</LocalDateTime>
  279. <SettlementDate>1022</SettlementDate>
  280. <SwitcherCode>031</SwitcherCode>
  281. <TerminalId>9903512</TerminalId>
  282. <TerminalLocation>C35</TerminalLocation>
  283. <TransactionId>193593</TransactionId>
  284. <Amount>576000</Amount>
  285. <ResponseCode>00</ResponseCode>
  286. <CustomerName>yanto suyanto</CustomerName>
  287. <Ntb></Ntb>
  288. <Ntpn></Ntpn>
  289. <Status>
  290. <Status>
  291. <isError>false</isError>
  292. <errorCode>00</errorCode>
  293. <statusDescription>Tagihan Sukses</statusDescription>
  294. </Status>
  295. </Status>
  296. </InquiryResult>
  297. </InquiryResponse>
  298. </SOAP-ENV:Body>
  299. </SOAP-ENV:Envelope>`
  300. xmlPaymentsResponse = `<?xml version="1.0" encoding="utf-8"?>
  301. <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  302. <SOAP-ENV:Body>
  303. <PaymentsResponse xmlns="http://btn.co.id/MPNService">
  304. <PaymentsResult>
  305. <PaymentCode>620191000189290</PaymentCode>
  306. <BankId>520200000990</BankId>
  307. <BillingInfo1>000000000000000</BillingInfo1>
  308. <BillingInfo2>73</BillingInfo2>
  309. <BillingInfo3>A000091909230EDH20190930</BillingInfo3>
  310. <BillingInfo4>2019-10-21</BillingInfo4>
  311. <BillingInfo5>050100</BillingInfo5>
  312. <BillingInfo6></BillingInfo6>
  313. <BillingInfo7></BillingInfo7>
  314. <BillingInfo8></BillingInfo8>
  315. <BillingInfo9></BillingInfo9>
  316. <BillingInfo10></BillingInfo10>
  317. <BranchCode>35</BranchCode>
  318. <ChannelType>7010</ChannelType>
  319. <Currency>IDR</Currency>
  320. <Gmt>2019-10-22 08:37:29</Gmt>
  321. <LocalDateTime>2019-10-22 08:42:38</LocalDateTime>
  322. <SettlementDate>1022</SettlementDate>
  323. <SwitcherCode>391</SwitcherCode>
  324. <TerminalId>9903512</TerminalId>
  325. <TerminalLocation>C35</TerminalLocation>
  326. <TransactionId>835020</TransactionId>
  327. <Amount>576000</Amount>
  328. <BillerAccountNumber>1401390005391</BillerAccountNumber>
  329. <ResponseCode>00</ResponseCode>
  330. <CustomerName>YANTO SUYANTO</CustomerName>
  331. <Ntb>990351141057</Ntb>
  332. <Ntpn>50B562AF1J0SUMBA</Ntpn>
  333. <Status>
  334. <Status>
  335. <isError>false</isError>
  336. <errorCode>00</errorCode>
  337. <statusDescription>Payment Sukses</statusDescription>
  338. </Status>
  339. </Status>
  340. <BranchId>35</BranchId>
  341. </PaymentsResult>
  342. </PaymentsResponse>
  343. </SOAP-ENV:Body>
  344. </SOAP-ENV:Envelope>`
  345. } else {
  346. xmlInquiryResponse = `<?xml version="1.0" encoding="utf-8"?>
  347. <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  348. <SOAP-ENV:Body>
  349. <InquiryResponse xmlns="http://btn.co.id/MPNService">
  350. <InquiryResult>
  351. <PaymentCode>820260721428752</PaymentCode>
  352. <BillingInfo1>056</BillingInfo1>
  353. <BillingInfo2>01</BillingInfo2>
  354. <BillingInfo3>432458</BillingInfo3>
  355. <BillingInfo4></BillingInfo4>
  356. <BillingInfo5></BillingInfo5>
  357. <BillingInfo6></BillingInfo6>
  358. <BillingInfo7></BillingInfo7>
  359. <BillingInfo8></BillingInfo8>
  360. <BillingInfo9></BillingInfo9>
  361. <BillingInfo10></BillingInfo10>
  362. <BranchCode>37</BranchCode>
  363. <ChannelType>7016</ChannelType>
  364. <Currency>IDR</Currency>
  365. <Gmt>2026-07-22 15:46:31</Gmt>
  366. <LocalDateTime>2026-07-22 15:46:31</LocalDateTime>
  367. <SettlementDate>0723</SettlementDate>
  368. <SwitcherCode>171</SwitcherCode>
  369. <TerminalId>22511</TerminalId>
  370. <TerminalLocation>C37</TerminalLocation>
  371. <TransactionId>840448</TransactionId>
  372. <Amount>50000</Amount>
  373. <ResponseCode>00</ResponseCode>
  374. <CustomerName>ENDY PEBRIAN</CustomerName>
  375. <Ntb></Ntb>
  376. <Ntpn></Ntpn>
  377. <Status>
  378. <Status>
  379. <isError>false</isError>
  380. <errorCode>00</errorCode>
  381. <statusDescription>Tagihan Sukses</statusDescription>
  382. </Status>
  383. </Status>
  384. </InquiryResult>
  385. </InquiryResponse>
  386. </SOAP-ENV:Body>
  387. </SOAP-ENV:Envelope>`
  388. xmlPaymentsResponse = `<?xml version="1.0" encoding="utf-8"?>
  389. <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  390. <SOAP-ENV:Body>
  391. <PaymentsResult xmlns="http://btn.co.id/MPNService">
  392. <PaymentCode>820260721428752</PaymentCode>
  393. <BankId>520200000990</BankId>
  394. <BillingInfo1>056</BillingInfo1>
  395. <BillingInfo2>01</BillingInfo2>
  396. <BillingInfo3>432458</BillingInfo3>
  397. <BillingInfo4></BillingInfo4>
  398. <BillingInfo5></BillingInfo5>
  399. <BillingInfo6></BillingInfo6>
  400. <BillingInfo7></BillingInfo7>
  401. <BillingInfo8></BillingInfo8>
  402. <BillingInfo9></BillingInfo9>
  403. <BillingInfo10></BillingInfo10>
  404. <BranchCode>37</BranchCode>
  405. <ChannelType>7016</ChannelType>
  406. <Currency>IDR</Currency>
  407. <Gmt>2026-07-22 15:47:23</Gmt>
  408. <LocalDateTime>2026-07-22 15:47:23</LocalDateTime>
  409. <SettlementDate>0723</SettlementDate>
  410. <SwitcherCode>001</SwitcherCode>
  411. <TerminalId>22511</TerminalId>
  412. <TerminalLocation>C37</TerminalLocation>
  413. <TransactionId>640591</TransactionId>
  414. <Amount>50000</Amount>
  415. <BillerAccountNumber>1401390005391</BillerAccountNumber>
  416. <ResponseCode>00</ResponseCode>
  417. <CustomerName>ENDY PEBRIAN</CustomerName>
  418. <Ntb>002251100047</Ntb>
  419. <Ntpn>09D652G50CF7J28G</Ntpn>
  420. <Status>
  421. <Status>
  422. <isError>false</isError>
  423. <errorCode>00</errorCode>
  424. <statusDescription>Payment Sukses</statusDescription>
  425. </Status>
  426. </Status>
  427. <BranchId>00037</BranchId>
  428. </PaymentsResult>
  429. </SOAP-ENV:Body>
  430. </SOAP-ENV:Envelope>`
  431. }
  432. if(hasInquiry) {
  433. res.writeHead(200, { 'Content-Type': 'text/xml; charset=ISO-8859-1' });
  434. res.end(xmlInquiryResponse);
  435. } else if (hasPayment) {
  436. res.writeHead(200, { 'Content-Type': 'text/xml; charset=ISO-8859-1' });
  437. res.end(xmlPaymentsResponse);
  438. } else {
  439. res.writeHead(404, { 'Content-Type': 'text/plain' });
  440. res.end('Not found');
  441. }
  442. } else {
  443. res.writeHead(404, { 'Content-Type': 'text/plain' });
  444. res.end('Not found');
  445. }
  446. });
  447. });
  448. server.listen(3123, () => {
  449. console.log('SOAP dummy running at http://localhost:3123/dummy-mpn');
  450. });