Click here to Skip to main content
15,894,825 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Customer CreditCard WalletAdd request to QuickBooks from Asp.net mvc

I was trying to add customer credit card details to quickbooks from C# asp.net mvc.I have written below function.But i have confused to request customer credit card details to future uses and how to generate accessToken and AccessToken Secret from the Code.The major doubt is how to request Customer CreditCard WalletAdd request.
C#
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;
}
Posted
Updated 29-Nov-15 22:20pm
v2

1 solution

Why not try the QuickBooks website for support? It is more likely that you will get support there.

QuickBooks Tutorials[^]

or maybe this is a better option: QUICKBOOKS ONLINE API C#/VB.NET CODE EXAMPLES[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900