Skip to content

Instantly share code, notes, and snippets.

@steveyerigandev
Created September 3, 2021 21:13
Show Gist options
  • Save steveyerigandev/a4cbc03d659e111d9133965652736ceb to your computer and use it in GitHub Desktop.
Save steveyerigandev/a4cbc03d659e111d9133965652736ceb to your computer and use it in GitHub Desktop.
Quickbooks API in React.js
import React from 'react'
class QuickBooks extends React.Component {
constructor(props){
super(props);
window.intuit.ipp.anywhere.setup({
grantUrl: 'http://www.mycompany.com/HelloWorld/RequestTokenServlet',
datasources: {
quickbooks : true,
payments : true
},
paymentOptions:{
intuitReferred : true
}
})
}
callQuickBooks() {
return await require("@pipedreamhq/platform").axios(this, {
url: `https://quickbooks.api.intuit.com/v3/company/${auths.quickbooks.company_id}/companyinfo/${auths.quickbooks.company_id}`,
headers: {
Authorization: `Bearer ${auths.quickbooks.oauth_access_token}`,
"accept": `application/json`,
"content-type": `application/json`,
},
})
}
render(){
return (
<div @click="callQuickBooks"></div>
)
}
}
export default QuickBooks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment