ProManager initial setup.
This commit is contained in:
@@ -8,12 +8,12 @@ using System.Xml.Linq;
|
||||
using Newtonsoft;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using RomeOnlinePartner.Models;
|
||||
using ProManagerPartner.Models;
|
||||
using ToastNotifications.Messages;
|
||||
using System.Threading;
|
||||
using System.Reflection;
|
||||
|
||||
namespace RomeOnlinePartner.Utils
|
||||
namespace ProManagerPartner.Utils
|
||||
{
|
||||
public static class HTTPServer
|
||||
{
|
||||
@@ -29,7 +29,7 @@ namespace RomeOnlinePartner.Utils
|
||||
//QuickBooks Execution Routes.
|
||||
Route.Add("/qb/", (req, res, props) =>
|
||||
{
|
||||
hlog("Received a QuickBooks request from Rome Online");
|
||||
hlog("Received a QuickBooks request from ProManager");
|
||||
res.WithCORS();
|
||||
res.Close();
|
||||
}, "OPTIONS");
|
||||
@@ -41,7 +41,7 @@ namespace RomeOnlinePartner.Utils
|
||||
//Pinging based routes.
|
||||
Route.Add("/ping/", (req, res, props) =>
|
||||
{
|
||||
hlog("Received a ping from Rome Online");
|
||||
hlog("Received a ping from ProManager");
|
||||
res.WithCORS();
|
||||
res.Close();
|
||||
}, "OPTIONS");
|
||||
@@ -52,7 +52,7 @@ namespace RomeOnlinePartner.Utils
|
||||
//FileScanning Routes
|
||||
Route.Add("/scan/", (req, res, props) =>
|
||||
{
|
||||
hlog("Received a scan request from Rome Online");
|
||||
hlog("Received a scan request from ProManager");
|
||||
res.WithCORS();
|
||||
res.Close();
|
||||
}, "OPTIONS");
|
||||
@@ -61,7 +61,7 @@ namespace RomeOnlinePartner.Utils
|
||||
, "POST");
|
||||
Route.Add("/import/", (req, res, props) =>
|
||||
{
|
||||
hlog("Received an import request from Rome Online");
|
||||
hlog("Received an import request from ProManager");
|
||||
res.WithCORS();
|
||||
res.Close();
|
||||
}, "OPTIONS");
|
||||
@@ -71,7 +71,7 @@ namespace RomeOnlinePartner.Utils
|
||||
|
||||
Route.Add("/oec/", (req, res, props) =>
|
||||
{
|
||||
hlog("Received an OEC from Rome Online");
|
||||
hlog("Received an OEC from ProManager");
|
||||
res.WithCORS();
|
||||
res.Close();
|
||||
}, "OPTIONS");
|
||||
@@ -81,7 +81,7 @@ namespace RomeOnlinePartner.Utils
|
||||
|
||||
Route.Add("/ppc/", (req, res, props) =>
|
||||
{
|
||||
hlog("Received an PPC from Rome Online");
|
||||
hlog("Received an PPC from ProManager");
|
||||
res.WithCORS();
|
||||
res.Close();
|
||||
}, "OPTIONS");
|
||||
@@ -118,17 +118,17 @@ namespace RomeOnlinePartner.Utils
|
||||
hlog = HttpLogger;
|
||||
try
|
||||
{
|
||||
hlog("Rome Online connection server starting...");
|
||||
hlog("ProManager connection server starting...");
|
||||
HttpServer.ListenAsync(1337, token, Route.OnHttpRequestAsync).Wait();
|
||||
|
||||
}
|
||||
catch (Exception Ex)
|
||||
{
|
||||
logger.Fatal("Unable to start HTTP server. " + Ex.ToString());
|
||||
hlog("Rome Online connection server could not start. Please restart the partner to try again.");
|
||||
hlog("ProManager connection server could not start. Please restart the partner to try again.");
|
||||
App.Current.Dispatcher.Invoke(() =>
|
||||
{
|
||||
string msg = "Unable to connect to Rome Online Web App. Please ensure your firewall allows the connection.";
|
||||
string msg = "Unable to connect to ProManager Web App. Please ensure your firewall allows the connection.";
|
||||
Utils.Notifications.notifier.ShowError(msg);
|
||||
});
|
||||
Utils.SquirrelAwareHelper.AddHttpExcetion();
|
||||
@@ -197,7 +197,7 @@ namespace RomeOnlinePartner.Utils
|
||||
{
|
||||
try
|
||||
{
|
||||
hlog("Processing QuickBooks request. Rome Online Record ID:" + request.Id);
|
||||
hlog("Processing QuickBooks request. ProManager Record ID:" + request.Id);
|
||||
XDocument response = XDocument.Parse(QuickBooksInterop.ProcessQBXmlRequestUnManaged(request.QbXML));
|
||||
QbXmlResponse ResponseStatus = QuickBooksInterop.ParseResponseXml(response);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user