| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628 |
- const http = require('http');
- const server = http.createServer((req, res) => {
- let body = '';
- req.on('data', (chunk) => {
- body += chunk;
- });
- req.on('end', () => {
- console.log('request to '+req.url)
- console.log(body)
- console.log(' ')
- if (req.url === '/dummy-pdam-inquiry-1002' && req.method === 'POST') {
- const xmlPdamResponse = `<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
- <SOAP-ENV:Body>
- <InquiryResponse xmlns="http://BTN-PDAM_BANJARMASIN/">
- <InquiryResult>
- <id_Pelanggan>03031177</id_Pelanggan>
- <nama_Pelanggan>M RIZA FACHRIZI</nama_Pelanggan>
- <alamat_Pelanggan>Jl.Martapura Lama KOMP KARYA BUDI 3 BLKA No.45 Rt.-</alamat_Pelanggan>
- <tagihan_Bulan>201801</tagihan_Bulan>
- <stand_Awal>822</stand_Awal>
- <stand_Akhir>835</stand_Akhir>
- <pemakaian_Akhir>13</pemakaian_Akhir>
- <harga_Air>76551</harga_Air>
- <golongan>A2-2</golongan>
- <biaya_GantiMeter>0</biaya_GantiMeter>
- <biaya_Denda>0</biaya_Denda>
- <biaya_Materai>0</biaya_Materai>
- <biaya_Abonemen>0</biaya_Abonemen>
- <biaya_Limbah>0</biaya_Limbah>
- <biaya_Sampah>0</biaya_Sampah>
- <total_Tagihan>89051</total_Tagihan>
- <status>
- <Status>
- <isError>false</isError>
- <errorCode>00</errorCode>
- <statusDescription>success inquiry</statusDescription>
- </Status>
- </status>
- </InquiryResult>
- </InquiryResponse>
- </SOAP-ENV:Body>
- </SOAP-ENV:Envelope>`;
-
- res.writeHead(200, { 'Content-Type': 'text/xml; charset=ISO-8859-1' });
- res.end(xmlPdamResponse);
- console.log('response from '+req.url);
- console.log(xmlPdamResponse);
- } else if (req.url === '/dummy-pdam-inquiry-1005' && req.method === 'POST') {
- const xmlPamResponse = `<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:btn="http://BTN-PAMBANDARMASIH/">
- <soapenv:Body>
- <btn:InquiryResponse>
- <btn:rsp>000</btn:rsp>
- <btn:rspdesc>Success</btn:rspdesc>
- <btn:status>Success</btn:status>
- <btn:ref>ESB064205863</btn:ref>
- <btn:idPelanggan>3051564</btn:idPelanggan>
- <btn:nama>JEMMY ISKANDAR</btn:nama>
- <btn:alamat>JL. SIMPANG LIMAU KOMP. GRAHA RLAND NO. 11 ALEXANDRIT</btn:alamat>
- <btn:tahunBulan>1225-1225</btn:tahunBulan>
- <btn:admin>0</btn:admin>
- <btn:denda>0</btn:denda>
- <btn:standAwal>5.0</btn:standAwal>
- <btn:standAkhir>5.0</btn:standAkhir>
- <btn:pemakaian>1.0</btn:pemakaian>
- <btn:totalBayar>20802</btn:totalBayar>
- </btn:InquiryResponse>
- </soapenv:Body>
- </soapenv:Envelope>`;
-
- res.writeHead(200, { 'Content-Type': 'text/xml; charset=utf-8' });
- res.end(xmlPamResponse);
- console.log('response from '+req.url);
- console.log(xmlPamResponse);
- } else if (req.url === '/dummy-pdam-inquiry-1009' && req.method === 'POST') {
- const xmlPdam1009Response = `<?xml version="1.0" encoding="utf-8"?>
- <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <soap:Body>
- <InquiryResponse xmlns="http://btn.co.id/">
- <InquiryResult>
- <ID_Pelanggan_pdam>1120300071794</ID_Pelanggan_pdam>
- <nama_pelanggan_pdam>MUSLIM</nama_pelanggan_pdam>
- <alamat_pelanggan>KUBANG SEPAT RT 03/07</alamat_pelanggan>
- <id_rayon></id_rayon>
- <billdetails>
- <BillDetail>
- <billyear>2018</billyear>
- <billbulan>01-RB</billbulan>
- <std_awal>1841</std_awal>
- <std_akhir>1868</std_akhir>
- <billName>BL0</billName>
- <reference1></reference1>
- <TotalAmount>108700</TotalAmount>
- <billAmount1>0</billAmount1>
- <billAmount2>0</billAmount2>
- <billAmount3>102200</billAmount3>
- <billAmount4>5000</billAmount4>
- <billAmount5>0</billAmount5>
- <billAmount6>0</billAmount6>
- <billAmount7>0</billAmount7>
- <billAmount8>1500</billAmount8>
- <billAmount9>0</billAmount9>
- <billAmount10>0</billAmount10>
- <pemakaian>27</pemakaian>
- </BillDetail>
- </billdetails>
- <status>
- <Status>
- <isError>false</isError>
- <ErrorCode>00</ErrorCode>
- <StatusDescription>sukses</StatusDescription>
- </Status>
- </status>
- </InquiryResult>
- </InquiryResponse>
- </soap:Body>
- </soap:Envelope>`;
-
- res.writeHead(200, { 'Content-Type': 'text/xml; charset=utf-8' });
- res.end(xmlPdam1009Response);
- console.log('response from '+req.url);
- console.log(xmlPdam1009Response);
- } else if (req.url === '/dummy-pdam-inquiry-1012' && req.method === 'POST') {
- const xmlPdam1012Response = `<?xml version="1.0" encoding="utf-8"?>
- <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <soap:Body>
- <InquiryResponse xmlns="http://btn.co.id/">
- <InquiryResult>
- <ID_Pelanggan_pdam>077633</ID_Pelanggan_pdam>
- <nama_pelanggan_pdam>RISMAWATI</nama_pelanggan_pdam>
- <alamat_pelanggan>SRI REZEKI PESONA BERLIAN No. 3 RT. 17 RW. - Lrg. MANGGA II Perum. - Kel. MAYANG MENGURAI</alamat_pelanggan>
- <id_zona>105513</id_zona>
- <billdetails>
- <BillDetail>
- <tahunbulan>202601</tahunbulan>
- <gol>R2</gol>
- <std_awal>740</std_awal>
- <std_akhir>764</std_akhir>
- <billName>BL0</billName>
- <notrace></notrace>
- <TotalAmount>156400</TotalAmount>
- <billAmount1>0</billAmount1>
- <billAmount2>0</billAmount2>
- <uangair>134400</uangair>
- <pmeter>0</pmeter>
- <denda>0</denda>
- <retribusi>5000</retribusi>
- <materai>0</materai>
- <adm>0</adm>
- <abodemen>17000</abodemen>
- <leges>0</leges>
- <pemakaian>24</pemakaian>
- <gm_kini>0</gm_kini>
- <gm_lalu>0</gm_lalu>
- </BillDetail>
- </billdetails>
- <status>
- <Status>
- <isError>false</isError>
- <ErrorCode>00</ErrorCode>
- <StatusDescription>sukses</StatusDescription>
- </Status>
- </status>
- </InquiryResult>
- </InquiryResponse>
- </soap:Body>
- </soap:Envelope>`;
-
- res.writeHead(200, { 'Content-Type': 'text/xml; charset=utf-8' });
- res.end(xmlPdam1012Response);
- console.log('response from '+req.url);
- console.log(xmlPdam1012Response);
- } else if (req.url === '/dummy-pdam-inquiry-1018' && req.method === 'POST') {
- const xmlPdam1018Response = `<?xml version="1.0" encoding="utf-8"?>
- <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <soap:Body>
- <InquiryResponse xmlns="http://BTN-PDAMBEKASI/">
- <InquiryResult>
- <Idpelanggan>08070390061</Idpelanggan>
- <Namapelanggan>MUH.TAUKHID</Namapelanggan>
- <Alamatpelanggan>PRM.CANDRABAGA B.AS7 NO.02</Alamatpelanggan>
- <Tagihanbulan>052026</Tagihanbulan>
- <Pemakaianair>37</Pemakaianair>
- <Tagihanair>397400</Tagihanair>
- <Biayadenda>0</Biayadenda>
- <Tagihannonair>0</Tagihannonair>
- <Tagihanlalu>0</Tagihanlalu>
- <Totaltagihan>397400</Totaltagihan>
- <Tagihan>397400</Tagihan>
- <Stawal>4917</Stawal>
- <Stakhir>4954</Stakhir>
- <Status>
- <errorCode>00</errorCode>
- <statusDescription>Request Sukses</statusDescription>
- </Status>
- </InquiryResult>
- </InquiryResponse>
- </soap:Body>
- </soap:Envelope>`;
-
- res.writeHead(200, { 'Content-Type': 'text/xml; charset=utf-8' });
- res.end(xmlPdam1018Response);
- console.log('response from '+req.url);
- console.log(xmlPdam1018Response);
- } else if (req.url === '/dummy-pdam-pay-1002' && req.method === 'POST') {
- const xmlPdam1002Response = `<?xml version="1.0" encoding="utf-8"?>
- <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <soap:Body>
- <PaymentResponse xmlns="http://BTN-PDAM_BANJARMASIN/">
- <PaymentResult>
- <id_Pelanggan>03031177</id_Pelanggan>
- <ppn>8,905.10</ppn>
- <status>
- <Status>
- <isError>false</isError>
- <errorCode>00</errorCode>
- <statusDescription>success payment</statusDescription>
- </Status>
- </status>
- </PaymentResult>
- </PaymentResponse>
- </soap:Body>
- </soap:Envelope>`;
-
- res.writeHead(200, { 'Content-Type': 'text/xml; charset=utf-8' });
- res.end(xmlPdam1002Response);
- console.log('response from '+req.url);
- console.log(xmlPdam1002Response);
- }
- else if (req.url === '/dummy-pdam-pay-1012' && req.method === 'POST') {
- const xmlPdam1012Response = `<?xml version="1.0" encoding="utf-8"?>
- <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <soap:Body>
- <PaymentResponse xmlns="http://BTN-PDAM_BANJARMASIN/">
- <PaymentResult>
- <status>
- <Status>
- <isError>false</isError>
- <ErrorCode>00</ErrorCode>
- <StatusDescription>success payment</StatusDescription>
- </Status>
- </status>
- </PaymentResult>
- </PaymentResponse>
- </soap:Body>
- </soap:Envelope>`;
-
- res.writeHead(200, { 'Content-Type': 'text/xml; charset=utf-8' });
- res.end(xmlPdam1012Response);
- console.log('response from '+req.url);
- console.log(xmlPdam1012Response);
- }
- else if (req.url === '/dummy-pdam-pay-1005' && req.method === 'POST') {
- const xmlPdam1005Response = `<?xml version="1.0" encoding="utf-8"?>
- <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:btn="http://BTN-PAMBANDARMASIH/">
- <soapenv:Body>
- <btn:PaymentResponse>
- <btn:rsp>000</btn:rsp>
- <btn:rspdesc>PAYMENT SUCCESS</btn:rspdesc>
- <btn:status>Success</btn:status>
- <btn:ref>ESB064205863</btn:ref>
- <btn:idPelanggan>3051564</btn:idPelanggan>
- <btn:nama>JEMMY ISKANDAR</btn:nama>
- <btn:alamat>JL. SIMPANG LIMAU KOMP. GRAHA RLAND NO. 11 ALEXANDRIT</btn:alamat>
- <btn:tahunBulan>1225-1225</btn:tahunBulan>
- <btn:admin>0</btn:admin>
- <btn:denda>0</btn:denda>
- <btn:standAwal>4.65</btn:standAwal>
- <btn:standAkhir>5.41</btn:standAkhir>
- <btn:pemakaian>0.76</btn:pemakaian>
- <btn:totalBayar>20802</btn:totalBayar>
- </btn:PaymentResponse>
- </soapenv:Body>
- </soapenv:Envelope>`;
-
- res.writeHead(200, { 'Content-Type': 'text/xml; charset=utf-8' });
- res.end(xmlPdam1005Response);
- console.log('response from '+req.url);
- console.log(xmlPdam1005Response);
- }
-
-
-
- // Endpoint 1009 - PDAM (btn.co.id)
- else if (req.url === '/dummy-pdam-pay-1009' && req.method === 'POST') {
- const xmlPdam1009Response = `<?xml version="1.0" encoding="utf-8"?>
- <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <soap:Body>
- <PaymentResponse xmlns="http://btn.co.id/">
- <PaymentResult>
- <ID_Pelanggan_pdam>1120300071794</ID_Pelanggan_pdam>
- <nama_pelanggan_pdam>MUSLIM</nama_pelanggan_pdam>
- <alamat_pelanggan>KUBANG SEPAT RT 03/07</alamat_pelanggan>
- <status>
- <Status>
- <isError>false</isError>
- <ErrorCode>00</ErrorCode>
- <StatusDescription>Sukses Payment</StatusDescription>
- </Status>
- </status>
- </PaymentResult>
- </PaymentResponse>
- </soap:Body>
- </soap:Envelope>`;
-
- res.writeHead(200, { 'Content-Type': 'text/xml; charset=utf-8' });
- res.end(xmlPdam1009Response);
- console.log('response from '+req.url);
- console.log(xmlPdam1009Response);
- }
-
- // Endpoint 1018 - PDAM Bekasi
- else if (req.url === '/dummy-pdam-pay-1018' && req.method === 'POST') {
- const xmlPdam1018Response = `<?xml version="1.0" encoding="utf-8"?>
- <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <soap:Body>
- <PaymentResponse xmlns="http://BTN-PDAMBEKASI/">
- <PaymentResult>
- <Idpelanggan>08070390061</Idpelanggan>
- <Namapelanggan></Namapelanggan>
- <Alamatpelanggan></Alamatpelanggan>
- <Tagihanbulan></Tagihanbulan>
- <Pemakaianair>0</Pemakaianair>
- <Tagihanair>0</Tagihanair>
- <Biayadenda>0</Biayadenda>
- <Tagihannonair>0</Tagihannonair>
- <Tagihanlalu>0</Tagihanlalu>
- <Totaltagihan>0</Totaltagihan>
- <Tagihan>0</Tagihan>
- <Stawal>0</Stawal>
- <Stakhir>0</Stakhir>
- <Status>
- <errorCode>00</errorCode>
- <statusDescription>Request Sukses</statusDescription>
- </Status>
- </PaymentResult>
- </PaymentResponse>
- </soap:Body>
- </soap:Envelope>`;
-
- res.writeHead(200, { 'Content-Type': 'text/xml; charset=utf-8' });
- res.end(xmlPdam1018Response);
- console.log('response from '+req.url);
- console.log(xmlPdam1018Response);
- }
- // Endpoint 1084 - PDAM Mamuju Inquiry
- else if (req.url === '/dummy-pdam-inquiry-1084' && req.method === 'POST') {
- const xmlPdam1084InquiryResponse = `<?xml version="1.0" encoding="utf-8"?>
- <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:btn="http://BTN-PDAM-MAMUJU/">
- <soapenv:Body>
- <btn:InquiryResponse>
- <btn:rsp>000</btn:rsp>
- <btn:rspdesc>Transaction Sukses</btn:rspdesc>
- <btn:ref>13</btn:ref>
- <btn:sysReferenceNo>ESTAMP20260602093326</btn:sysReferenceNo>
- <btn:kodePDAM>005-00001</btn:kodePDAM>
- <btn:noSambungan>10200409457</btn:noSambungan>
- <btn:nama>FERRY HOEIDJAYA</btn:nama>
- <btn:alamat>JL KS TUBUN</btn:alamat>
- <btn:golongan>N3</btn:golongan>
- <btn:periode>202605</btn:periode>
- <btn:kubikase>35</btn:kubikase>
- <btn:jumlahRekening>1</btn:jumlahRekening>
- <btn:totalTagihan>365000</btn:totalTagihan>
- <btn:totalDenda>0</btn:totalDenda>
- <btn:grandTotal>365000</btn:grandTotal>
- <btn:periodeRekeningDibayar>202605;365000</btn:periodeRekeningDibayar>
- <btn:tagihan>
- <btn:periode>202605</btn:periode>
- <btn:stanAwal>2182.0</btn:stanAwal>
- <btn:stanAkhir>2217.0</btn:stanAkhir>
- <btn:kubikase>35.0</btn:kubikase>
- <btn:subtotal>365000</btn:subtotal>
- <btn:jumlahItem>5</btn:jumlahItem>
- <btn:items>ADMINISTRASI;2500</btn:items>
- </btn:tagihan>
- </btn:InquiryResponse>
- </soapenv:Body>
- </soapenv:Envelope>`;
-
- res.writeHead(200, { 'Content-Type': 'text/xml; charset=utf-8' });
- res.end(xmlPdam1084InquiryResponse);
- console.log('response from '+req.url);
- console.log(xmlPdam1084InquiryResponse);
- }
-
-
- // Endpoint 1084 - PDAM Mamuju Payment
- else if (req.url === '/dummy-pdam-pay-1084' && req.method === 'POST') {
- const xmlPdam1084PaymentResponse = `<?xml version="1.0" encoding="utf-8"?>
- <soapenv:Envelope xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:btn="http://BTN-PDAM-MAMUJU/">
- <soapenv:Body>
- <btn:PaymentResponse>
- <btn:rsp>000</btn:rsp>
- <btn:rspdesc>Transaction Sukses</btn:rspdesc>
- <btn:ref>14</btn:ref>
- <btn:sysReferenceNo>ESTAMP20260602093436</btn:sysReferenceNo>
- <btn:kodePDAM>005-00001</btn:kodePDAM>
- <btn:noSambungan>10200409457</btn:noSambungan>
- </btn:PaymentResponse>
- </soapenv:Body>
- </soapenv:Envelope>`;
-
- res.writeHead(200, { 'Content-Type': 'text/xml; charset=utf-8' });
- res.end(xmlPdam1084PaymentResponse);
- console.log('response from '+req.url);
- console.log(xmlPdam1084PaymentResponse);
- }
- // Endpoint 1011 - PDAM Makassar Inquiry
- else if (req.url === '/dummy-pdam-inquiry-1011' && req.method === 'POST') {
- const xmlPdam1011InquiryResponse = `<?xml version="1.0" encoding="utf-8"?>
- <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <soap:Body>
- <InquiryResponse xmlns="http://BTN-PDAM_MAKASAR/">
- <InquiryResult>
- <billinfo6>AHMAD YANI</billinfo6>
- <billinfo8>JL. SULTAN ALAUDDIN NO. 123</billinfo8>
- <billinfo9>199802098</billinfo9>
- <totalAmount>152800</totalAmount>
- <status>
- <Status>
- <errorCode>00</errorCode>
- <errorDescription>Sukses</errorDescription>
- </Status>
- </status>
- </InquiryResult>
- </InquiryResponse>
- </soap:Body>
- </soap:Envelope>`;
-
- res.writeHead(200, { 'Content-Type': 'text/xml; charset=utf-8' });
- res.end(xmlPdam1011InquiryResponse);
- console.log('response from '+req.url);
- console.log(xmlPdam1011InquiryResponse);
- }
- else if (req.url === '/dummy-pdam-inquiry-1012' && req.method === 'POST') {
- const xmlPdam1012InquiryResponse = `<?xml version="1.0" encoding="utf-8"?>
- <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <soap:Body>
- <InquiryResponse xmlns="http://btn.co.id/">
- <InquiryResult>
- <status>
- <Status>
- <errorCode>00</errorCode>
- <statusDescription>Sukses</statusDescription>
- </Status>
- </status>
- </InquiryResult>
- </InquiryResponse>
- </soap:Body>
- </soap:Envelope>`;
-
- res.writeHead(200, { 'Content-Type': 'text/xml; charset=utf-8' });
- res.end(xmlPdam1012InquiryResponse);
- console.log('response from '+req.url);
- console.log(xmlPdam1012InquiryResponse);
- }
-
- // Endpoint 1011 - PDAM Makassar Payment
- else if (req.url === '/dummy-pdam-pay-1011' && req.method === 'POST') {
- const xmlPdam1011PaymentResponse = `<?xml version="1.0" encoding="utf-8"?>
- <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <soap:Body>
- <PaymentResponse xmlns="http://BTN-PDAM_MAKASAR/">
- <PaymentResult>
- <billinfo1>199802098 </billinfo1>
- <billinfo2>152800</billinfo2>
- <status>
- <Status>
- <isError>false</isError>
- <ErrorCode>00</ErrorCode>
- <StatusDescription>Sukses</StatusDescription>
- </Status>
- </status>
- </PaymentResult>
- </PaymentResponse>
- </soap:Body>
- </soap:Envelope>`;
-
- res.writeHead(200, { 'Content-Type': 'text/xml; charset=utf-8' });
- res.end(xmlPdam1011PaymentResponse);
- console.log('response from '+req.url);
- console.log(xmlPdam1011PaymentResponse);
- }
- // Endpoint 1008 - PDAM Intan Banjar Inquiry
- else if (req.url === '/dummy-pdam-inquiry-1008' && req.method === 'POST') {
- const xmlPdam1008InquiryResponse = `<?xml version="1.0" encoding="utf-8"?>
- <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:btn="http://BTN-PDAM-INTANBANJAR/">
- <soapenv:Header/>
- <soapenv:Body>
- <Inquiry_response>
- <status>0000</status>
- <statusdesc>Successful</statusdesc>
- <reference>6VRSE87BFCCF36M882P55ICQH4ENZSS1</reference>
- <totalTagihan>168000</totalTagihan>
- <MTI>2110</MTI>
- <id>49005284</id>
- <name>SINTA NUR AULIA</name>
- <address>PERUM. NUR AISYA LESTARI IV NO. 25 RT. RW.</address>
- <tariffCode>05-RT.A3</tariffCode>
- <creditBalance>0</creditBalance>
- <month>0426-0426</month>
- <waterUsage>14</waterUsage>
- <amount>168000</amount>
- <merchantCategory>6017</merchantCategory>
- <partnerid>PIB008</partnerid>
- </Inquiry_response>
- </soapenv:Body>
- </soapenv:Envelope>`;
-
- res.writeHead(200, { 'Content-Type': 'text/xml; charset=utf-8' });
- res.end(xmlPdam1008InquiryResponse);
- console.log('response from '+req.url);
- console.log(xmlPdam1008InquiryResponse);
- }
- //aa
- // Endpoint 1008 - PDAM Intan Banjar Payment
- else if (req.url === '/dummy-pdam-pay-1008' && req.method === 'POST') {
- const xmlPdam1008PaymentResponse = `<?xml version="1.0" encoding="utf-8"?>
- <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:btn="http://BTN-PDAM-INTANBANJAR/">
- <soapenv:Header/>
- <soapenv:Body>
- <Payment_response>
- <status>0000</status>
- <statusdesc>Successful</statusdesc>
- <reference>6VRSE87BFCCF36M882P55ICQH4ENZSS1</reference>
- <totalTagihan>168000</totalTagihan>
- <totalDenda>12000</totalDenda>
- <MTI>2210</MTI>
- <id>49005284</id>
- <name>SINTA NUR AULIA</name>
- <address>PERUM. NUR AISYA LESTARI IV NO. 25 RT. RW.</address>
- <tariffCode>05-RT.A3</tariffCode>
- <creditBalance>0</creditBalance>
- <month>0426-0426</month>
- <waterUsage>14</waterUsage>
- <amount>168000</amount>
- <merchantCategory>6017</merchantCategory>
- <partnerid>PIB008</partnerid>
- <trxIncrement>001</trxIncrement>
- <information>DIHIMBAU Pelanggan agar secara berkala memeriksa INSTALASI DALAM utk menghindari kebocoran yg mengakibatkan TAGIHAN MELONJAK. Terimakasih</information>
- <previousMeter>101</previousMeter>
- <currentMeter>115</currentMeter>
- <waterPrice>136000</waterPrice>
- <fixedCharge>20000</fixedCharge>
- <penalty>12000</penalty>
- <installment>0</installment>
- <othersCost>0</othersCost>
- <revenueStamp>0</revenueStamp>
- <dateTime>20260521163334</dateTime>
- <othersInfo>Saldo:</othersInfo>
- </Payment_response>
- </soapenv:Body>
- </soapenv:Envelope>`;
-
- res.writeHead(200, { 'Content-Type': 'text/xml; charset=utf-8' });
- res.end(xmlPdam1008PaymentResponse);
- console.log('response from '+req.url);
- console.log(xmlPdam1008PaymentResponse);
- }
-
- // Endpoint 1023 - PDAM Bandung Inquiry
- else if (req.url === '/dummy-pdam-inquiry-1023' && req.method === 'POST') {
- const xmlPdam1023InquiryResponse = `<?xml version="1.0" encoding="utf-8"?>
- <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <soap:Body>
- <InquiryResponse xmlns="http://BTN-PDAMBANDUNG/">
- <InquiryResult>
- <Nama>BUDI SANTOSO</Nama>
- <Almt>JL. SOEKARNO HATTA NO. 456</Almt>
- <Thbl>202501</Thbl>
- <Tmet>25</Tmet>
- <TagBulanIni>125000</TagBulanIni>
- <TagTunggakan>10</TagTunggakan>
- <Dndblnan>10</Dndblnan>
- <Total>125000</Total>
- <StatusResponse>
- <Status>
- <errorCode>000</errorCode>
- <statusDescription>Sukses</statusDescription>
- </Status>
- </StatusResponse>
- </InquiryResult>
- </InquiryResponse>
- </soap:Body>
- </soap:Envelope>`;
-
- res.writeHead(200, { 'Content-Type': 'text/xml; charset=utf-8' });
- res.end(xmlPdam1023InquiryResponse);
- console.log('response from '+req.url);
- console.log(xmlPdam1023InquiryResponse);
- }
-
- // Endpoint 1023 - PDAM Bandung Payment
- else if (req.url === '/dummy-pdam-pay-1023' && req.method === 'POST') {
- const xmlPdam1023PaymentResponse = `<?xml version="1.0" encoding="utf-8"?>
- <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <soap:Body>
- <PaymentResponse xmlns="http://BTN-PDAMBANDUNG/">
- <PaymentResult>
- <JmlTagihan>125000</JmlTagihan>
- <StatusResponse>
- <Status>
- <errorCode>000</errorCode>
- <statusDescription>Sukses</statusDescription>
- </Status>
- </StatusResponse>
- </PaymentResult>
- </PaymentResponse>
- </soap:Body>
- </soap:Envelope>`;
-
- res.writeHead(200, { 'Content-Type': 'text/xml; charset=utf-8' });
- res.end(xmlPdam1023PaymentResponse);
- console.log('response from '+req.url);
- console.log(xmlPdam1023PaymentResponse);
- }
- else {
- res.writeHead(404, { 'Content-Type': 'text/plain' });
- res.end('Not found');
- }
-
- });
- });
- server.listen(3004, () => {
- console.log('SOAP dummy running at http://localhost:3004/dummy-pemko-inquiry-4020');
- });
|