_x000D_
_x000D_
I'm adding receive payments using php devkit here https://github.com/consolibyte/quickbooks-php.
The problem is no response from the quickbooks and also there is no issue. I checked the web connector logs and php log files.
But response function is not called ever.
I'm pretty sure this was working well until few days ago.
I have no idea what the exact problem is.
qbxml version: 10.0
request xml:
Duncan, Dave
2023-12-15
Wire
2585.00
Check
Paid In Full
28CA9-1702576301
2585.00
php scripts:
$map = array(
QUICKBOOKS_ADD_RECEIVE_PAYMENT => array( '_quickbooks_payment_add_request', '_quickbooks_payment_add_response' ));
$errmap = array(
// QUICKBOOKS_IMPORT_CUSTOMER => '_quickbooks_customer_query_error',
'*' => '_quickbooks_error_catchall', // Catch any other errors that might occur
..
$hooks = array(
QuickBooks_WebConnector_Handlers::HOOK_LOGINSUCCESS => '_quickbooks_sync_to_qb', // call this whenever a successful login occurs
);
function _quickbooks_sync_to_qb($requestID, $user, $hook, &$err, $hook_data, $callback_config)
{
$database = new Database();
$db = $database->getConnection();
$Queue = new QuickBooks_WebConnector_Queue($database->dsn);
$payment = new Payment($db);
$payment->needSync = true;
$stmt = $payment->read();
$num = $stmt->rowCount();
if ($num > 0) {
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
$Queue->enqueue(QUICKBOOKS_ADD_RECEIVE_PAYMENT, $row['id']);
}
}
$database->destroy();
}
function _quickbooks_payment_add_request($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale)
{error_log('start from here');
$database = new Database();
$db = $database->getConnection();
// Grab the data from our MySQL database
$payment = new Payment($db);
$payment->id = (int) $ID;
error_log('1');
// Validation
$stmt = $payment->read();
$num = $stmt->rowCount();
if ($num > 0) {error_log('2');
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
extract($row);
// get trasaction id from invoice
$invoice = new Invoice($db);
$invoice->refNumber = $invoice_ref_number;
error_log('21');
$xml = '
';
if ($customer_ref_listid != '' || $customer_ref_fullname != '') {
$xml .= '';
if ($customer_ref_listid != '') {
$xml .= '' . $customer_ref_listid . '';
// invoice customer ref listid
$invoice->customerRefListID = $customer_ref_listid;
}
if ($customer_ref_fullname != '') {
$xml .= '' . $customer_ref_fullname . '';
// invoice customer ref fullname
$invoice->customerRefFullName = $customer_ref_fullname;
}
$xml .= '';
}
$stmt = $invoice->read();
$num = $stmt->rowCount();
$txnID = '';
$txnDate = '';
if ($num > 0) {
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
$txnID = $row['txn_id'];
$txnDate = date_format(date_create($row['txn_date']), 'Y-m-d');
}
}
$xml .= '' . $txnDate . '
' . $ref_number . '
' . $total_amount . '
';
if (!empty($payment_method_ref_listid)) {
$xml .= '' . $payment_method_ref_listid . '';
}
if (!empty($payment_method_ref_fullname)) {
$xml .= '' . $payment_method_ref_fullname . '';
}
$xml .= '
' . $memo . '
' . $txnID . '
' . $total_amount . '
';
error_log('22');
}
error_log('3');
$database->destroy();
error_log('4');
error_log($xml);
return $xml;
}
error_log('5');
$database->destroy();
return false;
}
This function seems not called even it is registered properly.
function _quickbooks_payment_add_response($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents)
{error_log('_quickbooks_payment_add_response');
$database = new Database();
EDIT:
VERBOSE LOG
20190327.20:42:17 UTC : QBWebConnector.SOAPWebService.do_sendRequestXML() : qbNationality="US"
20190327.20:42:17 UTC : QBWebConnector.SOAPWebService.do_sendRequestXML() : qbXMLMajorVers="13"
20190327.20:42:17 UTC : QBWebConnector.SOAPWebService.do_sendRequestXML() : qbXMLMinorVers="0"
20190327.20:42:17 UTC : QBWebConnector.SOAPWebService.do_sendRequestXML() : Received from sendRequestXML() following parameter:
20190327.20:42:17 UTC : QBWebConnector.SOAPWebService.do_sendRequestXML() : strRequestXML =
20190327.20:42:17 UTC : QBWebConnector.SOAPWebService.do_sendRequestXML() : XML dump follows: -
Duncan, DaveWire
2585.00
Check
Paid In Full
28CA9-1702576301
2585.00
20190327.20:42:17 UTC : QBWebConnector.SOAPWebService.do_sendRequestXML() : Request xml received.
20190327.20:42:17 UTC : QBWebConnector.SOAPWebService.ProcessRequestXML() : Processing request #1
20190327.20:42:17 UTC : QBWebConnector.SOAPWebService.ProcessRequestXML() : REQUEST: received from application: size (bytes) = 666
20190327.20:42:17 UTC : QBWebConnector.SOAPWebService.ProcessRequestXML() : Sending request to QuickBooks.
20190327.20:42:17 UTC : QBWebConnector.SOAPWebService.ProcessRequestXML() : Response received from QuickBooks: size (bytes) = 245
20190327.20:42:17 UTC : QBWebConnector.SOAPWebService.ProcessRequestXML() : Sending response back to application.
20190327.20:42:17 UTC : QBWebConnector.SOAPWebService.do_receiveResponseXML() : *** Calling receiveResponseXML() with following parameters:
20190327.20:42:17 UTC : QBWebConnector.SOAPWebService.do_receiveResponseXML() : wcTicket="35382423-f97d-5fc4-3935-d4a7629367a8"
20190327.20:42:17 UTC : QBWebConnector.SOAPWebService.do_receiveResponseXML() : response =
20190327.20:42:17 UTC : QBWebConnector.SOAPWebService.do_receiveResponseXML() : XML dump follows: -
20190327.20:42:17 UTC : QBWebConnector.SOAPWebService.do_receiveResponseXML() : hresult=""
20190327.20:42:17 UTC : QBWebConnector.SOAPWebService.do_receiveResponseXML() : message=""
20190327.20:42:17 UTC : QBWebConnector.SOAPWebService.do_receiveResponseXML() : Received from receiveResponseXML() following parameters:
20190327.20:42:17 UTC : QBWebConnector.SOAPWebService.do_receiveResponseXML() : more="100">
20190327.20:42:17 UTC : QBWebConnector.SOAPWebService.do_receiveResponseXML() : Done. No more to process.
User submissions are the sole responsibility of contributors, with TuteeHUB disclaiming liability for accuracy, copyrights, or consequences of use; content is for informational purposes only and not professional advice.