如何通过QuickBooks验证和授权Asp.Net Web应用程序。 我想在ASP.NET Web应用程序中集成QuickBooks帐户系统我已成功在quickbooks上创建开发者帐户并制作应用程序并获得消费者密钥,消费者秘密和应用程序令牌以及所有URL 知道我需要一些asp.net web api代码剪断,以成功验证和授权我的网络用户,并显示会计详细信息 请帮助我谷歌很多但没有成功。
答案 0 :(得分:0)
我很奇怪这个形式是0%活跃与quickbooks API等有关,经过很多努力我找到了上述问题的答案, 下载Quickbooks IPP.NET SDK,它将为您提供不同的CURD类。
var appToken = "";
var consumerKey = "";
var consumerSecret = "";
// the above 3 fields you can get when create your app on quickbook go to My app----> select youre app--->goto KEYS
var accessToken = "";
var accessTokenSecret = "";
// this two tookens you will get from URL on the same above page
var realmId = "1400728630"; //1400728630
// this is youre company ID which can be used when you create youre //company on freshbook
var serviceType = IntuitServicesType.QBO;
var validator = new OAuthRequestValidator(accessToken, accessTokenSecret, consumerKey, consumerSecret);
var context = new ServiceContext(appToken,realmId, serviceType, validator);
var service = new DataService(context);
try
{
Customer customer = new Customer();
//Mandatory Fields
customer.GivenName = "Mary";
customer.Title = "Ms.";
customer.MiddleName = "Jayne";
customer.FamilyName = "Cooper";
service.AddAsync(customer);
//service.Add(entity);
}catch(Exception ex)
{
System.Console.WriteLine(ex);
}