Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var express = require('express'),
- router = express.Router(),
- multer = require('multer'),
- jwt = require('jsonwebtoken'),
- bcrypt = require('bcrypt'),
- ObjectId = require('mongoose').Types.ObjectId;
- var soap = require('soap');
- //login service
- router.post('/login', function(req, res, next) {
- var url ='https://hosting.invers.com/ws/demo/aumo?wsdl';
- var args = {
- username:'techcon',
- password:'6yP9onBBF7PWjvhJ',
- providerId:58
- }
- soap.createClient(url, function(err, client) {
- //console.log(client);
- client.Login(args, function(err, result) {
- //console.log(result);
- res.json({data:result});
- });
- });
- });
- //Online Registration
- router.post('/saveOnlineRegistration', function(req, res, next) {
- var url = 'https://hosting.invers.com/ws/demo/CustomerMasterService?wsdl';
- var args = {
- "identification":{
- SystemuserId: 6803,
- Token:'216abb48-2cf1-4624-a77c-ffd74337294a'
- },
- "onlineRegistration":{
- ExternalId:7489327984321,
- Provider_Ref:58,
- Apartment:'vats residency',
- BankAccountNumber:'',
- BankAccountOwnerName:'',
- BankIBAN:'',
- BankName:'',
- BankNumber:'',
- Birthday:'2017-10-31T00:00:00',
- City: 'city',
- Created_UTC:'2017-10-31T00:00:00',
- CustomerExternalRemark:'',
- CustomerInternalRemark:'',
- CustomerLabel:'mahesh',
- CustomerSecondPin:1234,
- CustomerType:'Private',
- Debitornumber:'',
- DefaultCustomer:1,
- DefaultSmartcard:1,
- DriverLicenseIssueDate:'2017-10-31T00:00:00',
- DriverLicenseNumber:'',
- DriverLicensePlaceOfIssue:'',
- Email:'mahesh.ponnuru@techconlabs.com',
- EmailConfirmation:false,
- FirstName:'firstname',
- Gender:'Male',
- GroupsCustomer:'',
- GroupsSystemuser:[],
- InvoicePaymentType:'Creditcard',
- InvoiceViaEmail:1,
- InvoiceViaPost:1,
- LastName:'ExampleLastName',
- MiddleName:'eee',
- MobilePhone:9652891447,
- Phone:9652891447,
- PostalCode:12345,
- PreferredCustomertariff:149,
- PreferredLocation:0,
- PreferredLoginName:'mahesh',
- RegistrationRemark:'',
- RegistrationState:'New',
- SMSConfirmation:0,
- Smartcard_Ref:1,
- StreetNo:'Example Street',
- TariffEndDate:'2019-10-31T00:00:00',
- TariffStartDate:'2017-10-31T00:00:00',
- Title:'',
- TownPart:'Dennis Townpart',
- ValidFrom:'2017-10-31T00:00:00',
- ValidUntil:'2019-10-31T00:00:00'
- }
- }
- soap.createClient(url, function(err, client) {
- //console.log(client);
- client.SaveOnlineRegistration(args, function(err, result) {
- //console.log(result);
- res.json({data:result});
- });
- });
- });
Add Comment
Please, Sign In to add comment