Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
- class sq_library{
- function config(){
- $function =& get_instance();
- $function->config->load('quickbooks');
- $qb_other = $function->config->item('qb_other');
- $dsn = $qb_other['dsn'];
- if(!QuickBooks_Utilities::initialized($dsn)){
- QuickBooks_Utilities::initialize($dsn);
- }
- }
- function authenticate(){
- $function =& get_instance();
- $function->config->load('quickbooks');
- $qb_other = $function->config->item('qb_other');
- $qb_application = $function->config->item('qb_application');
- $ia = new QuickBooks_IPP_IntuitAnywhere(
- $qb_other['dsn'],
- $qb_other['encryption_key'],
- $qb_application['development']['oauth_key'],
- $qb_application['development']['oauth_secret'],
- $qb_other['this_url'],
- $qb_other['that_url']
- );
- if($ia->handle($qb_other['the_username'], $qb_other['the_tenant'])){
- //redirects to auth page;
- }else{
- die('Oh no, something bad happened: ' . $ia->errorNumber() . ': ' . $ia->errorMessage());
- }
- }
- }
- /* End of file library.php */
- /* Location: ./application/libraries/library.php */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement