【问题标题】:IntuIt QuickBooks payments API, How can I perform credit card transactions using servicecontext of IppDotNetSdkForQuickBooksApiV3 package?IntuIt QuickBooks 支付 API,如何使用 IppDotNetSdkForQuickBooksApiV3 包的 servicecontext 执行信用卡交易?
【发布时间】:2015-11-06 08:56:01
【问题描述】:

我已使用 NuGet 包 (IppDotNetSdkForQuickBooksApiV3) 将 IPP .Net SDK for QuickBooks V3.0 引用添加到我的项目中。

我能够对客户帐户数据执行 CRUD 操作。如何使用 servicecontext 执行信用卡交易?

这是我的示例代码,

string consumerKey = "qyprd4rAYMSe4EhBLcGvKrZ8Xb8M3i";
        string consumerKeySecret = "xdYvcPHkjICQ2uJ3yNzFJpI8elHJsnQa127EKrMf";
        string accessToken = "lvprdyTiT1kxH8VhFhzEv3BpiC4cV5fYC3tPKtijE9hdqWk9";
        string accessTokenSecret = "HTkdQ4WYtItio3NXo569py1SqPZ4jDnxfE1FUPZA";
        string Realm = "1440846810";

        OAuthRequestValidator oauthValidator = new OAuthRequestValidator(
        accessToken, accessTokenSecret, consumerKey, consumerKeySecret);


        string appToken = "9f4179e9ba7d4b4343b8986b9935526c724a";
        string companyID = "1440846810";
        ServiceContext context = new ServiceContext(appToken, companyID, IntuitServicesType.QBO, oauthValidator);
        context.IppConfiguration.BaseUrl.Qbo = "https://sandbox-quickbooks.api.intuit.com/";


        DataService service = new DataService(context);

        ChargeCredit charge = new ChargeCredit() { };

        Customer customer = new Customer();
        //Mandatory Fields
        customer.GivenName = "Sridhar";
        customer.Title = "Mr.";
        customer.MiddleName = "Sri";
        customer.FamilyName = "Goshika";
        // Optional Fields
        customer.PrimaryEmailAddr = new EmailAddress() { Address = "sridharnetha@gmail.com" };
        Customer resultCustomer = service.Add(customer) as Customer;            
        return service;

【问题讨论】:

    标签: c# quickbooks intuit-partner-platform quickbooks-online intuit


    【解决方案1】:

    你可以给我发送示例代码以将客户信用详细信息添加到快速手册

        public static void test()
        {
    
            string accessToken = "12432543252345";
            string accessTokenSecret = "5b1cb122b340db43d4bae6bb880c8a284499";
            string consumerKey = "qyprdWTsI8u6Qq3fwiIUvkweM2mabZ";
            string consumerSecret = "9KH9mFlGy5CPSUQCOV2lM3lHGs05AK5TtdS0QLWv";
    
            OAuthRequestValidator oauthValidator = new OAuthRequestValidator(
            accessToken, accessTokenSecret, consumerKey, consumerSecret);
    
            string appToken = "5b1cb122b340db43d4bae6bb880c8a28449";
            string companyID = "32534654";
            ServiceContext context = new ServiceContext(appToken, companyID, IntuitServicesType.QBO, oauthValidator);
    
            DataService service = new DataService(context);
    
            Customer customer = new Customer
            {
                GivenName = "Mary",
                Title = "Ms.",
                MiddleName = "Jayne",
                FamilyName = "Cooper",
                Id = "1234214"
            };
    
            //Mandatory Fields
            customer.CCDetail.Number = "444747447474474";
            customer.CCDetail.CcExpiryMonth = 12;
            customer.CCDetail.CcExpiryYear = 2018;
    
            Customer resultCustomer = service.Add(customer) as Customer;
            }
    

    你能验证一下上面的代码吗? 邮件 id adarsh.p@nxtlive.com

    【讨论】:

      猜你喜欢
      • 2011-01-01
      • 2019-07-28
      • 1970-01-01
      • 2013-11-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-12-02
      • 2023-03-27
      相关资源
      最近更新 更多