Guest User

Untitled

a guest
Nov 10th, 2017
31
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.15 KB | None | 0 0
  1. var express = require('express'),
  2. router = express.Router(),
  3. multer = require('multer'),
  4. jwt = require('jsonwebtoken'),
  5. bcrypt = require('bcrypt'),
  6. ObjectId = require('mongoose').Types.ObjectId;
  7. var soap = require('soap');
  8.  
  9. //login service
  10.  
  11. router.post('/login', function(req, res, next) {
  12.  
  13. var url ='https://hosting.invers.com/ws/demo/aumo?wsdl';
  14. var args = {
  15. username:'techcon',
  16. password:'6yP9onBBF7PWjvhJ',
  17. providerId:58
  18. }
  19.  
  20. soap.createClient(url, function(err, client) {
  21. //console.log(client);
  22. client.Login(args, function(err, result) {
  23. //console.log(result);
  24. res.json({data:result});
  25. });
  26. });
  27. });
  28.  
  29. //Online Registration
  30. router.post('/saveOnlineRegistration', function(req, res, next) {
  31. var url = 'https://hosting.invers.com/ws/demo/CustomerMasterService?wsdl';
  32. var args = {
  33. "identification":{
  34. SystemuserId: 6803,
  35. Token:'216abb48-2cf1-4624-a77c-ffd74337294a'
  36. },
  37. "onlineRegistration":{
  38. ExternalId:7489327984321,
  39. Provider_Ref:58,
  40. Apartment:'vats residency',
  41. BankAccountNumber:'',
  42. BankAccountOwnerName:'',
  43. BankIBAN:'',
  44. BankName:'',
  45. BankNumber:'',
  46. Birthday:'2017-10-31T00:00:00',
  47. City: 'city',
  48. Created_UTC:'2017-10-31T00:00:00',
  49. CustomerExternalRemark:'',
  50. CustomerInternalRemark:'',
  51. CustomerLabel:'mahesh',
  52. CustomerSecondPin:1234,
  53. CustomerType:'Private',
  54. Debitornumber:'',
  55. DefaultCustomer:1,
  56. DefaultSmartcard:1,
  57. DriverLicenseIssueDate:'2017-10-31T00:00:00',
  58. DriverLicenseNumber:'',
  59. DriverLicensePlaceOfIssue:'',
  60. Email:'mahesh.ponnuru@techconlabs.com',
  61. EmailConfirmation:false,
  62. FirstName:'firstname',
  63. Gender:'Male',
  64. GroupsCustomer:'',
  65. GroupsSystemuser:[],
  66. InvoicePaymentType:'Creditcard',
  67. InvoiceViaEmail:1,
  68. InvoiceViaPost:1,
  69. LastName:'ExampleLastName',
  70. MiddleName:'eee',
  71. MobilePhone:9652891447,
  72. Phone:9652891447,
  73. PostalCode:12345,
  74. PreferredCustomertariff:149,
  75. PreferredLocation:0,
  76. PreferredLoginName:'mahesh',
  77. RegistrationRemark:'',
  78. RegistrationState:'New',
  79. SMSConfirmation:0,
  80. Smartcard_Ref:1,
  81. StreetNo:'Example Street',
  82. TariffEndDate:'2019-10-31T00:00:00',
  83. TariffStartDate:'2017-10-31T00:00:00',
  84. Title:'',
  85. TownPart:'Dennis Townpart',
  86. ValidFrom:'2017-10-31T00:00:00',
  87. ValidUntil:'2019-10-31T00:00:00'
  88. }
  89. }
  90.  
  91. soap.createClient(url, function(err, client) {
  92. //console.log(client);
  93. client.SaveOnlineRegistration(args, function(err, result) {
  94. //console.log(result);
  95. res.json({data:result});
  96. });
  97. });
  98. });
Add Comment
Please, Sign In to add comment