This commit is contained in:
@@ -302,6 +302,7 @@ namespace AyaNova.PlugIn.QBOI
|
|||||||
const string Q2_CLIENT_SECRET = "XUmJyvEcEuwQuyhARUAm0a8G3gzbEAeMiATCLyFZ";
|
const string Q2_CLIENT_SECRET = "XUmJyvEcEuwQuyhARUAm0a8G3gzbEAeMiATCLyFZ";
|
||||||
const string Q2_REDIRECT_URL = "https://qboauth.ayanova.com/redirect";
|
const string Q2_REDIRECT_URL = "https://qboauth.ayanova.com/redirect";
|
||||||
const string Q2_ENVIRONMENT = "Sandbox";
|
const string Q2_ENVIRONMENT = "Sandbox";
|
||||||
|
const string Q2_QBO_BASE_URL = "https://sandbox-quickbooks.api.intuit.com/";
|
||||||
const double Q2_TOKEN_LIFESPAN_MINUTES = 45;//Minutes to hold on to access token before refreshing. Right now oct 2019 it's one hour lifespan.
|
const double Q2_TOKEN_LIFESPAN_MINUTES = 45;//Minutes to hold on to access token before refreshing. Right now oct 2019 it's one hour lifespan.
|
||||||
static string QBOI2_SESSION_TOKEN = "";
|
static string QBOI2_SESSION_TOKEN = "";
|
||||||
public static string ACCESS_TOKEN { get; set; }
|
public static string ACCESS_TOKEN { get; set; }
|
||||||
@@ -413,8 +414,10 @@ namespace AyaNova.PlugIn.QBOI
|
|||||||
{
|
{
|
||||||
//used to tie this session to the auth key on our server for fetching later
|
//used to tie this session to the auth key on our server for fetching later
|
||||||
QBOI2_SESSION_TOKEN = RandomInt64().ToString();
|
QBOI2_SESSION_TOKEN = RandomInt64().ToString();
|
||||||
|
string LicenseId = GlobalEx.GetItem().DigestValue;
|
||||||
|
|
||||||
//shell out to browser for user to login to QB
|
//shell out to browser for user to login to QB
|
||||||
System.Diagnostics.Process.Start("https://qboauth.ayanova.com/start/" + QBOI2_SESSION_TOKEN);
|
System.Diagnostics.Process.Start("https://qboauth.ayanova.com/start/" + QBOI2_SESSION_TOKEN + "/"+ LicenseId);
|
||||||
|
|
||||||
|
|
||||||
//Open dialog that polls for token repeatedly, there is a delay built into the server
|
//Open dialog that polls for token repeatedly, there is a delay built into the server
|
||||||
@@ -473,7 +476,7 @@ namespace AyaNova.PlugIn.QBOI
|
|||||||
|
|
||||||
//' Common setting for both ServiceContexts:
|
//' Common setting for both ServiceContexts:
|
||||||
SC.IppConfiguration.MinorVersion.Qbo = "23";
|
SC.IppConfiguration.MinorVersion.Qbo = "23";
|
||||||
TODO: variableize this: SC.IppConfiguration.BaseUrl.Qbo = "https://sandbox-quickbooks.api.intuit.com/";
|
SC.IppConfiguration.BaseUrl.Qbo = Q2_QBO_BASE_URL;
|
||||||
|
|
||||||
//' Serialization Format Json or xml
|
//' Serialization Format Json or xml
|
||||||
SC.IppConfiguration.Message.Request.SerializationFormat = Intuit.Ipp.Core.Configuration.SerializationFormat.Json;
|
SC.IppConfiguration.Message.Request.SerializationFormat = Intuit.Ipp.Core.Configuration.SerializationFormat.Json;
|
||||||
|
|||||||
Reference in New Issue
Block a user