View TLS 1.1
protected void CreateAuthorization()
{
//Remember these for later.
System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls11;
HttpContext.Current.Session["consumerKey"] = consumerKey;
HttpContext.Current.Session["consumerSecret"] = consumerSecret;
HttpContext.Current.Session["oauthLink"] = OAUTH_URL;
//
IOAuthSession session = CreateSession();
IToken requestToken = session.GetRequestToken();
View Sample Request
SAMPLE OBJECT
{
"Payment": {
"CustomerRef": {
"value": "20",
"name": "Red Rock Diner"
},
"DepositToAccountRef": {
"value": "4"
},
View gist:8a549de8cdad282d2125
<script src="https://js.appcenter.intuit.com/Content/IA/intuit.ipp.anywhere-1.3.2.js" type="text/javascript"></script>
<script type="text/javascript">
intuit.ipp.anywhere.setup({
grantUrl: 'http://www.mycompany.com/HelloWorld/RequestTokenServlet'
datasources: {
quickbooks : true,
payments : true
},
paymentOptions:{
intuitReferred : true
View gist:96cf76dd169ca3793e47
<script src="https://js.appcenter.intuit.com/Content/IA/intuit.ipp.anywhere-1.3.2.js" type="text/javascript"></script>
<script type="text/javascript">
intuit.ipp.anywhere.setup({
grantUrl: 'http://www.mycompany.com/HelloWorld/RequestTokenServlet'
datasources: {
quickbooks : true,
payments : true
},
paymentOptions:{
intuitReferred : true
View Add QBO Customer
<IntuitResponse xmlns="http://schema.intuit.com/finance/v3" time="2015-06-09T05:37:09.563-07:00">
<Customer domain="QBO" sparse="false">
<Id>68</Id>
<SyncToken>0</SyncToken>
<MetaData>
<CreateTime>2015-06-09T05:37:09-07:00</CreateTime>
<LastUpdatedTime>2015-06-09T05:37:09-07:00</LastUpdatedTime>
</MetaData>
<Title>Mr</Title>
<GivenName>James</GivenName>
View openid example
var openid_identifier = ConfigurationManager.AppSettings["openid_identifier"];
var returnUrl = "OpenIdHandler.aspx";
var response = openid.GetResponse();
if (response == null)
{
// Stage 2: user submitting Identifier
Identifier id;
if (Identifier.TryParse(openid_identifier, out id))
{
try
View gist:e484bf749e37b0da1fb3
package com.poc.oauth;
/**
* Created by Manas Mukherjee on 12/8/2014.
* Intuit Developer Group
*/
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
View jk test
public class OAuthTest {
public static final Logger LOG = Logger.getLogger(OAuthTest.class);
public static final String REQUEST_TOKEN_URL = "https://oauth.intuit.com/oauth/v1/get_request_token";
public static final String ACCESS_TOKEN_URL = "https://oauth.intuit.com/oauth/v1/get_access_token";
public static final String AUTHORIZE_URL = "https://appcenter.intuit.com/connect/begin";
View BatchAttach.java
package attachable;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.io.FileInputStream;
View Payments-ExecuteCharge
//string body = "{\"amount\": \"10.55\",\"token\": \"s2ZJuHhJQkZMXBngU7fP00At21c\",\"currency\": \"USD\"}";
//string responseXML = ExecutePaymentsCharge(consumerKey, consumerSecret, accessToken, accessSecret, realmId, body);
public static string ExecutePaymentsCharge(string consumerKey, string consumerSecret, string accessToken, string accessTokenSecret, string realmId, string body)
{
string uri = string.Format("https://sandbox.api.intuit.com/quickbooks/v4/payments/charges");
HttpWebRequest httpWebRequest = WebRequest.Create(uri) as HttpWebRequest;
httpWebRequest.Headers.Add("Request-Id", "iuy87t79t3861796t87r670");
httpWebRequest.Method = "POST";
httpWebRequest.Accept = "application/json";