我们在我们的 Web 应用程序中使用Keith Palmer/Consolibyte Solutions 出色的 PHP QuickBooks 框架,通过 QuickBooks Web 连接器与 QuickBooks 桌面版进行通信。我们在代码中使用 aQuickBooks_Server
和 aQuickBooks_Queue
如下:
$this->myQBQueue = new QuickBooks_Queue($this->myDSN);
$mappedFunctions = array(
QUICKBOOKS_ADD_CUSTOMER,
QUICKBOOKS_ADD_SALESORDER,
QUICKBOOKS_ADD_SALESRECEIPT,
QUICKBOOKS_QUERY_CUSTOMER,
);
$map = array();
foreach($mappedFunctions as $function) {
$map[$function] = array(
array($this,"quickbooks{$function}Request"),
array($this,"quickbooks{$function}Response"),
);
}
$errmap = array('*' => array($this,'quickbooksErrorHandler'));
$hooks = array(
QUICKBOOKS_HANDLERS_HOOK_LOGINFAILURE => array(
array($this,'quickbooksLoginFailureHook')
),
QUICKBOOKS_HANDLERS_HOOK_LOGINSUCCESS => array(
array($this,'quickbooksLoginSuccessHook')
)
);
$soap_options = array();
$handler_options = array();
$driver_options = array();
$callback_options = array();
$this->myQBServer = new QuickBooks_Server($this->myDSN, $map, $errmap, $hooks, QUICKBOOKS_LOG_NORMAL, QUICKBOOKS_SOAPCLIENT_BUILTIN, QUICKBOOKS_WSDL, $soap_options, $handler_options, $driver_options, $callback_options);
我们现在有一位客户要求我们在线添加对 QuickBooks 的支持。我们仍然可以使用 Keith Palmer 的在线 QuickBooks 框架使用 aQuickBooks_Server
和 a QuickBooks_Queue
,还是我们必须为 QuickBooks 在线部分编写新代码?