Пример #1
0
<?php

header('Content-Type: text/plain');
ini_set('display_errors', 1);
error_reporting(E_ALL | E_STRICT);
ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . '/Users/kpalmer/Projects/QuickBooks/');
require_once '../QuickBooks.php';
//
$username = '******';
$password = '';
$token = '';
$realmID = 192848234;
//
$IPP = new QuickBooks_IPP();
$Context = $IPP->authenticate($username, $password, $token);
$IPP->application($Context, 'bf4in6uym');
$Service = new QuickBooks_IPP_Service_UOM();
$list = $Service->findAll($Context, $realmID);
//print_r($list);
foreach ($list as $UOM) {
    print 'Unit of measure [' . $UOM->getName() . '] of type [' . $UOM->getBaseType() . ']' . "\n";
    for ($i = 0; $i < $UOM->countConvUnit(); $i++) {
        $ConvUnit = $UOM->getConvUnit($i);
        print "\t" . $ConvUnit->getName() . ', ' . $ConvUnit->getConvRatio() . "\n";
    }
    print "\n";
}
<?php

ini_set('display_errors', 1);
error_reporting(E_ALL | E_STRICT);
require_once '../QuickBooks.php';
//
$username = '******';
$password = '';
$token = 'bf8cp2mihs6vsdibgqsybinugvj12346';
$realmID = 18293819223456;
//
$IPP = new QuickBooks_IPP();
$Context = $IPP->authenticate($username, $password, $token);
$IPP->application($Context, 'bfrccpnge');
// Create a new Service for IDS access
$Service = new QuickBooks_IPP_Service_SalesReceipt();
$list = $Service->findAll($Context, $realmID);
print "\n\n";
print $Service->lastRequest() . "\n\n\n";
print "\n\n";
print $Service->lastResponse() . "\n\n\n";
print "\n\n";
/*
$SalesReceipt = new QuickBooks_IPP_Object_SalesReceipt();

$Header = new QuickBooks_IPP_Object_Header();
$Header->setDocNumber('TESTabcd');
$Header->setTxnDate(date('Y-m-d'));
$Header->setCustomerName('ConsoliBYTE, LLC');

$SalesReceipt->addHeader($Header);
Пример #3
0
<?php

ini_set('display_errors', 1);
error_reporting(E_ALL | E_STRICT);
require_once '../QuickBooks.php';
//
$username = '******';
$password = '******';
$token = 'app token here';
$realmID = 1234;
$appdbid = 'app dbid here';
//
$IPP = new QuickBooks_IPP();
if ($Context = $IPP->authenticate($username, $password, $token)) {
    $IPP->application($appdbid);
    //$IPP->useDebugMode(true);
    if ($IPP->assertFederatedIdentity($Context, 'XXXXXod-intuit.ipp.prod', 'https://secure.your-url.com/saml.php')) {
        print 'SUCCESS!';
    } else {
        print 'Error [' . $IPP->errorCode() . ': ' . $IPP->errorText() . ', ' . $IPP->errorDetail() . ']';
    }
    print "\n\n\n\n";
    print $IPP->lastRequest();
    print "\n\n\n\n";
    print $IPP->lastResponse();
} else {
    print 'Auth error...?';
}
Пример #4
0
<?php

ini_set('display_errors', 1);
error_reporting(E_ALL | E_STRICT);
require_once '../QuickBooks.php';
//
$username = '******';
$password = '******';
$token = 'tex3r7hwifx6cci3zk43ibmnd';
$realmID = 173642438;
//
$IPP = new QuickBooks_IPP();
$Context = $IPP->authenticate($username, $password, $token);
$IPP->application($Context, 'be9mh7qd5');
/*
<?xml version="1.0"?>
<Add xmlns="http://www.intuit.com/sb/cdm/v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" RequestId="369c25d94c664b8e801164a6fe87698d">
	<ExternalRealmId>179017358</ExternalRealmId>
	<Object xsi:type="Invoice">
		<Header>
			<DocNumber>DF110108JM</DocNumber>
			<TxnDate>2011-01-14</TxnDate>
			<CustomerId>2</CustomerId>
			<SubTotalAmt>1000</SubTotalAmt>
			<TaxAmount>0</TaxAmount>
			<DueDate>2011-02-13</DueDate>
			<Balance>1000</Balance>
			<Memo></Memo>
		</Header>
		<Line>
			<Desc>Hope, Bob (Normal Hours) 12/26/2010</Desc>
Пример #5
0
<?php

ini_set('display_errors', 1);
error_reporting(E_ALL | E_STRICT);
require_once '../QuickBooks.php';
//
$username = '******';
$password = '******';
$token = 'tex3r7hwifx6cci3zk43ibmnd';
$realmID = 173642438;
$IPP = new QuickBooks_IPP();
$Context = $IPP->authenticate($username, $password, $token);
$IPP->application('be9mh7qd5');
$IPP->getAvailableCompanies($Context);
print $IPP->lastRequest();
print "\n\n";
print $IPP->lastResponse();
print "\n\n";
exit;
$realm = $IPP->getIDSRealm($Context);
print 'realm is: {' . $realm . '}';
print "\n\n";
if ($IPP->detachIDSRealm($Context, $realm)) {
    print 'Detached ' . $realm . '!';
} else {
    print 'Failed to detach: ' . $IPP->errorNumber() . ': ' . $IPP->errorMessage();
}
//print($IPP->lastRequest());
//print($IPP->lastResponse());
print "\n\n";
$realm = $IPP->getIDSRealm($Context);
<?php

ini_set('display_errors', 1);
error_reporting(E_ALL | E_STRICT);
require_once '../QuickBooks.php';
//
$username = '******';
$password = '******';
$token = 'bf8cp2mihs6vsdibgqsybinugvj';
$realmID = 182938192;
$application = 'bfrccpnge';
//
$IPP = new QuickBooks_IPP();
$Context = $IPP->authenticate($username, $password, $token);
$IPP->application($Context, $application);
//$IPP->useIDSParser(false);
$Service = new QuickBooks_IPP_Service_Employee();
$Employee = $Service->findById($Context, $realmID, '{NG-124029}');
//print_r($Employee);
print $Service->lastRequest($Context);
print "\n\n\n\n\n";
print $Service->lastResponse($Context);
print "\n\n\n\n\n";
exit;
$Employee = new QuickBooks_IPP_Object_Employee();
$Email = new QuickBooks_IPP_Object_Email();
$Email->setAddress('*****@*****.**');
$Email->setTag('Business');
$Employee->setEmail($Email);
$Phone = new QuickBooks_IPP_Object_Phone();
$Phone->setDeviceType('Mobile');