[18-Jun-2025 12:21:23 UTC] PHP Warning:  require_once(/home/wdsklsxvqb/automationv.com/stripe-app/../config.php): Failed to open stream: No such file or directory in /home/wdsklsxvqb/automationv.com/stripe-app/index.php on line 2
[18-Jun-2025 12:21:23 UTC] PHP Fatal error:  Uncaught Error: Failed opening required '/home/wdsklsxvqb/automationv.com/stripe-app/../config.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/wdsklsxvqb/automationv.com/stripe-app/index.php:2
Stack trace:
#0 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/index.php on line 2
[18-Jun-2025 12:22:08 UTC] PHP Warning:  require_once(/home/wdsklsxvqb/automationv.com/stripe-app/../config.php): Failed to open stream: No such file or directory in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 2
[18-Jun-2025 12:22:08 UTC] PHP Fatal error:  Uncaught Error: Failed opening required '/home/wdsklsxvqb/automationv.com/stripe-app/../config.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php:2
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/index.php(3): require_once()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 2
[18-Jun-2025 12:36:56 UTC] PHP Warning:  require_once(/home/wdsklsxvqb/automationv.com/stripe-app/../config.php): Failed to open stream: No such file or directory in /home/wdsklsxvqb/automationv.com/stripe-app/db.php on line 2
[18-Jun-2025 12:36:56 UTC] PHP Fatal error:  Uncaught Error: Failed opening required '/home/wdsklsxvqb/automationv.com/stripe-app/../config.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/wdsklsxvqb/automationv.com/stripe-app/db.php:2
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/dashboard.php(3): require_once()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/db.php on line 2
[18-Jun-2025 12:37:21 UTC] PHP Warning:  require_once(/home/wdsklsxvqb/automationv.com/stripe-app/../includes/header.php): Failed to open stream: No such file or directory in /home/wdsklsxvqb/automationv.com/stripe-app/login.php on line 47
[18-Jun-2025 12:37:21 UTC] PHP Fatal error:  Uncaught Error: Failed opening required '/home/wdsklsxvqb/automationv.com/stripe-app/../includes/header.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/wdsklsxvqb/automationv.com/stripe-app/login.php:47
Stack trace:
#0 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/login.php on line 47
[18-Jun-2025 17:04:12 UTC] PHP Warning:  Undefined array key "access_token" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-disconnect.php on line 25
[18-Jun-2025 17:04:12 UTC] PHP Fatal error:  Uncaught Error: Undefined constant "STRIPE_CLIENT_ID" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-disconnect.php:33
Stack trace:
#0 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-disconnect.php on line 33
[18-Jun-2025 17:08:44 UTC] PHP Warning:  require_once(/home/wdsklsxvqb/automationv.com/stripe-app/../includes/header.php): Failed to open stream: No such file or directory in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-disconnect.php on line 45
[18-Jun-2025 17:08:44 UTC] PHP Fatal error:  Uncaught Error: Failed opening required '/home/wdsklsxvqb/automationv.com/stripe-app/../includes/header.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-disconnect.php:45
Stack trace:
#0 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-disconnect.php on line 45
[19-Jun-2025 07:06:20 UTC] PHP Fatal error:  Uncaught mysqli_sql_exception: Cannot add or update a child row: a foreign key constraint fails (`wdsklsxvqb_stripe_qbo_integration`.`quickbooks_accounts`, CONSTRAINT `quickbooks_accounts_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE) in /home/wdsklsxvqb/automationv.com/stripe-app/quickbooks-callback.php:94
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/quickbooks-callback.php(94): mysqli_stmt->execute()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/quickbooks-callback.php on line 94
[19-Jun-2025 07:11:59 UTC] PHP Warning:  require_once(/home/wdsklsxvqb/automationv.com/stripe-app/../config.php): Failed to open stream: No such file or directory in /home/wdsklsxvqb/automationv.com/stripe-app/quickbooks-callback.php on line 2
[19-Jun-2025 07:11:59 UTC] PHP Fatal error:  Uncaught Error: Failed opening required '/home/wdsklsxvqb/automationv.com/stripe-app/../config.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/wdsklsxvqb/automationv.com/stripe-app/quickbooks-callback.php:2
Stack trace:
#0 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/quickbooks-callback.php on line 2
[19-Jun-2025 07:12:29 UTC] PHP Warning:  require_once(/home/wdsklsxvqb/automationv.com/stripe-app/../config.php): Failed to open stream: No such file or directory in /home/wdsklsxvqb/automationv.com/stripe-app/quickbooks-callback.php on line 2
[19-Jun-2025 07:12:29 UTC] PHP Fatal error:  Uncaught Error: Failed opening required '/home/wdsklsxvqb/automationv.com/stripe-app/../config.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/wdsklsxvqb/automationv.com/stripe-app/quickbooks-callback.php:2
Stack trace:
#0 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/quickbooks-callback.php on line 2
[19-Jun-2025 07:12:52 UTC] PHP Warning:  require_once(/home/wdsklsxvqb/automationv.com/stripe-app/../config.php): Failed to open stream: No such file or directory in /home/wdsklsxvqb/automationv.com/stripe-app/quickbooks-callback.php on line 2
[19-Jun-2025 07:12:52 UTC] PHP Fatal error:  Uncaught Error: Failed opening required '/home/wdsklsxvqb/automationv.com/stripe-app/../config.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/wdsklsxvqb/automationv.com/stripe-app/quickbooks-callback.php:2
Stack trace:
#0 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/quickbooks-callback.php on line 2
[19-Jun-2025 08:11:24 UTC] PHP Fatal error:  Cannot redeclare require_login() (previously declared in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php:9) in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 219
[19-Jun-2025 08:12:36 UTC] PHP Warning:  require_once(/home/wdsklsxvqb/automationv.com/stripe-app/includes/../includes/session.php): Failed to open stream: No such file or directory in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 2
[19-Jun-2025 08:12:36 UTC] PHP Fatal error:  Uncaught Error: Failed opening required '/home/wdsklsxvqb/automationv.com/stripe-app/includes/../includes/session.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php:2
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/login.php(68): require_once()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 2
[19-Jun-2025 08:13:51 UTC] PHP Warning:  require_once(/home/wdsklsxvqb/automationv.com/stripe-app/includes/../includes/session.php): Failed to open stream: No such file or directory in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 2
[19-Jun-2025 08:13:51 UTC] PHP Fatal error:  Uncaught Error: Failed opening required '/home/wdsklsxvqb/automationv.com/stripe-app/includes/../includes/session.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php:2
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/login.php(68): require_once()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 2
[19-Jun-2025 08:13:54 UTC] PHP Warning:  require_once(/home/wdsklsxvqb/automationv.com/stripe-app/includes/../includes/session.php): Failed to open stream: No such file or directory in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 2
[19-Jun-2025 08:13:54 UTC] PHP Fatal error:  Uncaught Error: Failed opening required '/home/wdsklsxvqb/automationv.com/stripe-app/includes/../includes/session.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php:2
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/login.php(68): require_once()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 2
[19-Jun-2025 08:14:16 UTC] PHP Warning:  require_once(/home/wdsklsxvqb/automationv.com/stripe-app/includes/includes/session.php): Failed to open stream: No such file or directory in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 2
[19-Jun-2025 08:14:16 UTC] PHP Fatal error:  Uncaught Error: Failed opening required '/home/wdsklsxvqb/automationv.com/stripe-app/includes/includes/session.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php:2
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/login.php(68): require_once()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 2
[19-Jun-2025 08:14:58 UTC] PHP Fatal error:  Cannot redeclare clean_expired_sessions() (previously declared in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php:212) in /home/wdsklsxvqb/automationv.com/stripe-app/session.php on line 74
[19-Jun-2025 08:16:23 UTC] PHP Warning:  require_once(/home/wdsklsxvqb/automationv.com/stripe-app/../config.php): Failed to open stream: No such file or directory in /home/wdsklsxvqb/automationv.com/stripe-app/session.php on line 2
[19-Jun-2025 08:16:23 UTC] PHP Fatal error:  Uncaught Error: Failed opening required '/home/wdsklsxvqb/automationv.com/stripe-app/../config.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/wdsklsxvqb/automationv.com/stripe-app/session.php:2
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php(2): require_once()
#1 /home/wdsklsxvqb/automationv.com/stripe-app/login.php(68): require_once('/home/wdsklsxvq...')
#2 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/session.php on line 2
[19-Jun-2025 08:16:50 UTC] PHP Warning:  session_set_cookie_params(): Session cookie parameters cannot be changed when a session is active in /home/wdsklsxvqb/automationv.com/stripe-app/session.php on line 18
[19-Jun-2025 08:16:50 UTC] PHP Warning:  session_name(): Session name cannot be changed when a session is active in /home/wdsklsxvqb/automationv.com/stripe-app/session.php on line 21
[19-Jun-2025 08:16:50 UTC] PHP Notice:  session_start(): Ignoring session_start() because a session is already active in /home/wdsklsxvqb/automationv.com/stripe-app/session.php on line 22
[19-Jun-2025 08:17:16 UTC] PHP Warning:  session_set_cookie_params(): Session cookie parameters cannot be changed when a session is active in /home/wdsklsxvqb/automationv.com/stripe-app/session.php on line 18
[19-Jun-2025 08:17:16 UTC] PHP Warning:  session_name(): Session name cannot be changed when a session is active in /home/wdsklsxvqb/automationv.com/stripe-app/session.php on line 21
[19-Jun-2025 08:17:16 UTC] PHP Notice:  session_start(): Ignoring session_start() because a session is already active in /home/wdsklsxvqb/automationv.com/stripe-app/session.php on line 22
[19-Jun-2025 08:17:21 UTC] PHP Warning:  session_set_cookie_params(): Session cookie parameters cannot be changed when a session is active in /home/wdsklsxvqb/automationv.com/stripe-app/session.php on line 18
[19-Jun-2025 08:17:21 UTC] PHP Warning:  session_name(): Session name cannot be changed when a session is active in /home/wdsklsxvqb/automationv.com/stripe-app/session.php on line 21
[19-Jun-2025 08:17:21 UTC] PHP Notice:  session_start(): Ignoring session_start() because a session is already active in /home/wdsklsxvqb/automationv.com/stripe-app/session.php on line 22
[19-Jun-2025 08:36:36 UTC] PHP Fatal error:  Uncaught mysqli_sql_exception: Cannot add or update a child row: a foreign key constraint fails (`wdsklsxvqb_stripe_qbo_integration`.`quickbooks_accounts`, CONSTRAINT `quickbooks_accounts_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE) in /home/wdsklsxvqb/automationv.com/stripe-app/quickbooks-callback.php:94
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/quickbooks-callback.php(94): mysqli_stmt->execute()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/quickbooks-callback.php on line 94
[19-Jun-2025 08:37:07 UTC] PHP Fatal error:  Uncaught mysqli_sql_exception: Cannot add or update a child row: a foreign key constraint fails (`wdsklsxvqb_stripe_qbo_integration`.`quickbooks_accounts`, CONSTRAINT `quickbooks_accounts_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE) in /home/wdsklsxvqb/automationv.com/stripe-app/quickbooks-callback.php:94
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/quickbooks-callback.php(94): mysqli_stmt->execute()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/quickbooks-callback.php on line 94
[19-Jun-2025 08:37:50 UTC] PHP Fatal error:  Uncaught mysqli_sql_exception: Cannot add or update a child row: a foreign key constraint fails (`wdsklsxvqb_stripe_qbo_integration`.`quickbooks_accounts`, CONSTRAINT `quickbooks_accounts_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE) in /home/wdsklsxvqb/automationv.com/stripe-app/quickbooks-callback.php:94
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/quickbooks-callback.php(94): mysqli_stmt->execute()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/quickbooks-callback.php on line 94
[24-Jun-2025 14:41:03 UTC] Current time: 2025-06-24 14:41:03
[24-Jun-2025 14:41:03 UTC] Expires time: 2025-06-24 11:19:48
[24-Jun-2025 14:41:03 UTC] Is expired: true
[24-Jun-2025 16:29:51 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/wdsklsxvqb/automationv.com/stripe-app/dashboard.php on line 101
[24-Jun-2025 16:29:51 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/wdsklsxvqb/automationv.com/stripe-app/dashboard.php on line 103
[24-Jun-2025 16:29:51 UTC] PHP Deprecated:  strtotime(): Passing null to parameter #1 ($datetime) of type string is deprecated in /home/wdsklsxvqb/automationv.com/stripe-app/dashboard.php on line 103
[24-Jun-2025 16:36:34 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/wdsklsxvqb/automationv.com/stripe-app/dashboard.php on line 101
[24-Jun-2025 16:36:34 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/wdsklsxvqb/automationv.com/stripe-app/dashboard.php on line 103
[24-Jun-2025 16:36:34 UTC] PHP Deprecated:  strtotime(): Passing null to parameter #1 ($datetime) of type string is deprecated in /home/wdsklsxvqb/automationv.com/stripe-app/dashboard.php on line 103
[24-Jun-2025 16:37:39 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/wdsklsxvqb/automationv.com/stripe-app/dashboard.php on line 101
[24-Jun-2025 16:37:39 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/wdsklsxvqb/automationv.com/stripe-app/dashboard.php on line 103
[24-Jun-2025 16:37:39 UTC] PHP Deprecated:  strtotime(): Passing null to parameter #1 ($datetime) of type string is deprecated in /home/wdsklsxvqb/automationv.com/stripe-app/dashboard.php on line 103
[25-Jun-2025 09:37:41 UTC] Stripe Webhook Received: invoice.created (ID: evt_1RdplxCDiOqgoJOUbjIVF4Bi)
[25-Jun-2025 09:37:58 UTC] Stripe Webhook Received: invoice.created (ID: evt_1RdplxCDiOqgoJOUbjIVF4Bi)
[25-Jun-2025 09:50:13 UTC] PHP Fatal error:  Cannot redeclare get_user_id_by_stripe_account_id() (previously declared in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php:345) in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 545
[25-Jun-2025 09:51:36 UTC] PHP Fatal error:  Cannot redeclare get_user_id_by_stripe_account_id() (previously declared in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php:345) in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 545
[25-Jun-2025 09:54:01 UTC] Stripe Webhook Received: invoice.created (ID: evt_1RdplxCDiOqgoJOUbjIVF4Bi)
[25-Jun-2025 09:54:01 UTC] PHP Warning:  Undefined array key "account" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php on line 26
[25-Jun-2025 09:56:00 UTC] Stripe Webhook Received: invoice.created (ID: evt_1RdplxCDiOqgoJOUbjIVF4Bi)
[25-Jun-2025 09:56:00 UTC] PHP Warning:  Undefined array key "api_key" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php on line 35
[25-Jun-2025 09:56:00 UTC] PHP Deprecated:  base64_decode(): Passing null to parameter #1 ($string) of type string is deprecated in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 108
[25-Jun-2025 09:56:00 UTC] PHP Fatal error:  Uncaught Error: Undefined constant "STRIPE_SECRET_KEY" in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php:109
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(35): decrypt_api_key()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 109
[25-Jun-2025 10:05:08 UTC] PHP Fatal error:  Cannot redeclare verify_stripe_event() (previously declared in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php:90) in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 557
[25-Jun-2025 10:07:11 UTC] Stripe Webhook Received: invoice.created (ID: evt_1RdplxCDiOqgoJOUbjIVF4Bi)
[25-Jun-2025 10:08:49 UTC] Stripe Webhook Received: invoice.created (ID: evt_1RdplxCDiOqgoJOUbjIVF4Bi)
[25-Jun-2025 10:37:42 UTC] Stripe Webhook Received: invoice.created (ID: evt_1RdplxCDiOqgoJOUbjIVF4Bi)
[25-Jun-2025 13:57:14 UTC] PHP Fatal error:  Cannot redeclare get_sync_settings() (previously declared in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php:337) in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 551
[25-Jun-2025 14:02:22 UTC] Stripe Webhook Received: invoice.created (ID: evt_1RdplxCDiOqgoJOUbjIVF4Bi)
[25-Jun-2025 14:03:25 UTC] Stripe Webhook Received: invoice.created (ID: evt_1RdplxCDiOqgoJOUbjIVF4Bi)
[25-Jun-2025 14:08:33 UTC] Stripe Webhook Received: invoice.created (ID: evt_1RdplxCDiOqgoJOUbjIVF4Bi)
[25-Jun-2025 14:08:33 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 358
[25-Jun-2025 14:08:33 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function get_stripe_customer() in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php:25
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(42): process_stripe_invoice_created_to_qbo_invoice()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 25
[01-Jul-2025 11:11:28 UTC] Stripe Webhook Received: invoice.created (ID: evt_1RdplxCDiOqgoJOUbjIVF4Bi)
[01-Jul-2025 11:11:28 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 358
[01-Jul-2025 11:11:28 UTC] Starting invoice creation process for event: evt_1RdplxCDiOqgoJOUbjIVF4Bi
[01-Jul-2025 11:11:28 UTC] Invoice data retrieved: Array
(
    [id] => in_1RdplwCDiOqgoJOUTlyNFHfE
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 0
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 0
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1750844260
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 
    [effective_at] => 
    [ending_balance] => 
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => 
    [invoice_pdf] => 
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                )

            [has_more] => 
            [total_count] => 0
            [url] => /v1/invoices/in_1RdplwCDiOqgoJOUTlyNFHfE/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => 
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => 
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1750844260
    [period_start] => 1750844260
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => auto
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => draft
    [status_transitions] => Array
        (
            [finalized_at] => 
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 0
    [subtotal_excluding_tax] => 0
    [tax] => 
    [tax_percent] => 
    [test_clock] => 
    [total] => 0
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 0
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
        )

    [total_taxes] => Array
        (
        )

    [transfer_data] => 
    [webhooks_delivered_at] => 
)

[01-Jul-2025 11:11:28 UTC] QuickBooks account found for user: 1
[01-Jul-2025 11:11:28 UTC] Stripe account found for user: 1
[01-Jul-2025 11:11:28 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function get_stripe_customer() in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php:29
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(42): process_stripe_invoice_created_to_qbo_invoice()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 29
[01-Jul-2025 11:29:23 UTC] Stripe Webhook Received: invoice.created (ID: evt_1RdplxCDiOqgoJOUbjIVF4Bi)
[01-Jul-2025 11:29:23 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 382
[01-Jul-2025 11:29:23 UTC] Starting invoice creation process for event: evt_1RdplxCDiOqgoJOUbjIVF4Bi
[01-Jul-2025 11:29:23 UTC] Invoice data retrieved: Array
(
    [id] => in_1RdplwCDiOqgoJOUTlyNFHfE
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 0
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 0
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1750844260
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 
    [effective_at] => 
    [ending_balance] => 
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => 
    [invoice_pdf] => 
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                )

            [has_more] => 
            [total_count] => 0
            [url] => /v1/invoices/in_1RdplwCDiOqgoJOUTlyNFHfE/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => 
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => 
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1750844260
    [period_start] => 1750844260
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => auto
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => draft
    [status_transitions] => Array
        (
            [finalized_at] => 
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 0
    [subtotal_excluding_tax] => 0
    [tax] => 
    [tax_percent] => 
    [test_clock] => 
    [total] => 0
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 0
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
        )

    [total_taxes] => Array
        (
        )

    [transfer_data] => 
    [webhooks_delivered_at] => 
)

[01-Jul-2025 11:29:23 UTC] QuickBooks account found for user: 1
[01-Jul-2025 11:29:23 UTC] Stripe account found for user: 1
[01-Jul-2025 11:29:23 UTC] Fetching Stripe customer: cus_SYxhIfsEqHRWWB
[01-Jul-2025 11:29:23 UTC] Stripe customer found: Array
(
    [id] => cus_SYxhIfsEqHRWWB
    [object] => customer
    [address] => 
    [balance] => 0
    [created] => 1750844259
    [currency] => usd
    [default_source] => 
    [delinquent] => 
    [description] => 
    [discount] => 
    [email] => test@fsdf.fg
    [invoice_prefix] => RPYUF7UP
    [invoice_settings] => Array
        (
            [custom_fields] => 
            [default_payment_method] => 
            [footer] => 
            [rendering_options] => 
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [name] => testt
    [next_invoice_sequence] => 2
    [phone] => 
    [preferred_locales] => Array
        (
        )

    [shipping] => 
    [tax_exempt] => none
    [test_clock] => 
)

[01-Jul-2025 11:29:23 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function find_qbo_customer_by_email() in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php:42
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(42): process_stripe_invoice_created_to_qbo_invoice()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 42
[01-Jul-2025 12:03:25 UTC] Stripe Webhook Received: invoice.created (ID: evt_1RdplxCDiOqgoJOUbjIVF4Bi)
[01-Jul-2025 12:03:25 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 382
[01-Jul-2025 12:03:25 UTC] Starting invoice creation process for event: evt_1RdplxCDiOqgoJOUbjIVF4Bi
[01-Jul-2025 12:03:25 UTC] Invoice data retrieved: Array
(
    [id] => in_1RdplwCDiOqgoJOUTlyNFHfE
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 0
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 0
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1750844260
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 
    [effective_at] => 
    [ending_balance] => 
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => 
    [invoice_pdf] => 
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                )

            [has_more] => 
            [total_count] => 0
            [url] => /v1/invoices/in_1RdplwCDiOqgoJOUTlyNFHfE/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => 
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => 
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1750844260
    [period_start] => 1750844260
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => auto
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => draft
    [status_transitions] => Array
        (
            [finalized_at] => 
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 0
    [subtotal_excluding_tax] => 0
    [tax] => 
    [tax_percent] => 
    [test_clock] => 
    [total] => 0
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 0
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
        )

    [total_taxes] => Array
        (
        )

    [transfer_data] => 
    [webhooks_delivered_at] => 
)

[01-Jul-2025 12:03:25 UTC] QuickBooks account found for user: 1
[01-Jul-2025 12:03:25 UTC] Stripe account found for user: 1
[01-Jul-2025 12:03:25 UTC] Fetching Stripe customer: cus_SYxhIfsEqHRWWB
[01-Jul-2025 12:03:26 UTC] Stripe customer found: Array
(
    [id] => cus_SYxhIfsEqHRWWB
    [object] => customer
    [address] => 
    [balance] => 0
    [created] => 1750844259
    [currency] => usd
    [default_source] => 
    [delinquent] => 
    [description] => 
    [discount] => 
    [email] => test@fsdf.fg
    [invoice_prefix] => RPYUF7UP
    [invoice_settings] => Array
        (
            [custom_fields] => 
            [default_payment_method] => 
            [footer] => 
            [rendering_options] => 
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [name] => testt
    [next_invoice_sequence] => 2
    [phone] => 
    [preferred_locales] => Array
        (
        )

    [shipping] => 
    [tax_exempt] => none
    [test_clock] => 
)

[01-Jul-2025 12:03:26 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function find_qbo_customer_by_email() in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php:42
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(42): process_stripe_invoice_created_to_qbo_invoice()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 42
[01-Jul-2025 12:40:56 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rg3UaCDiOqgoJOUihGLuHtH)
[01-Jul-2025 12:40:56 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 382
[01-Jul-2025 12:40:56 UTC] Starting invoice creation process for event: evt_1Rg3UaCDiOqgoJOUihGLuHtH
[01-Jul-2025 12:40:56 UTC] Invoice data retrieved: Array
(
    [id] => in_1Rg3UaCDiOqgoJOURz0i1VuD
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 0
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 0
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1751373656
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 
    [effective_at] => 
    [ending_balance] => 
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => 
    [invoice_pdf] => 
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                )

            [has_more] => 
            [total_count] => 0
            [url] => /v1/invoices/in_1Rg3UaCDiOqgoJOURz0i1VuD/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => 
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => 
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1751373656
    [period_start] => 1751373656
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => auto
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => draft
    [status_transitions] => Array
        (
            [finalized_at] => 
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 0
    [subtotal_excluding_tax] => 0
    [tax] => 
    [tax_percent] => 
    [test_clock] => 
    [total] => 0
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 0
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
        )

    [total_taxes] => Array
        (
        )

    [transfer_data] => 
    [webhooks_delivered_at] => 
)

[01-Jul-2025 12:40:56 UTC] QuickBooks account found for user: 1
[01-Jul-2025 12:40:56 UTC] Stripe account found for user: 1
[01-Jul-2025 12:40:56 UTC] Fetching Stripe customer: cus_SYxhIfsEqHRWWB
[01-Jul-2025 12:40:57 UTC] Stripe customer found: Array
(
    [id] => cus_SYxhIfsEqHRWWB
    [object] => customer
    [address] => 
    [balance] => 0
    [created] => 1750844259
    [currency] => usd
    [default_source] => 
    [delinquent] => 
    [description] => 
    [discount] => 
    [email] => test@fsdf.fg
    [invoice_prefix] => RPYUF7UP
    [invoice_settings] => Array
        (
            [custom_fields] => 
            [default_payment_method] => 
            [footer] => 
            [rendering_options] => 
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [name] => testt
    [next_invoice_sequence] => 2
    [phone] => 
    [preferred_locales] => Array
        (
        )

    [shipping] => 
    [tax_exempt] => none
    [test_clock] => 
)

[01-Jul-2025 12:40:57 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function find_qbo_customer_by_email() in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php:42
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(42): process_stripe_invoice_created_to_qbo_invoice()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 42
[01-Jul-2025 12:48:18 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rg3bhCDiOqgoJOUDx5ZDPOR)
[01-Jul-2025 12:48:18 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 382
[01-Jul-2025 12:48:18 UTC] Starting invoice creation process for event: evt_1Rg3bhCDiOqgoJOUDx5ZDPOR
[01-Jul-2025 12:48:18 UTC] Invoice data retrieved: Array
(
    [id] => in_1Rg3bhCDiOqgoJOU9Lik6gxq
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 4500
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 4500
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1751374097
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 
    [effective_at] => 
    [ending_balance] => 
    [footer] => 
    [from_invoice] => Array
        (
            [action] => revision
            [invoice] => in_1Rg3UaCDiOqgoJOURz0i1VuD
        )

    [hosted_invoice_url] => 
    [invoice_pdf] => 
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rg3bhCDiOqgoJOUkWWlVmfB
                            [object] => line_item
                            [amount] => 4500
                            [amount_excluding_tax] => 4500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rg3bhCDiOqgoJOU9Lik6gxq
                            [invoice_item] => ii_1Rg3bhCDiOqgoJOUAPZEdL37
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rg3bhCDiOqgoJOUAPZEdL37
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1751373716
                                    [start] => 1751373716
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 9
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rg3bhCDiOqgoJOU9Lik6gxq/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => 
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => 
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1751373656
    [period_start] => 1751373656
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => 
            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => draft
    [status_transitions] => Array
        (
            [finalized_at] => 
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 4500
    [subtotal_excluding_tax] => 4500
    [tax] => 
    [tax_percent] => 
    [test_clock] => 
    [total] => 4500
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 4500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
        )

    [total_taxes] => Array
        (
        )

    [transfer_data] => 
    [webhooks_delivered_at] => 
)

[01-Jul-2025 12:48:18 UTC] QuickBooks account found for user: 1
[01-Jul-2025 12:48:18 UTC] Stripe account found for user: 1
[01-Jul-2025 12:48:18 UTC] Fetching Stripe customer: cus_SYxhIfsEqHRWWB
[01-Jul-2025 12:48:18 UTC] Stripe customer found: Array
(
    [id] => cus_SYxhIfsEqHRWWB
    [object] => customer
    [address] => 
    [balance] => 0
    [created] => 1750844259
    [currency] => usd
    [default_source] => 
    [delinquent] => 
    [description] => 
    [discount] => 
    [email] => test@fsdf.fg
    [invoice_prefix] => RPYUF7UP
    [invoice_settings] => Array
        (
            [custom_fields] => 
            [default_payment_method] => 
            [footer] => 
            [rendering_options] => 
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [name] => testt
    [next_invoice_sequence] => 3
    [phone] => 
    [preferred_locales] => Array
        (
        )

    [shipping] => 
    [tax_exempt] => none
    [test_clock] => 
)

[01-Jul-2025 12:48:18 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function find_qbo_customer_by_email() in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php:42
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(42): process_stripe_invoice_created_to_qbo_invoice()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 42
[01-Jul-2025 12:51:09 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1Rg3eTCDiOqgoJOU52QTzFKV)
[01-Jul-2025 12:51:09 UTC] PHP Fatal error:  Cannot redeclare get_stripe_customer() (previously declared in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php:79) in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-paid-to-qbo-payment.php on line 103
[10-Jul-2025 11:05:54 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rg3bhCDiOqgoJOUDx5ZDPOR)
[10-Jul-2025 11:05:54 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 382
[10-Jul-2025 11:05:54 UTC] Starting invoice creation process for event: evt_1Rg3bhCDiOqgoJOUDx5ZDPOR
[10-Jul-2025 11:05:54 UTC] Fetching Stripe invoice: in_1Rg3bhCDiOqgoJOU9Lik6gxq
[10-Jul-2025 11:05:54 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rg3bhCDiOqgoJOU9Lik6gxq
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 4500
    [amount_overpaid] => 0
    [amount_paid] => 4500
    [amount_remaining] => 0
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 1
    [attempted] => 1
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => ch_3Rg3eQCDiOqgoJOU0g2JJzHy
    [collection_method] => charge_automatically
    [created] => 1751374097
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 
    [effective_at] => 1751374266
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => Array
        (
            [action] => revision
            [invoice] => in_1Rg3UaCDiOqgoJOURz0i1VuD
        )

    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TYkc3R2JsdGdMTGhJRkFmOFMwUHl3WlZNOGZ2Q2J1LDE0MjY4NjM1NA0200pOyIrS7D?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TYkc3R2JsdGdMTGhJRkFmOFMwUHl3WlZNOGZ2Q2J1LDE0MjY4NjM1NA0200pOyIrS7D/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rg3bhCDiOqgoJOUkWWlVmfB
                            [object] => line_item
                            [amount] => 4500
                            [amount_excluding_tax] => 4500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rg3bhCDiOqgoJOU9Lik6gxq
                            [invoice_item] => ii_1Rg3bhCDiOqgoJOUAPZEdL37
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rg3bhCDiOqgoJOUAPZEdL37
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1751373716
                                    [start] => 1751373716
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 9
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rg3bhCDiOqgoJOU9Lik6gxq/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0003
    [on_behalf_of] => 
    [paid] => 1
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3Rg3eQCDiOqgoJOU0S2rTQHm
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1751373656
    [period_start] => 1751373656
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => 
            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => paid
    [status_transitions] => Array
        (
            [finalized_at] => 1751374266
            [marked_uncollectible_at] => 
            [paid_at] => 1751374266
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 4500
    [subtotal_excluding_tax] => 4500
    [tax] => 
    [test_clock] => 
    [total] => 4500
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 4500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
        )

    [total_taxes] => Array
        (
        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1751374273
)

[10-Jul-2025 11:05:54 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [error] => Token expired - please reconnect
        )

)

[10-Jul-2025 11:05:54 UTC] Invoice creation failed: Failed to find or create customer in QuickBooks
[10-Jul-2025 11:05:54 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 398
[10-Jul-2025 11:09:40 UTC] Stripe Webhook Received: invoice.created (ID: evt_1RdplxCDiOqgoJOUbjIVF4Bi)
[10-Jul-2025 11:09:40 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 382
[10-Jul-2025 11:09:40 UTC] Starting invoice creation process for event: evt_1RdplxCDiOqgoJOUbjIVF4Bi
[10-Jul-2025 11:09:40 UTC] Fetching Stripe invoice: in_1RdplwCDiOqgoJOUTlyNFHfE
[10-Jul-2025 11:09:40 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RdplwCDiOqgoJOUTlyNFHfE
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 500
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 500
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 1
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1750844260
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1753440639
    [effective_at] => 1750848639
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TWXhoSHJDQVZiNzUyNUNmWUNuN083dGlDeGp6dGkxLDE0MjY4NjU4MA0200Q2tBWGrk?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TWXhoSHJDQVZiNzUyNUNmWUNuN083dGlDeGp6dGkxLDE0MjY4NjU4MA0200Q2tBWGrk/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RdpmBCDiOqgoJOUNWFfku4S
                            [object] => line_item
                            [amount] => 500
                            [amount_excluding_tax] => 500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RdplwCDiOqgoJOUTlyNFHfE
                            [invoice_item] => ii_1RdpmBCDiOqgoJOUOFogoPMC
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1RdpmBCDiOqgoJOUOFogoPMC
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1750844275
                                    [start] => 1750844275
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 1
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1RdplwCDiOqgoJOUTlyNFHfE/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0001
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RdquZCDiOqgoJOU0e7Q3yNN
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1750844260
    [period_start] => 1750844260
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => open
    [status_transitions] => Array
        (
            [finalized_at] => 1750848639
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 500
    [subtotal_excluding_tax] => 500
    [tax] => 
    [test_clock] => 
    [total] => 500
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
        )

    [total_taxes] => Array
        (
        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1750845013
)

[10-Jul-2025 11:09:40 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [error] => Token expired - please reconnect
        )

)

[10-Jul-2025 11:09:40 UTC] Invoice creation failed: Failed to find or create customer in QuickBooks
[10-Jul-2025 11:09:40 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 398
[10-Jul-2025 11:09:51 UTC] Stripe Webhook Received: invoice.created (ID: evt_1RdplxCDiOqgoJOUbjIVF4Bi)
[10-Jul-2025 11:09:51 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 382
[10-Jul-2025 11:09:51 UTC] Starting invoice creation process for event: evt_1RdplxCDiOqgoJOUbjIVF4Bi
[10-Jul-2025 11:09:51 UTC] Fetching Stripe invoice: in_1RdplwCDiOqgoJOUTlyNFHfE
[10-Jul-2025 11:09:52 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RdplwCDiOqgoJOUTlyNFHfE
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 500
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 500
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 1
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1750844260
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1753440639
    [effective_at] => 1750848639
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TWXhoSHJDQVZiNzUyNUNmWUNuN083dGlDeGp6dGkxLDE0MjY4NjU5Mg02000pLDdU5T?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TWXhoSHJDQVZiNzUyNUNmWUNuN083dGlDeGp6dGkxLDE0MjY4NjU5Mg02000pLDdU5T/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RdpmBCDiOqgoJOUNWFfku4S
                            [object] => line_item
                            [amount] => 500
                            [amount_excluding_tax] => 500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RdplwCDiOqgoJOUTlyNFHfE
                            [invoice_item] => ii_1RdpmBCDiOqgoJOUOFogoPMC
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1RdpmBCDiOqgoJOUOFogoPMC
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1750844275
                                    [start] => 1750844275
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 1
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1RdplwCDiOqgoJOUTlyNFHfE/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0001
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RdquZCDiOqgoJOU0e7Q3yNN
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1750844260
    [period_start] => 1750844260
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => open
    [status_transitions] => Array
        (
            [finalized_at] => 1750848639
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 500
    [subtotal_excluding_tax] => 500
    [tax] => 
    [test_clock] => 
    [total] => 500
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
        )

    [total_taxes] => Array
        (
        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1750845013
)

[10-Jul-2025 11:09:52 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [error] => Token expired - please reconnect
        )

)

[10-Jul-2025 11:09:52 UTC] Invoice creation failed: Failed to find or create customer in QuickBooks
[10-Jul-2025 11:09:52 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 398
[10-Jul-2025 12:45:45 UTC] Stripe Webhook Received: invoice.created (ID: evt_1RdplxCDiOqgoJOUbjIVF4Bi)
[10-Jul-2025 12:45:45 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 382
[10-Jul-2025 12:45:45 UTC] Starting invoice creation process for event: evt_1RdplxCDiOqgoJOUbjIVF4Bi
[10-Jul-2025 12:45:45 UTC] Fetching Stripe invoice: in_1RdplwCDiOqgoJOUTlyNFHfE
[10-Jul-2025 12:45:46 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RdplwCDiOqgoJOUTlyNFHfE
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 500
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 500
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 1
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1750844260
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1753440639
    [effective_at] => 1750848639
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TWXhoSHJDQVZiNzUyNUNmWUNuN083dGlDeGp6dGkxLDE0MjY5MjM0Ng0200dZABLp9X?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TWXhoSHJDQVZiNzUyNUNmWUNuN083dGlDeGp6dGkxLDE0MjY5MjM0Ng0200dZABLp9X/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RdpmBCDiOqgoJOUNWFfku4S
                            [object] => line_item
                            [amount] => 500
                            [amount_excluding_tax] => 500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RdplwCDiOqgoJOUTlyNFHfE
                            [invoice_item] => ii_1RdpmBCDiOqgoJOUOFogoPMC
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1RdpmBCDiOqgoJOUOFogoPMC
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1750844275
                                    [start] => 1750844275
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 1
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1RdplwCDiOqgoJOUTlyNFHfE/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0001
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RdquZCDiOqgoJOU0e7Q3yNN
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1750844260
    [period_start] => 1750844260
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => open
    [status_transitions] => Array
        (
            [finalized_at] => 1750848639
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 500
    [subtotal_excluding_tax] => 500
    [tax] => 
    [test_clock] => 
    [total] => 500
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
        )

    [total_taxes] => Array
        (
        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1750845013
)

[10-Jul-2025 12:45:46 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [error] => Token expired - please reconnect
        )

)

[10-Jul-2025 12:45:46 UTC] Invoice creation failed: Failed to find or create customer in QuickBooks
[10-Jul-2025 12:45:46 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 398
[10-Jul-2025 12:50:34 UTC] Stripe Webhook Received: invoice.created (ID: evt_1RdplxCDiOqgoJOUbjIVF4Bi)
[10-Jul-2025 12:50:34 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 382
[10-Jul-2025 12:50:35 UTC] Starting invoice creation process for event: evt_1RdplxCDiOqgoJOUbjIVF4Bi
[10-Jul-2025 12:50:35 UTC] Fetching Stripe invoice: in_1RdplwCDiOqgoJOUTlyNFHfE
[10-Jul-2025 12:50:35 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RdplwCDiOqgoJOUTlyNFHfE
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 500
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 500
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 1
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1750844260
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1753440639
    [effective_at] => 1750848639
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TWXhoSHJDQVZiNzUyNUNmWUNuN083dGlDeGp6dGkxLDE0MjY5MjYzNQ0200aHmLRSd7?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TWXhoSHJDQVZiNzUyNUNmWUNuN083dGlDeGp6dGkxLDE0MjY5MjYzNQ0200aHmLRSd7/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RdpmBCDiOqgoJOUNWFfku4S
                            [object] => line_item
                            [amount] => 500
                            [amount_excluding_tax] => 500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RdplwCDiOqgoJOUTlyNFHfE
                            [invoice_item] => ii_1RdpmBCDiOqgoJOUOFogoPMC
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1RdpmBCDiOqgoJOUOFogoPMC
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1750844275
                                    [start] => 1750844275
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 1
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1RdplwCDiOqgoJOUTlyNFHfE/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0001
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RdquZCDiOqgoJOU0e7Q3yNN
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1750844260
    [period_start] => 1750844260
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => open
    [status_transitions] => Array
        (
            [finalized_at] => 1750848639
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 500
    [subtotal_excluding_tax] => 500
    [tax] => 
    [test_clock] => 
    [total] => 500
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
        )

    [total_taxes] => Array
        (
        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1750845013
)

[10-Jul-2025 12:50:35 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [error] => Token expired - please reconnect
        )

)

[10-Jul-2025 12:50:35 UTC] Invoice creation failed: Failed to find or create customer in QuickBooks
[10-Jul-2025 12:50:35 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 398
[10-Jul-2025 12:59:07 UTC] Stripe Webhook Received: invoice.created (ID: evt_1RdplxCDiOqgoJOUbjIVF4Bi)
[10-Jul-2025 12:59:07 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[10-Jul-2025 12:59:07 UTC] Starting invoice creation process for event: evt_1RdplxCDiOqgoJOUbjIVF4Bi
[10-Jul-2025 12:59:07 UTC] Fetching Stripe invoice: in_1RdplwCDiOqgoJOUTlyNFHfE
[10-Jul-2025 12:59:08 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RdplwCDiOqgoJOUTlyNFHfE
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 500
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 500
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 1
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1750844260
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1753440639
    [effective_at] => 1750848639
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TWXhoSHJDQVZiNzUyNUNmWUNuN083dGlDeGp6dGkxLDE0MjY5MzE0OA0200NVWXjh4P?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TWXhoSHJDQVZiNzUyNUNmWUNuN083dGlDeGp6dGkxLDE0MjY5MzE0OA0200NVWXjh4P/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RdpmBCDiOqgoJOUNWFfku4S
                            [object] => line_item
                            [amount] => 500
                            [amount_excluding_tax] => 500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RdplwCDiOqgoJOUTlyNFHfE
                            [invoice_item] => ii_1RdpmBCDiOqgoJOUOFogoPMC
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1RdpmBCDiOqgoJOUOFogoPMC
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1750844275
                                    [start] => 1750844275
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 1
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1RdplwCDiOqgoJOUTlyNFHfE/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0001
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RdquZCDiOqgoJOU0e7Q3yNN
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1750844260
    [period_start] => 1750844260
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => open
    [status_transitions] => Array
        (
            [finalized_at] => 1750848639
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 500
    [subtotal_excluding_tax] => 500
    [tax] => 
    [test_clock] => 
    [total] => 500
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
        )

    [total_taxes] => Array
        (
        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1750845013
)

[10-Jul-2025 12:59:08 UTC] Failed to create customer: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Duplicate Name Exists Error
                                    [Detail] => The name supplied already exists. : null
                                    [code] => 6240
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-10T05:59:08.934-07:00
        )

)

[10-Jul-2025 12:59:08 UTC] Invoice creation failed: Failed to find or create customer in QuickBooks
[10-Jul-2025 12:59:08 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[10-Jul-2025 13:03:17 UTC] Stripe Webhook Received: invoice.created (ID: evt_1RdplxCDiOqgoJOUbjIVF4Bi)
[10-Jul-2025 13:03:17 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[10-Jul-2025 13:03:17 UTC] Starting invoice creation process for event: evt_1RdplxCDiOqgoJOUbjIVF4Bi
[10-Jul-2025 13:03:17 UTC] Fetching Stripe invoice: in_1RdplwCDiOqgoJOUTlyNFHfE
[10-Jul-2025 13:03:18 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RdplwCDiOqgoJOUTlyNFHfE
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 500
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 500
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 1
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1750844260
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1753440639
    [effective_at] => 1750848639
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TWXhoSHJDQVZiNzUyNUNmWUNuN083dGlDeGp6dGkxLDE0MjY5MzM5OA0200OUMylCPe?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TWXhoSHJDQVZiNzUyNUNmWUNuN083dGlDeGp6dGkxLDE0MjY5MzM5OA0200OUMylCPe/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RdpmBCDiOqgoJOUNWFfku4S
                            [object] => line_item
                            [amount] => 500
                            [amount_excluding_tax] => 500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RdplwCDiOqgoJOUTlyNFHfE
                            [invoice_item] => ii_1RdpmBCDiOqgoJOUOFogoPMC
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1RdpmBCDiOqgoJOUOFogoPMC
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1750844275
                                    [start] => 1750844275
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 1
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1RdplwCDiOqgoJOUTlyNFHfE/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0001
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RdquZCDiOqgoJOU0e7Q3yNN
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1750844260
    [period_start] => 1750844260
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => open
    [status_transitions] => Array
        (
            [finalized_at] => 1750848639
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 500
    [subtotal_excluding_tax] => 500
    [tax] => 
    [test_clock] => 
    [total] => 500
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
        )

    [total_taxes] => Array
        (
        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1750845013
)

[10-Jul-2025 13:03:19 UTC] Using QBO customer ID: 101
[10-Jul-2025 13:03:19 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 101
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 5
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 25
                                )

                            [UnitPrice] => 5
                            [Qty] => 1
                        )

                )

        )

    [TxnDate] => 2025-06-25
    [DueDate] => 2025-07-25
    [TotalAmt] => 5
    [PrivateNote] => Stripe Invoice ID: in_1RdplwCDiOqgoJOUTlyNFHfE
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
)

[10-Jul-2025 13:03:20 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 620
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-10T06:03:20-07:00
                            [LastModifiedByRef] => Array
                                (
                                    [value] => 123145870265994
                                )

                            [LastUpdatedTime] => 2025-07-10T06:03:20-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1225
                    [TxnDate] => 2025-06-25
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Invoice ID: in_1RdplwCDiOqgoJOUTlyNFHfE
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 5
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 25
                                                    [name] => product1
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 1
                                                    [name] => Services
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => NON
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 5
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 0
                        )

                    [CustomerRef] => Array
                        (
                            [value] => 101
                            [name] => testt
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 142
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [DueDate] => 2025-07-25
                    [TotalAmt] => 5
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 5
                )

            [time] => 2025-07-10T06:03:19.834-07:00
        )

)

[10-Jul-2025 13:03:20 UTC] Invoice created successfully in QBO. Invoice ID: 620
[10-Jul-2025 13:03:20 UTC] Invoice creation failed: Table 'wdsklsxvqb_stripe_qbo_integration.invoice_mappings' doesn't exist
[10-Jul-2025 13:03:20 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[10-Jul-2025 13:53:56 UTC] Stripe Webhook Received: invoice.created (ID: evt_1RdplxCDiOqgoJOUbjIVF4Bi)
[10-Jul-2025 13:53:56 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[10-Jul-2025 13:53:56 UTC] Starting invoice creation process for event: evt_1RdplxCDiOqgoJOUbjIVF4Bi
[10-Jul-2025 13:53:56 UTC] Fetching Stripe invoice: in_1RdplwCDiOqgoJOUTlyNFHfE
[10-Jul-2025 13:53:56 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RdplwCDiOqgoJOUTlyNFHfE
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 500
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 500
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 1
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1750844260
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1753440639
    [effective_at] => 1750848639
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TWXhoSHJDQVZiNzUyNUNmWUNuN083dGlDeGp6dGkxLDE0MjY5NjQzNg0200oKcl7dzg?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TWXhoSHJDQVZiNzUyNUNmWUNuN083dGlDeGp6dGkxLDE0MjY5NjQzNg0200oKcl7dzg/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RdpmBCDiOqgoJOUNWFfku4S
                            [object] => line_item
                            [amount] => 500
                            [amount_excluding_tax] => 500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RdplwCDiOqgoJOUTlyNFHfE
                            [invoice_item] => ii_1RdpmBCDiOqgoJOUOFogoPMC
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1RdpmBCDiOqgoJOUOFogoPMC
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1750844275
                                    [start] => 1750844275
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 1
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1RdplwCDiOqgoJOUTlyNFHfE/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0001
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RdquZCDiOqgoJOU0e7Q3yNN
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1750844260
    [period_start] => 1750844260
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => open
    [status_transitions] => Array
        (
            [finalized_at] => 1750848639
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 500
    [subtotal_excluding_tax] => 500
    [tax] => 
    [test_clock] => 
    [total] => 500
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
        )

    [total_taxes] => Array
        (
        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1750845013
)

[10-Jul-2025 13:53:57 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1752155637159
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[10-Jul-2025 13:53:57 UTC] Invoice creation failed: Failed to find or create customer in QuickBooks
[10-Jul-2025 13:53:57 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[10-Jul-2025 13:56:30 UTC] Stripe Webhook Received: invoice.created (ID: evt_1RdplxCDiOqgoJOUbjIVF4Bi)
[10-Jul-2025 13:56:30 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[10-Jul-2025 13:56:30 UTC] Starting invoice creation process for event: evt_1RdplxCDiOqgoJOUbjIVF4Bi
[10-Jul-2025 13:56:30 UTC] Fetching Stripe invoice: in_1RdplwCDiOqgoJOUTlyNFHfE
[10-Jul-2025 13:56:31 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RdplwCDiOqgoJOUTlyNFHfE
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 500
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 500
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 1
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1750844260
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1753440639
    [effective_at] => 1750848639
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TWXhoSHJDQVZiNzUyNUNmWUNuN083dGlDeGp6dGkxLDE0MjY5NjU5MQ0200L9pdmQAY?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TWXhoSHJDQVZiNzUyNUNmWUNuN083dGlDeGp6dGkxLDE0MjY5NjU5MQ0200L9pdmQAY/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RdpmBCDiOqgoJOUNWFfku4S
                            [object] => line_item
                            [amount] => 500
                            [amount_excluding_tax] => 500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RdplwCDiOqgoJOUTlyNFHfE
                            [invoice_item] => ii_1RdpmBCDiOqgoJOUOFogoPMC
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1RdpmBCDiOqgoJOUOFogoPMC
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1750844275
                                    [start] => 1750844275
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 1
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1RdplwCDiOqgoJOUTlyNFHfE/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0001
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RdquZCDiOqgoJOU0e7Q3yNN
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1750844260
    [period_start] => 1750844260
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => open
    [status_transitions] => Array
        (
            [finalized_at] => 1750848639
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 500
    [subtotal_excluding_tax] => 500
    [tax] => 
    [test_clock] => 
    [total] => 500
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
        )

    [total_taxes] => Array
        (
        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1750845013
)

[10-Jul-2025 13:56:32 UTC] Failed to create customer: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Duplicate Name Exists Error
                                    [Detail] => The name supplied already exists. : null
                                    [code] => 6240
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-10T06:56:32.251-07:00
        )

)

[10-Jul-2025 13:56:32 UTC] Invoice creation failed: Failed to find or create customer in QuickBooks
[10-Jul-2025 13:56:32 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[10-Jul-2025 14:08:59 UTC] Stripe Webhook Received: invoice.created (ID: evt_1RdplxCDiOqgoJOUbjIVF4Bi)
[10-Jul-2025 14:08:59 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[10-Jul-2025 14:08:59 UTC] Starting invoice creation process for event: evt_1RdplxCDiOqgoJOUbjIVF4Bi
[10-Jul-2025 14:08:59 UTC] Fetching Stripe invoice: in_1RdplwCDiOqgoJOUTlyNFHfE
[10-Jul-2025 14:08:59 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RdplwCDiOqgoJOUTlyNFHfE
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 500
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 500
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 1
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1750844260
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1753440639
    [effective_at] => 1750848639
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TWXhoSHJDQVZiNzUyNUNmWUNuN083dGlDeGp6dGkxLDE0MjY5NzMzOQ0200GskLFeVb?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TWXhoSHJDQVZiNzUyNUNmWUNuN083dGlDeGp6dGkxLDE0MjY5NzMzOQ0200GskLFeVb/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RdpmBCDiOqgoJOUNWFfku4S
                            [object] => line_item
                            [amount] => 500
                            [amount_excluding_tax] => 500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RdplwCDiOqgoJOUTlyNFHfE
                            [invoice_item] => ii_1RdpmBCDiOqgoJOUOFogoPMC
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1RdpmBCDiOqgoJOUOFogoPMC
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1750844275
                                    [start] => 1750844275
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 1
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1RdplwCDiOqgoJOUTlyNFHfE/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0001
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RdquZCDiOqgoJOU0e7Q3yNN
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1750844260
    [period_start] => 1750844260
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => open
    [status_transitions] => Array
        (
            [finalized_at] => 1750848639
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 500
    [subtotal_excluding_tax] => 500
    [tax] => 
    [test_clock] => 
    [total] => 500
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
        )

    [total_taxes] => Array
        (
        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1750845013
)

[10-Jul-2025 14:09:00 UTC] email of customer: test@fsdf.fg
[10-Jul-2025 14:09:01 UTC] Failed to create customer: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Duplicate Name Exists Error
                                    [Detail] => The name supplied already exists. : null
                                    [code] => 6240
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-10T07:09:00.990-07:00
        )

)

[10-Jul-2025 14:09:01 UTC] Invoice creation failed: Failed to find or create customer in QuickBooks
[10-Jul-2025 14:09:01 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[10-Jul-2025 14:12:36 UTC] Stripe Webhook Received: invoice.created (ID: evt_1RdplxCDiOqgoJOUbjIVF4Bi)
[10-Jul-2025 14:12:36 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[10-Jul-2025 14:12:36 UTC] Starting invoice creation process for event: evt_1RdplxCDiOqgoJOUbjIVF4Bi
[10-Jul-2025 14:12:36 UTC] Fetching Stripe invoice: in_1RdplwCDiOqgoJOUTlyNFHfE
[10-Jul-2025 14:12:37 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RdplwCDiOqgoJOUTlyNFHfE
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 500
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 500
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 1
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1750844260
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1753440639
    [effective_at] => 1750848639
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TWXhoSHJDQVZiNzUyNUNmWUNuN083dGlDeGp6dGkxLDE0MjY5NzU1Nw02001KOB5jv6?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TWXhoSHJDQVZiNzUyNUNmWUNuN083dGlDeGp6dGkxLDE0MjY5NzU1Nw02001KOB5jv6/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RdpmBCDiOqgoJOUNWFfku4S
                            [object] => line_item
                            [amount] => 500
                            [amount_excluding_tax] => 500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RdplwCDiOqgoJOUTlyNFHfE
                            [invoice_item] => ii_1RdpmBCDiOqgoJOUOFogoPMC
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1RdpmBCDiOqgoJOUOFogoPMC
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1750844275
                                    [start] => 1750844275
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 1
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1RdplwCDiOqgoJOUTlyNFHfE/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0001
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RdquZCDiOqgoJOU0e7Q3yNN
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1750844260
    [period_start] => 1750844260
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => open
    [status_transitions] => Array
        (
            [finalized_at] => 1750848639
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 500
    [subtotal_excluding_tax] => 500
    [tax] => 
    [test_clock] => 
    [total] => 500
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
        )

    [total_taxes] => Array
        (
        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1750845013
)

[10-Jul-2025 14:12:37 UTC] PHP Warning:  Array to string conversion in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 171
[10-Jul-2025 14:12:37 UTC] email of customer: Array
[10-Jul-2025 14:12:37 UTC] Failed to create customer: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Duplicate Name Exists Error
                                    [Detail] => The name supplied already exists. : null
                                    [code] => 6240
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-10T07:12:37.813-07:00
        )

)

[10-Jul-2025 14:12:37 UTC] Invoice creation failed: Failed to find or create customer in QuickBooks
[10-Jul-2025 14:12:37 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[10-Jul-2025 14:17:10 UTC] Stripe Webhook Received: invoice.created (ID: evt_1RdplxCDiOqgoJOUbjIVF4Bi)
[10-Jul-2025 14:17:10 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[10-Jul-2025 14:17:10 UTC] Starting invoice creation process for event: evt_1RdplxCDiOqgoJOUbjIVF4Bi
[10-Jul-2025 14:17:10 UTC] Fetching Stripe invoice: in_1RdplwCDiOqgoJOUTlyNFHfE
[10-Jul-2025 14:17:11 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RdplwCDiOqgoJOUTlyNFHfE
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 500
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 500
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 1
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1750844260
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1753440639
    [effective_at] => 1750848639
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TWXhoSHJDQVZiNzUyNUNmWUNuN083dGlDeGp6dGkxLDE0MjY5NzgzMQ0200s6FSW90n?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TWXhoSHJDQVZiNzUyNUNmWUNuN083dGlDeGp6dGkxLDE0MjY5NzgzMQ0200s6FSW90n/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RdpmBCDiOqgoJOUNWFfku4S
                            [object] => line_item
                            [amount] => 500
                            [amount_excluding_tax] => 500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RdplwCDiOqgoJOUTlyNFHfE
                            [invoice_item] => ii_1RdpmBCDiOqgoJOUOFogoPMC
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1RdpmBCDiOqgoJOUOFogoPMC
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1750844275
                                    [start] => 1750844275
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 1
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1RdplwCDiOqgoJOUTlyNFHfE/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0001
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RdquZCDiOqgoJOU0e7Q3yNN
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1750844260
    [period_start] => 1750844260
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => open
    [status_transitions] => Array
        (
            [finalized_at] => 1750848639
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 500
    [subtotal_excluding_tax] => 500
    [tax] => 
    [test_clock] => 
    [total] => 500
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
        )

    [total_taxes] => Array
        (
        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1750845013
)

[10-Jul-2025 14:17:11 UTC] email of customer: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Error parsing query
                                    [Detail] => QueryParserError: null
                                    [code] => 4000
                                    [element] => Query
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-10T07:17:11.452-07:00
        )

)

[10-Jul-2025 14:17:11 UTC] Failed to create customer: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Duplicate Name Exists Error
                                    [Detail] => The name supplied already exists. : null
                                    [code] => 6240
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-10T07:17:11.809-07:00
        )

)

[10-Jul-2025 14:17:11 UTC] Invoice creation failed: Failed to find or create customer in QuickBooks
[10-Jul-2025 14:17:11 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[10-Jul-2025 14:21:44 UTC] Stripe Webhook Received: invoice.created (ID: evt_1RdplxCDiOqgoJOUbjIVF4Bi)
[10-Jul-2025 14:21:44 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[10-Jul-2025 14:21:44 UTC] Starting invoice creation process for event: evt_1RdplxCDiOqgoJOUbjIVF4Bi
[10-Jul-2025 14:21:44 UTC] Fetching Stripe invoice: in_1RdplwCDiOqgoJOUTlyNFHfE
[10-Jul-2025 14:21:44 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RdplwCDiOqgoJOUTlyNFHfE
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 500
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 500
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 1
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1750844260
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1753440639
    [effective_at] => 1750848639
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TWXhoSHJDQVZiNzUyNUNmWUNuN083dGlDeGp6dGkxLDE0MjY5ODEwNA02009y9Ad5gK?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TWXhoSHJDQVZiNzUyNUNmWUNuN083dGlDeGp6dGkxLDE0MjY5ODEwNA02009y9Ad5gK/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RdpmBCDiOqgoJOUNWFfku4S
                            [object] => line_item
                            [amount] => 500
                            [amount_excluding_tax] => 500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RdplwCDiOqgoJOUTlyNFHfE
                            [invoice_item] => ii_1RdpmBCDiOqgoJOUOFogoPMC
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1RdpmBCDiOqgoJOUOFogoPMC
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1750844275
                                    [start] => 1750844275
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 1
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1RdplwCDiOqgoJOUTlyNFHfE/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0001
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RdquZCDiOqgoJOU0e7Q3yNN
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1750844260
    [period_start] => 1750844260
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => open
    [status_transitions] => Array
        (
            [finalized_at] => 1750848639
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 500
    [subtotal_excluding_tax] => 500
    [tax] => 
    [test_clock] => 
    [total] => 500
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
        )

    [total_taxes] => Array
        (
        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1750845013
)

[10-Jul-2025 14:21:45 UTC] email of customer: Array
(
    [code] => 200
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => An application error has occurred while processing your request
                                    [Detail] => System Failure Error: {0}
                                    [code] => 10000
                                    [element] => SystemFailureError
                                )

                        )

                    [type] => SystemFault
                )

            [time] => 2025-07-10T07:21:45.375-07:00
        )

)

[10-Jul-2025 14:21:45 UTC] Failed to create customer: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Duplicate Name Exists Error
                                    [Detail] => The name supplied already exists. : null
                                    [code] => 6240
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-10T07:21:45.880-07:00
        )

)

[10-Jul-2025 14:21:45 UTC] Invoice creation failed: Failed to find or create customer in QuickBooks
[10-Jul-2025 14:21:45 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[10-Jul-2025 14:23:22 UTC] Stripe Webhook Received: invoice.created (ID: evt_1RdplxCDiOqgoJOUbjIVF4Bi)
[10-Jul-2025 14:23:22 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[10-Jul-2025 14:23:22 UTC] Starting invoice creation process for event: evt_1RdplxCDiOqgoJOUbjIVF4Bi
[10-Jul-2025 14:23:22 UTC] Fetching Stripe invoice: in_1RdplwCDiOqgoJOUTlyNFHfE
[10-Jul-2025 14:23:23 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RdplwCDiOqgoJOUTlyNFHfE
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 500
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 500
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 1
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1750844260
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1753440639
    [effective_at] => 1750848639
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TWXhoSHJDQVZiNzUyNUNmWUNuN083dGlDeGp6dGkxLDE0MjY5ODIwMw02007goWWUZL?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TWXhoSHJDQVZiNzUyNUNmWUNuN083dGlDeGp6dGkxLDE0MjY5ODIwMw02007goWWUZL/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RdpmBCDiOqgoJOUNWFfku4S
                            [object] => line_item
                            [amount] => 500
                            [amount_excluding_tax] => 500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RdplwCDiOqgoJOUTlyNFHfE
                            [invoice_item] => ii_1RdpmBCDiOqgoJOUOFogoPMC
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1RdpmBCDiOqgoJOUOFogoPMC
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1750844275
                                    [start] => 1750844275
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 1
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1RdplwCDiOqgoJOUTlyNFHfE/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0001
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RdquZCDiOqgoJOU0e7Q3yNN
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1750844260
    [period_start] => 1750844260
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => open
    [status_transitions] => Array
        (
            [finalized_at] => 1750848639
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 500
    [subtotal_excluding_tax] => 500
    [tax] => 
    [test_clock] => 
    [total] => 500
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
        )

    [total_taxes] => Array
        (
        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1750845013
)

[10-Jul-2025 14:23:23 UTC] email of customer: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 5
                                    [BalanceWithJobs] => 5
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 101
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-10T06:03:19-07:00
                                            [LastUpdatedTime] => 2025-07-10T06:03:20-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt
                                    [DisplayName] => testt
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098e066dfbe82b54d139d83565e5f664ced
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                )

                            [1] => Array
                                (
                                    [Taxable] => 1
                                    [BillAddr] => Array
                                        (
                                            [Id] => 141
                                        )

                                    [ShipAddr] => Array
                                        (
                                            [Id] => 141
                                        )

                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 99
                                    [SyncToken] => 1
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-10T01:36:59-07:00
                                            [LastUpdatedTime] => 2025-07-10T06:02:55-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testtqq
                                    [DisplayName] => testtqq
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020981d6681610c5f4203ac7c35187bf645d0
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                    [DefaultTaxCodeRef] => Array
                                        (
                                            [value] => 2
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 2
                )

            [time] => 2025-07-10T07:23:23.757-07:00
        )

)

[10-Jul-2025 14:23:23 UTC] Using QBO customer ID: 101
[10-Jul-2025 14:23:24 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 101
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 5
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 25
                                )

                            [UnitPrice] => 5
                            [Qty] => 1
                        )

                )

        )

    [TxnDate] => 2025-06-25
    [DueDate] => 2025-07-25
    [TotalAmt] => 5
    [PrivateNote] => Stripe Invoice ID: in_1RdplwCDiOqgoJOUTlyNFHfE
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
)

[10-Jul-2025 14:23:25 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 621
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-10T07:23:25-07:00
                            [LastModifiedByRef] => Array
                                (
                                    [value] => 123145870265994
                                )

                            [LastUpdatedTime] => 2025-07-10T07:23:25-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1226
                    [TxnDate] => 2025-06-25
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Invoice ID: in_1RdplwCDiOqgoJOUTlyNFHfE
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 5
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 25
                                                    [name] => product1
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 1
                                                    [name] => Services
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => NON
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 5
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 0
                        )

                    [CustomerRef] => Array
                        (
                            [value] => 101
                            [name] => testt
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 143
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [DueDate] => 2025-07-25
                    [TotalAmt] => 5
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 5
                )

            [time] => 2025-07-10T07:23:24.538-07:00
        )

)

[10-Jul-2025 14:23:25 UTC] Invoice created successfully in QBO. Invoice ID: 621
[10-Jul-2025 14:23:25 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[10-Jul-2025 14:28:44 UTC] Stripe Webhook Received: invoice.created (ID: evt_1RdplxCDiOqgoJOUbjIVF4Bi)
[10-Jul-2025 14:28:44 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[10-Jul-2025 14:28:44 UTC] Starting invoice creation process for event: evt_1RdplxCDiOqgoJOUbjIVF4Bi
[10-Jul-2025 14:28:44 UTC] Fetching Stripe invoice: in_1RdplwCDiOqgoJOUTlyNFHfE
[10-Jul-2025 14:28:45 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RdplwCDiOqgoJOUTlyNFHfE
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 500
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 500
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 1
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1750844260
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1753440639
    [effective_at] => 1750848639
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TWXhoSHJDQVZiNzUyNUNmWUNuN083dGlDeGp6dGkxLDE0MjY5ODUyNQ0200TbsaPgQ2?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TWXhoSHJDQVZiNzUyNUNmWUNuN083dGlDeGp6dGkxLDE0MjY5ODUyNQ0200TbsaPgQ2/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RdpmBCDiOqgoJOUNWFfku4S
                            [object] => line_item
                            [amount] => 500
                            [amount_excluding_tax] => 500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RdplwCDiOqgoJOUTlyNFHfE
                            [invoice_item] => ii_1RdpmBCDiOqgoJOUOFogoPMC
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1RdpmBCDiOqgoJOUOFogoPMC
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1750844275
                                    [start] => 1750844275
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 1
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1RdplwCDiOqgoJOUTlyNFHfE/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0001
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RdquZCDiOqgoJOU0e7Q3yNN
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1750844260
    [period_start] => 1750844260
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => open
    [status_transitions] => Array
        (
            [finalized_at] => 1750848639
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 500
    [subtotal_excluding_tax] => 500
    [tax] => 
    [test_clock] => 
    [total] => 500
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
        )

    [total_taxes] => Array
        (
        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1750845013
)

[10-Jul-2025 14:28:46 UTC] email of customer: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 10
                                    [BalanceWithJobs] => 10
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 101
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-10T06:03:19-07:00
                                            [LastUpdatedTime] => 2025-07-10T07:23:25-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt
                                    [DisplayName] => testt
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098e066dfbe82b54d139d83565e5f664ced
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                )

                            [1] => Array
                                (
                                    [Taxable] => 1
                                    [BillAddr] => Array
                                        (
                                            [Id] => 141
                                        )

                                    [ShipAddr] => Array
                                        (
                                            [Id] => 141
                                        )

                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 99
                                    [SyncToken] => 1
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-10T01:36:59-07:00
                                            [LastUpdatedTime] => 2025-07-10T06:02:55-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testtqq
                                    [DisplayName] => testtqq
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020981d6681610c5f4203ac7c35187bf645d0
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                    [DefaultTaxCodeRef] => Array
                                        (
                                            [value] => 2
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 2
                )

            [time] => 2025-07-10T07:28:45.921-07:00
        )

)

[10-Jul-2025 14:28:46 UTC] Using QBO customer ID: 101
[10-Jul-2025 14:28:46 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 101
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 5
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 25
                                )

                            [UnitPrice] => 5
                            [Qty] => 1
                        )

                )

        )

    [TxnDate] => 2025-06-25
    [DueDate] => 2025-07-25
    [TotalAmt] => 5
    [PrivateNote] => Stripe Invoice ID: in_1RdplwCDiOqgoJOUTlyNFHfE
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
)

[10-Jul-2025 14:28:47 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 622
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-10T07:28:47-07:00
                            [LastModifiedByRef] => Array
                                (
                                    [value] => 123145870265994
                                )

                            [LastUpdatedTime] => 2025-07-10T07:28:47-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1227
                    [TxnDate] => 2025-06-25
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Invoice ID: in_1RdplwCDiOqgoJOUTlyNFHfE
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 5
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 25
                                                    [name] => product1
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 1
                                                    [name] => Services
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => NON
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 5
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 0
                        )

                    [CustomerRef] => Array
                        (
                            [value] => 101
                            [name] => testt
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 144
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [DueDate] => 2025-07-25
                    [TotalAmt] => 5
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 5
                )

            [time] => 2025-07-10T07:28:46.605-07:00
        )

)

[10-Jul-2025 14:28:47 UTC] Invoice created successfully in QBO. Invoice ID: 622
[10-Jul-2025 14:28:47 UTC] Invoice creation failed: Duplicate entry '1-in_1RdplwCDiOqgoJOUTlyNFHfE' for key 'unique_mapping'
[10-Jul-2025 14:28:47 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[10-Jul-2025 14:30:06 UTC] Stripe Webhook Received: invoice.created (ID: evt_1RdplxCDiOqgoJOUbjIVF4Bi)
[10-Jul-2025 14:30:06 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[10-Jul-2025 14:30:06 UTC] Starting invoice creation process for event: evt_1RdplxCDiOqgoJOUbjIVF4Bi
[10-Jul-2025 14:30:06 UTC] Fetching Stripe invoice: in_1RdplwCDiOqgoJOUTlyNFHfE
[10-Jul-2025 14:30:06 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RdplwCDiOqgoJOUTlyNFHfE
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 500
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 500
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 1
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1750844260
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1753440639
    [effective_at] => 1750848639
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TWXhoSHJDQVZiNzUyNUNmWUNuN083dGlDeGp6dGkxLDE0MjY5ODYwNg0200SojVbU9h?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TWXhoSHJDQVZiNzUyNUNmWUNuN083dGlDeGp6dGkxLDE0MjY5ODYwNg0200SojVbU9h/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RdpmBCDiOqgoJOUNWFfku4S
                            [object] => line_item
                            [amount] => 500
                            [amount_excluding_tax] => 500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RdplwCDiOqgoJOUTlyNFHfE
                            [invoice_item] => ii_1RdpmBCDiOqgoJOUOFogoPMC
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1RdpmBCDiOqgoJOUOFogoPMC
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1750844275
                                    [start] => 1750844275
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 1
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1RdplwCDiOqgoJOUTlyNFHfE/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0001
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RdquZCDiOqgoJOU0e7Q3yNN
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1750844260
    [period_start] => 1750844260
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => open
    [status_transitions] => Array
        (
            [finalized_at] => 1750848639
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 500
    [subtotal_excluding_tax] => 500
    [tax] => 
    [test_clock] => 
    [total] => 500
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
        )

    [total_taxes] => Array
        (
        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1750845013
)

[10-Jul-2025 14:30:07 UTC] email of customer: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 15
                                    [BalanceWithJobs] => 15
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 101
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-10T06:03:19-07:00
                                            [LastUpdatedTime] => 2025-07-10T07:28:47-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt
                                    [DisplayName] => testt
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098e066dfbe82b54d139d83565e5f664ced
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                )

                            [1] => Array
                                (
                                    [Taxable] => 1
                                    [BillAddr] => Array
                                        (
                                            [Id] => 141
                                        )

                                    [ShipAddr] => Array
                                        (
                                            [Id] => 141
                                        )

                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 99
                                    [SyncToken] => 1
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-10T01:36:59-07:00
                                            [LastUpdatedTime] => 2025-07-10T06:02:55-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testtqq
                                    [DisplayName] => testtqq
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020981d6681610c5f4203ac7c35187bf645d0
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                    [DefaultTaxCodeRef] => Array
                                        (
                                            [value] => 2
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 2
                )

            [time] => 2025-07-10T07:30:07.694-07:00
        )

)

[10-Jul-2025 14:30:07 UTC] Using QBO customer ID: 101
[10-Jul-2025 14:30:08 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 101
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 5
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 25
                                )

                            [UnitPrice] => 5
                            [Qty] => 1
                        )

                )

        )

    [TxnDate] => 2025-06-25
    [DueDate] => 2025-07-25
    [TotalAmt] => 5
    [PrivateNote] => Stripe Invoice ID: in_1RdplwCDiOqgoJOUTlyNFHfE
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
)

[10-Jul-2025 14:30:09 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 623
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-10T07:30:09-07:00
                            [LastModifiedByRef] => Array
                                (
                                    [value] => 123145870265994
                                )

                            [LastUpdatedTime] => 2025-07-10T07:30:09-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1228
                    [TxnDate] => 2025-06-25
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Invoice ID: in_1RdplwCDiOqgoJOUTlyNFHfE
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 5
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 25
                                                    [name] => product1
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 1
                                                    [name] => Services
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => NON
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 5
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 0
                        )

                    [CustomerRef] => Array
                        (
                            [value] => 101
                            [name] => testt
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 145
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [DueDate] => 2025-07-25
                    [TotalAmt] => 5
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 5
                )

            [time] => 2025-07-10T07:30:08.427-07:00
        )

)

[10-Jul-2025 14:30:09 UTC] Invoice created successfully in QBO. Invoice ID: 623
[10-Jul-2025 14:30:09 UTC] Invoice creation failed: Duplicate entry '1-in_1RdplwCDiOqgoJOUTlyNFHfE' for key 'unique_mapping'
[10-Jul-2025 14:30:09 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[10-Jul-2025 14:48:40 UTC] Stripe Webhook Received: invoice.created (ID: evt_1RdplxCDiOqgoJOUbjIVF4Bi)
[10-Jul-2025 14:48:40 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[10-Jul-2025 14:48:40 UTC] Starting invoice creation process for event: evt_1RdplxCDiOqgoJOUbjIVF4Bi
[10-Jul-2025 14:48:40 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[10-Jul-2025 14:48:40 UTC] Invoice already processed. QBO Invoice ID: 621
[10-Jul-2025 14:51:18 UTC] Stripe Webhook Received: invoice.created (ID: evt_1RjLofCDiOqgoJOU5sob3Pxi)
[10-Jul-2025 14:51:18 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[10-Jul-2025 14:51:18 UTC] Starting invoice creation process for event: evt_1RjLofCDiOqgoJOU5sob3Pxi
[10-Jul-2025 14:51:18 UTC] Fetching Stripe invoice: in_1RjLofCDiOqgoJOUCe5KDXLD
[10-Jul-2025 14:51:18 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RjLofCDiOqgoJOUCe5KDXLD
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 0
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 0
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1752159077
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 
    [effective_at] => 
    [ending_balance] => 
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => 
    [invoice_pdf] => 
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                )

            [has_more] => 
            [total_count] => 0
            [url] => /v1/invoices/in_1RjLofCDiOqgoJOUCe5KDXLD/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => 
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => 
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752159077
    [period_start] => 1752159077
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => auto
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => draft
    [status_transitions] => Array
        (
            [finalized_at] => 
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 0
    [subtotal_excluding_tax] => 0
    [tax] => 
    [test_clock] => 
    [total] => 0
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 0
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
        )

    [total_taxes] => Array
        (
        )

    [transfer_data] => 
    [webhooks_delivered_at] => 
)

[10-Jul-2025 14:51:18 UTC] Invoice creation failed: No line items in the invoice, nothing to process.
[10-Jul-2025 14:51:18 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php:147
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(42): process_stripe_invoice_created_to_qbo_invoice()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 147
[10-Jul-2025 15:44:10 UTC] Stripe Webhook Received: invoice.created (ID: evt_1RjLofCDiOqgoJOU5sob3Pxi)
[10-Jul-2025 15:44:10 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[10-Jul-2025 15:44:10 UTC] Starting invoice creation process for event: evt_1RjLofCDiOqgoJOU5sob3Pxi
[10-Jul-2025 15:44:10 UTC] Fetching Stripe invoice: in_1RjLofCDiOqgoJOUCe5KDXLD
[10-Jul-2025 15:44:10 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RjLofCDiOqgoJOUCe5KDXLD
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 2060
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 2060
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 1
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1752159077
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754751194
    [effective_at] => 1752159194
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZWY4UVVEcUtnV2JpZFJSa21SUzZTTzFxc3NBSThKLDE0MjcwMzA1MA0200okuYti7x?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZWY4UVVEcUtnV2JpZFJSa21SUzZTTzFxc3NBSThKLDE0MjcwMzA1MA0200okuYti7x/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RjLq6CDiOqgoJOUYvaxbzIv
                            [object] => line_item
                            [amount] => 2000
                            [amount_excluding_tax] => 2000
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RjLofCDiOqgoJOUCe5KDXLD
                            [invoice_item] => ii_1RjLq6CDiOqgoJOU88ZRurRe
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1RjLq6CDiOqgoJOU88ZRurRe
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752159166
                                    [start] => 1752159166
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 4
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 60
                                            [inclusive] => 
                                            [tax_rate] => txr_1RjLphCDiOqgoJOU9LvwfAOU
                                            [taxability_reason] => 
                                            [taxable_amount] => 2000
                                        )

                                )

                            [tax_rates] => Array
                                (
                                    [0] => Array
                                        (
                                            [id] => txr_1RjLphCDiOqgoJOU9LvwfAOU
                                            [object] => tax_rate
                                            [active] => 1
                                            [country] => US
                                            [created] => 1752159141
                                            [description] => 
                                            [display_name] => Sales tax
                                            [effective_percentage] => 3
                                            [flat_amount] => 
                                            [inclusive] => 
                                            [jurisdiction] => 
                                            [jurisdiction_level] => 
                                            [livemode] => 
                                            [metadata] => Array
                                                (
                                                )

                                            [percentage] => 3
                                            [rate_type] => percentage
                                            [state] => 
                                            [tax_type] => 
                                        )

                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 60
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1RjLphCDiOqgoJOU9LvwfAOU
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 2000
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1RjLofCDiOqgoJOUCe5KDXLD/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0004
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RjLqZCDiOqgoJOU0Bhclz9u
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752159077
    [period_start] => 1752159077
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => open
    [status_transitions] => Array
        (
            [finalized_at] => 1752159194
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 2000
    [subtotal_excluding_tax] => 2000
    [tax] => 60
    [test_clock] => 
    [total] => 2060
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 2000
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 60
                    [inclusive] => 
                    [tax_rate] => txr_1RjLphCDiOqgoJOU9LvwfAOU
                    [taxability_reason] => 
                    [taxable_amount] => 2000
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 60
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1RjLphCDiOqgoJOU9LvwfAOU
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 2000
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752159219
)

[10-Jul-2025 15:44:11 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1752162251091
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[10-Jul-2025 15:44:11 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1752162251290
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[10-Jul-2025 15:44:11 UTC] Invoice creation failed: Failed to find or create customer in QuickBooks
[10-Jul-2025 15:44:11 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php:147
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(42): process_stripe_invoice_created_to_qbo_invoice()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 147
[10-Jul-2025 15:48:22 UTC] Stripe Webhook Received: invoice.created (ID: evt_1RjLofCDiOqgoJOU5sob3Pxi)
[10-Jul-2025 15:48:22 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[10-Jul-2025 15:48:22 UTC] Starting invoice creation process for event: evt_1RjLofCDiOqgoJOU5sob3Pxi
[10-Jul-2025 15:48:22 UTC] Fetching Stripe invoice: in_1RjLofCDiOqgoJOUCe5KDXLD
[10-Jul-2025 15:48:22 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RjLofCDiOqgoJOUCe5KDXLD
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 2060
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 2060
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 1
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1752159077
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754751194
    [effective_at] => 1752159194
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZWY4UVVEcUtnV2JpZFJSa21SUzZTTzFxc3NBSThKLDE0MjcwMzMwMg0200kd506lCX?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZWY4UVVEcUtnV2JpZFJSa21SUzZTTzFxc3NBSThKLDE0MjcwMzMwMg0200kd506lCX/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RjLq6CDiOqgoJOUYvaxbzIv
                            [object] => line_item
                            [amount] => 2000
                            [amount_excluding_tax] => 2000
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RjLofCDiOqgoJOUCe5KDXLD
                            [invoice_item] => ii_1RjLq6CDiOqgoJOU88ZRurRe
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1RjLq6CDiOqgoJOU88ZRurRe
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752159166
                                    [start] => 1752159166
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 4
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 60
                                            [inclusive] => 
                                            [tax_rate] => txr_1RjLphCDiOqgoJOU9LvwfAOU
                                            [taxability_reason] => 
                                            [taxable_amount] => 2000
                                        )

                                )

                            [tax_rates] => Array
                                (
                                    [0] => Array
                                        (
                                            [id] => txr_1RjLphCDiOqgoJOU9LvwfAOU
                                            [object] => tax_rate
                                            [active] => 1
                                            [country] => US
                                            [created] => 1752159141
                                            [description] => 
                                            [display_name] => Sales tax
                                            [effective_percentage] => 3
                                            [flat_amount] => 
                                            [inclusive] => 
                                            [jurisdiction] => 
                                            [jurisdiction_level] => 
                                            [livemode] => 
                                            [metadata] => Array
                                                (
                                                )

                                            [percentage] => 3
                                            [rate_type] => percentage
                                            [state] => 
                                            [tax_type] => 
                                        )

                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 60
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1RjLphCDiOqgoJOU9LvwfAOU
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 2000
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1RjLofCDiOqgoJOUCe5KDXLD/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0004
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RjLqZCDiOqgoJOU0Bhclz9u
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752159077
    [period_start] => 1752159077
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => open
    [status_transitions] => Array
        (
            [finalized_at] => 1752159194
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 2000
    [subtotal_excluding_tax] => 2000
    [tax] => 60
    [test_clock] => 
    [total] => 2060
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 2000
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 60
                    [inclusive] => 
                    [tax_rate] => txr_1RjLphCDiOqgoJOU9LvwfAOU
                    [taxability_reason] => 
                    [taxable_amount] => 2000
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 60
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1RjLphCDiOqgoJOU9LvwfAOU
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 2000
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752159219
)

[10-Jul-2025 15:48:24 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 20
                                    [BalanceWithJobs] => 20
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 101
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-10T06:03:19-07:00
                                            [LastUpdatedTime] => 2025-07-10T07:30:09-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt
                                    [DisplayName] => testt
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098e066dfbe82b54d139d83565e5f664ced
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                )

                            [1] => Array
                                (
                                    [Taxable] => 1
                                    [BillAddr] => Array
                                        (
                                            [Id] => 141
                                        )

                                    [ShipAddr] => Array
                                        (
                                            [Id] => 141
                                        )

                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 99
                                    [SyncToken] => 1
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-10T01:36:59-07:00
                                            [LastUpdatedTime] => 2025-07-10T06:02:55-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testtqq
                                    [DisplayName] => testtqq
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020981d6681610c5f4203ac7c35187bf645d0
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                    [DefaultTaxCodeRef] => Array
                                        (
                                            [value] => 2
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 2
                )

            [time] => 2025-07-10T08:48:23.983-07:00
        )

)

[10-Jul-2025 15:48:24 UTC] Using QBO customer ID: 101
[10-Jul-2025 15:48:24 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 101
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 20
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 25
                                )

                            [UnitPrice] => 5
                            [Qty] => 4
                        )

                )

        )

    [TxnDate] => 2025-07-10
    [DueDate] => 2025-08-09
    [TotalAmt] => 20.6
    [PrivateNote] => Stripe Invoice ID: in_1RjLofCDiOqgoJOUCe5KDXLD
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
)

[10-Jul-2025 15:48:25 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 624
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-10T08:48:25-07:00
                            [LastModifiedByRef] => Array
                                (
                                    [value] => 123145870265994
                                )

                            [LastUpdatedTime] => 2025-07-10T08:48:25-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1229
                    [TxnDate] => 2025-07-10
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Invoice ID: in_1RjLofCDiOqgoJOUCe5KDXLD
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 20
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 25
                                                    [name] => product1
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 4
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 1
                                                    [name] => Services
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => NON
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 20
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 0
                        )

                    [CustomerRef] => Array
                        (
                            [value] => 101
                            [name] => testt
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 146
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [DueDate] => 2025-08-09
                    [TotalAmt] => 20
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 20
                )

            [time] => 2025-07-10T08:48:24.918-07:00
        )

)

[10-Jul-2025 15:48:25 UTC] Invoice created successfully in QBO. Invoice ID: 624
[10-Jul-2025 15:48:25 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[11-Jul-2025 06:20:15 UTC] Stripe Webhook Received: invoice.created (ID: evt_1RjLofCDiOqgoJOU5sob3Pxi)
[11-Jul-2025 06:20:15 UTC] PHP Parse error:  syntax error, unexpected token "&&" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 121
[11-Jul-2025 06:22:00 UTC] Stripe Webhook Received: invoice.created (ID: evt_1RjLofCDiOqgoJOU5sob3Pxi)
[11-Jul-2025 06:22:00 UTC] PHP Parse error:  syntax error, unexpected token "&&" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 121
[11-Jul-2025 06:24:04 UTC] Stripe Webhook Received: invoice.created (ID: evt_1RjLofCDiOqgoJOU5sob3Pxi)
[11-Jul-2025 06:24:04 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[11-Jul-2025 06:24:04 UTC] Starting invoice creation process for event: evt_1RjLofCDiOqgoJOU5sob3Pxi
[11-Jul-2025 06:24:04 UTC] Fetching Stripe invoice: in_1RjLofCDiOqgoJOUCe5KDXLD
[11-Jul-2025 06:24:04 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RjLofCDiOqgoJOUCe5KDXLD
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 2060
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 2060
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 1
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1752159077
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754751194
    [effective_at] => 1752159194
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZWY4UVVEcUtnV2JpZFJSa21SUzZTTzFxc3NBSThKLDE0Mjc1NTg0NA02007o83ke1d?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZWY4UVVEcUtnV2JpZFJSa21SUzZTTzFxc3NBSThKLDE0Mjc1NTg0NA02007o83ke1d/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RjLq6CDiOqgoJOUYvaxbzIv
                            [object] => line_item
                            [amount] => 2000
                            [amount_excluding_tax] => 2000
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RjLofCDiOqgoJOUCe5KDXLD
                            [invoice_item] => ii_1RjLq6CDiOqgoJOU88ZRurRe
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1RjLq6CDiOqgoJOU88ZRurRe
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752159166
                                    [start] => 1752159166
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 4
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 60
                                            [inclusive] => 
                                            [tax_rate] => txr_1RjLphCDiOqgoJOU9LvwfAOU
                                            [taxability_reason] => 
                                            [taxable_amount] => 2000
                                        )

                                )

                            [tax_rates] => Array
                                (
                                    [0] => Array
                                        (
                                            [id] => txr_1RjLphCDiOqgoJOU9LvwfAOU
                                            [object] => tax_rate
                                            [active] => 1
                                            [country] => US
                                            [created] => 1752159141
                                            [description] => 
                                            [display_name] => Sales tax
                                            [effective_percentage] => 3
                                            [flat_amount] => 
                                            [inclusive] => 
                                            [jurisdiction] => 
                                            [jurisdiction_level] => 
                                            [livemode] => 
                                            [metadata] => Array
                                                (
                                                )

                                            [percentage] => 3
                                            [rate_type] => percentage
                                            [state] => 
                                            [tax_type] => 
                                        )

                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 60
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1RjLphCDiOqgoJOU9LvwfAOU
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 2000
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1RjLofCDiOqgoJOUCe5KDXLD/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0004
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RjLqZCDiOqgoJOU0Bhclz9u
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752159077
    [period_start] => 1752159077
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => open
    [status_transitions] => Array
        (
            [finalized_at] => 1752159194
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 2000
    [subtotal_excluding_tax] => 2000
    [tax] => 60
    [test_clock] => 
    [total] => 2060
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 2000
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 60
                    [inclusive] => 
                    [tax_rate] => txr_1RjLphCDiOqgoJOU9LvwfAOU
                    [taxability_reason] => 
                    [taxable_amount] => 2000
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 60
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1RjLphCDiOqgoJOU9LvwfAOU
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 2000
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752159219
)

[11-Jul-2025 06:24:06 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 40
                                    [BalanceWithJobs] => 40
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 101
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-10T06:03:19-07:00
                                            [LastUpdatedTime] => 2025-07-10T08:48:25-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt
                                    [DisplayName] => testt
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098e066dfbe82b54d139d83565e5f664ced
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                )

                            [1] => Array
                                (
                                    [Taxable] => 1
                                    [BillAddr] => Array
                                        (
                                            [Id] => 141
                                        )

                                    [ShipAddr] => Array
                                        (
                                            [Id] => 141
                                        )

                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 99
                                    [SyncToken] => 1
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-10T01:36:59-07:00
                                            [LastUpdatedTime] => 2025-07-10T06:02:55-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testtqq
                                    [DisplayName] => testtqq
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020981d6681610c5f4203ac7c35187bf645d0
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                    [DefaultTaxCodeRef] => Array
                                        (
                                            [value] => 2
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 2
                )

            [time] => 2025-07-10T23:24:06.200-07:00
        )

)

[11-Jul-2025 06:24:06 UTC] Using QBO customer ID: 101
[11-Jul-2025 06:24:07 UTC] Failed to create tax rate: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Unsupported Operation
                                    [Detail] => Operation Update is not supported.
                                    [code] => 500
                                    [element] => Operation
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-10T23:24:07.249-07:00
        )

)

[11-Jul-2025 06:24:07 UTC] Failed to create tax rate: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Unsupported Operation
                                    [Detail] => Operation Update is not supported.
                                    [code] => 500
                                    [element] => Operation
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-10T23:24:07.766-07:00
        )

)

[11-Jul-2025 06:24:07 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 101
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 20
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 25
                                )

                            [UnitPrice] => 5
                            [Qty] => 4
                        )

                )

        )

    [TxnDate] => 2025-07-10
    [DueDate] => 2025-08-09
    [TotalAmt] => 20.6
    [PrivateNote] => Stripe Invoice ID: in_1RjLofCDiOqgoJOUCe5KDXLD
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
)

[11-Jul-2025 06:24:08 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 625
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-10T23:24:09-07:00
                            [LastModifiedByRef] => Array
                                (
                                    [value] => 123145870265994
                                )

                            [LastUpdatedTime] => 2025-07-10T23:24:09-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1230
                    [TxnDate] => 2025-07-10
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Invoice ID: in_1RjLofCDiOqgoJOUCe5KDXLD
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 20
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 25
                                                    [name] => product1
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 4
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 1
                                                    [name] => Services
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-99990202-V1-00020000
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 20
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 1.9
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0.15
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 20
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 1.25
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 20
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0.3
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 20
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0.2
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 20
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 101
                            [name] => testt
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 147
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [DueDate] => 2025-08-09
                    [TotalAmt] => 21.9
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 21.9
                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-10T23:24:08.110-07:00
        )

)

[11-Jul-2025 06:24:08 UTC] Invoice created successfully in QBO. Invoice ID: 625
[11-Jul-2025 06:24:08 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[11-Jul-2025 06:33:03 UTC] Stripe Webhook Received: invoice.created (ID: evt_1RjLofCDiOqgoJOU5sob3Pxi)
[11-Jul-2025 06:33:03 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[11-Jul-2025 06:33:03 UTC] Starting invoice creation process for event: evt_1RjLofCDiOqgoJOU5sob3Pxi
[11-Jul-2025 06:33:03 UTC] Fetching Stripe invoice: in_1RjLofCDiOqgoJOUCe5KDXLD
[11-Jul-2025 06:33:04 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RjLofCDiOqgoJOUCe5KDXLD
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 2060
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 2060
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 1
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1752159077
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754751194
    [effective_at] => 1752159194
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZWY4UVVEcUtnV2JpZFJSa21SUzZTTzFxc3NBSThKLDE0Mjc1NjM4Mw0200HLjJ2phq?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZWY4UVVEcUtnV2JpZFJSa21SUzZTTzFxc3NBSThKLDE0Mjc1NjM4Mw0200HLjJ2phq/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RjLq6CDiOqgoJOUYvaxbzIv
                            [object] => line_item
                            [amount] => 2000
                            [amount_excluding_tax] => 2000
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RjLofCDiOqgoJOUCe5KDXLD
                            [invoice_item] => ii_1RjLq6CDiOqgoJOU88ZRurRe
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1RjLq6CDiOqgoJOU88ZRurRe
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752159166
                                    [start] => 1752159166
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 4
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 60
                                            [inclusive] => 
                                            [tax_rate] => txr_1RjLphCDiOqgoJOU9LvwfAOU
                                            [taxability_reason] => 
                                            [taxable_amount] => 2000
                                        )

                                )

                            [tax_rates] => Array
                                (
                                    [0] => Array
                                        (
                                            [id] => txr_1RjLphCDiOqgoJOU9LvwfAOU
                                            [object] => tax_rate
                                            [active] => 1
                                            [country] => US
                                            [created] => 1752159141
                                            [description] => 
                                            [display_name] => Sales tax
                                            [effective_percentage] => 3
                                            [flat_amount] => 
                                            [inclusive] => 
                                            [jurisdiction] => 
                                            [jurisdiction_level] => 
                                            [livemode] => 
                                            [metadata] => Array
                                                (
                                                )

                                            [percentage] => 3
                                            [rate_type] => percentage
                                            [state] => 
                                            [tax_type] => 
                                        )

                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 60
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1RjLphCDiOqgoJOU9LvwfAOU
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 2000
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1RjLofCDiOqgoJOUCe5KDXLD/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0004
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RjLqZCDiOqgoJOU0Bhclz9u
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752159077
    [period_start] => 1752159077
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => open
    [status_transitions] => Array
        (
            [finalized_at] => 1752159194
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 2000
    [subtotal_excluding_tax] => 2000
    [tax] => 60
    [test_clock] => 
    [total] => 2060
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 2000
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 60
                    [inclusive] => 
                    [tax_rate] => txr_1RjLphCDiOqgoJOU9LvwfAOU
                    [taxability_reason] => 
                    [taxable_amount] => 2000
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 60
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1RjLphCDiOqgoJOU9LvwfAOU
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 2000
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752159219
)

[11-Jul-2025 06:33:05 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 20
                                    [BalanceWithJobs] => 20
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 101
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-10T06:03:19-07:00
                                            [LastUpdatedTime] => 2025-07-10T23:32:01-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt
                                    [DisplayName] => testt
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098e066dfbe82b54d139d83565e5f664ced
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                )

                            [1] => Array
                                (
                                    [Taxable] => 1
                                    [BillAddr] => Array
                                        (
                                            [Id] => 141
                                        )

                                    [ShipAddr] => Array
                                        (
                                            [Id] => 141
                                        )

                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 99
                                    [SyncToken] => 1
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-10T01:36:59-07:00
                                            [LastUpdatedTime] => 2025-07-10T06:02:55-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testtqq
                                    [DisplayName] => testtqq
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020981d6681610c5f4203ac7c35187bf645d0
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                    [DefaultTaxCodeRef] => Array
                                        (
                                            [value] => 2
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 2
                )

            [time] => 2025-07-10T23:33:05.013-07:00
        )

)

[11-Jul-2025 06:33:05 UTC] Using QBO customer ID: 101
[11-Jul-2025 06:33:06 UTC] Failed to create tax rate: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Unsupported Operation
                                    [Detail] => Operation Create is not supported.
                                    [code] => 500
                                    [element] => Operation
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-10T23:33:06.001-07:00
        )

)

[11-Jul-2025 06:33:06 UTC] Failed to create tax rate: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Unsupported Operation
                                    [Detail] => Operation Create is not supported.
                                    [code] => 500
                                    [element] => Operation
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-10T23:33:06.514-07:00
        )

)

[11-Jul-2025 06:33:06 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 101
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 20
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 25
                                )

                            [UnitPrice] => 5
                            [Qty] => 4
                        )

                )

        )

    [TxnDate] => 2025-07-10
    [DueDate] => 2025-08-09
    [TotalAmt] => 20.6
    [PrivateNote] => Stripe Invoice ID: in_1RjLofCDiOqgoJOUCe5KDXLD
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
)

[11-Jul-2025 06:33:07 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 626
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-10T23:33:07-07:00
                            [LastModifiedByRef] => Array
                                (
                                    [value] => 123145870265994
                                )

                            [LastUpdatedTime] => 2025-07-10T23:33:07-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1231
                    [TxnDate] => 2025-07-10
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Invoice ID: in_1RjLofCDiOqgoJOUCe5KDXLD
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 20
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 25
                                                    [name] => product1
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 4
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 1
                                                    [name] => Services
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-99990202-V1-00020000
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 20
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 1.9
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0.15
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 20
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 1.25
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 20
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0.3
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 20
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0.2
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 20
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 101
                            [name] => testt
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 148
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [DueDate] => 2025-08-09
                    [TotalAmt] => 21.9
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 21.9
                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-10T23:33:06.810-07:00
        )

)

[11-Jul-2025 06:33:07 UTC] Invoice created successfully in QBO. Invoice ID: 626
[11-Jul-2025 06:33:07 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[11-Jul-2025 06:58:26 UTC] Stripe Webhook Received: invoice.created (ID: evt_1RjLofCDiOqgoJOU5sob3Pxi)
[11-Jul-2025 06:58:26 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[11-Jul-2025 06:58:26 UTC] Starting invoice creation process for event: evt_1RjLofCDiOqgoJOU5sob3Pxi
[11-Jul-2025 06:58:26 UTC] Fetching Stripe invoice: in_1RjLofCDiOqgoJOUCe5KDXLD
[11-Jul-2025 06:58:27 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RjLofCDiOqgoJOUCe5KDXLD
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 2060
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 2060
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 1
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1752159077
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754751194
    [effective_at] => 1752159194
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZWY4UVVEcUtnV2JpZFJSa21SUzZTTzFxc3NBSThKLDE0Mjc1NzkwNg0200y8ZqdPUi?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZWY4UVVEcUtnV2JpZFJSa21SUzZTTzFxc3NBSThKLDE0Mjc1NzkwNg0200y8ZqdPUi/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RjLq6CDiOqgoJOUYvaxbzIv
                            [object] => line_item
                            [amount] => 2000
                            [amount_excluding_tax] => 2000
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RjLofCDiOqgoJOUCe5KDXLD
                            [invoice_item] => ii_1RjLq6CDiOqgoJOU88ZRurRe
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1RjLq6CDiOqgoJOU88ZRurRe
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752159166
                                    [start] => 1752159166
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 4
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 60
                                            [inclusive] => 
                                            [tax_rate] => txr_1RjLphCDiOqgoJOU9LvwfAOU
                                            [taxability_reason] => 
                                            [taxable_amount] => 2000
                                        )

                                )

                            [tax_rates] => Array
                                (
                                    [0] => Array
                                        (
                                            [id] => txr_1RjLphCDiOqgoJOU9LvwfAOU
                                            [object] => tax_rate
                                            [active] => 1
                                            [country] => US
                                            [created] => 1752159141
                                            [description] => 
                                            [display_name] => Sales tax
                                            [effective_percentage] => 3
                                            [flat_amount] => 
                                            [inclusive] => 
                                            [jurisdiction] => 
                                            [jurisdiction_level] => 
                                            [livemode] => 
                                            [metadata] => Array
                                                (
                                                )

                                            [percentage] => 3
                                            [rate_type] => percentage
                                            [state] => 
                                            [tax_type] => 
                                        )

                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 60
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1RjLphCDiOqgoJOU9LvwfAOU
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 2000
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1RjLofCDiOqgoJOUCe5KDXLD/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0004
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RjLqZCDiOqgoJOU0Bhclz9u
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752159077
    [period_start] => 1752159077
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => open
    [status_transitions] => Array
        (
            [finalized_at] => 1752159194
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 2000
    [subtotal_excluding_tax] => 2000
    [tax] => 60
    [test_clock] => 
    [total] => 2060
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 2000
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 60
                    [inclusive] => 
                    [tax_rate] => txr_1RjLphCDiOqgoJOU9LvwfAOU
                    [taxability_reason] => 
                    [taxable_amount] => 2000
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 60
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1RjLphCDiOqgoJOU9LvwfAOU
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 2000
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752159219
)

[11-Jul-2025 06:58:28 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 41.9
                                    [BalanceWithJobs] => 41.9
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 101
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-10T06:03:19-07:00
                                            [LastUpdatedTime] => 2025-07-10T23:33:08-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt
                                    [DisplayName] => testt
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098e066dfbe82b54d139d83565e5f664ced
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                )

                            [1] => Array
                                (
                                    [Taxable] => 1
                                    [BillAddr] => Array
                                        (
                                            [Id] => 141
                                        )

                                    [ShipAddr] => Array
                                        (
                                            [Id] => 141
                                        )

                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 99
                                    [SyncToken] => 1
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-10T01:36:59-07:00
                                            [LastUpdatedTime] => 2025-07-10T06:02:55-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testtqq
                                    [DisplayName] => testtqq
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020981d6681610c5f4203ac7c35187bf645d0
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                    [DefaultTaxCodeRef] => Array
                                        (
                                            [value] => 2
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 2
                )

            [time] => 2025-07-10T23:58:28.225-07:00
        )

)

[11-Jul-2025 06:58:28 UTC] Using QBO customer ID: 101
[11-Jul-2025 06:58:29 UTC] Failed to create tax rate: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Unsupported Operation
                                    [Detail] => Operation Create is not supported.
                                    [code] => 500
                                    [element] => Operation
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-10T23:58:29.459-07:00
        )

)

[11-Jul-2025 06:58:29 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 101
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 20.6
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 25
                                )

                            [UnitPrice] => 5
                            [Qty] => 4
                            [TaxInclusiveAmt] => 20.6
                        )

                )

        )

    [TxnDate] => 2025-07-10
    [DueDate] => 2025-08-09
    [TotalAmt] => 20.6
    [PrivateNote] => Stripe Invoice ID: in_1RjLofCDiOqgoJOUCe5KDXLD
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 0.6
        )

)

[11-Jul-2025 06:58:29 UTC] QBO API response: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Amount calculation incorrect in the request.
                                    [Detail] => Amount is not equal to UnitPrice * Qty. Supplied value:20.6
                                    [code] => 6070
                                    [element] => Line.Amount
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-10T23:58:29.775-07:00
        )

)

[11-Jul-2025 06:58:29 UTC] Invoice creation failed: Failed to create invoice in QuickBooks
[11-Jul-2025 06:58:29 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[11-Jul-2025 07:03:59 UTC] Stripe Webhook Received: invoice.created (ID: evt_1RjLofCDiOqgoJOU5sob3Pxi)
[11-Jul-2025 07:03:59 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[11-Jul-2025 07:03:59 UTC] Starting invoice creation process for event: evt_1RjLofCDiOqgoJOU5sob3Pxi
[11-Jul-2025 07:03:59 UTC] Fetching Stripe invoice: in_1RjLofCDiOqgoJOUCe5KDXLD
[11-Jul-2025 07:03:59 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RjLofCDiOqgoJOUCe5KDXLD
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 2060
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 2060
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 1
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1752159077
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754751194
    [effective_at] => 1752159194
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZWY4UVVEcUtnV2JpZFJSa21SUzZTTzFxc3NBSThKLDE0Mjc1ODIzOQ0200EVwbXbLf?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZWY4UVVEcUtnV2JpZFJSa21SUzZTTzFxc3NBSThKLDE0Mjc1ODIzOQ0200EVwbXbLf/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RjLq6CDiOqgoJOUYvaxbzIv
                            [object] => line_item
                            [amount] => 2000
                            [amount_excluding_tax] => 2000
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RjLofCDiOqgoJOUCe5KDXLD
                            [invoice_item] => ii_1RjLq6CDiOqgoJOU88ZRurRe
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1RjLq6CDiOqgoJOU88ZRurRe
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752159166
                                    [start] => 1752159166
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 4
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 60
                                            [inclusive] => 
                                            [tax_rate] => txr_1RjLphCDiOqgoJOU9LvwfAOU
                                            [taxability_reason] => 
                                            [taxable_amount] => 2000
                                        )

                                )

                            [tax_rates] => Array
                                (
                                    [0] => Array
                                        (
                                            [id] => txr_1RjLphCDiOqgoJOU9LvwfAOU
                                            [object] => tax_rate
                                            [active] => 1
                                            [country] => US
                                            [created] => 1752159141
                                            [description] => 
                                            [display_name] => Sales tax
                                            [effective_percentage] => 3
                                            [flat_amount] => 
                                            [inclusive] => 
                                            [jurisdiction] => 
                                            [jurisdiction_level] => 
                                            [livemode] => 
                                            [metadata] => Array
                                                (
                                                )

                                            [percentage] => 3
                                            [rate_type] => percentage
                                            [state] => 
                                            [tax_type] => 
                                        )

                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 60
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1RjLphCDiOqgoJOU9LvwfAOU
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 2000
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1RjLofCDiOqgoJOUCe5KDXLD/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0004
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RjLqZCDiOqgoJOU0Bhclz9u
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752159077
    [period_start] => 1752159077
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => open
    [status_transitions] => Array
        (
            [finalized_at] => 1752159194
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 2000
    [subtotal_excluding_tax] => 2000
    [tax] => 60
    [test_clock] => 
    [total] => 2060
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 2000
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 60
                    [inclusive] => 
                    [tax_rate] => txr_1RjLphCDiOqgoJOU9LvwfAOU
                    [taxability_reason] => 
                    [taxable_amount] => 2000
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 60
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1RjLphCDiOqgoJOU9LvwfAOU
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 2000
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752159219
)

[11-Jul-2025 07:04:00 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 41.9
                                    [BalanceWithJobs] => 41.9
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 101
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-10T06:03:19-07:00
                                            [LastUpdatedTime] => 2025-07-10T23:33:08-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt
                                    [DisplayName] => testt
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098e066dfbe82b54d139d83565e5f664ced
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                )

                            [1] => Array
                                (
                                    [Taxable] => 1
                                    [BillAddr] => Array
                                        (
                                            [Id] => 141
                                        )

                                    [ShipAddr] => Array
                                        (
                                            [Id] => 141
                                        )

                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 99
                                    [SyncToken] => 1
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-10T01:36:59-07:00
                                            [LastUpdatedTime] => 2025-07-10T06:02:55-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testtqq
                                    [DisplayName] => testtqq
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020981d6681610c5f4203ac7c35187bf645d0
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                    [DefaultTaxCodeRef] => Array
                                        (
                                            [value] => 2
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 2
                )

            [time] => 2025-07-11T00:04:00.689-07:00
        )

)

[11-Jul-2025 07:04:00 UTC] Using QBO customer ID: 101
[11-Jul-2025 07:04:01 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 101
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 20
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 25
                                )

                            [UnitPrice] => 5
                            [Qty] => 4
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-10
    [DueDate] => 2025-08-09
    [TotalAmt] => 20.6
    [PrivateNote] => Stripe Invoice ID: in_1RjLofCDiOqgoJOUCe5KDXLD
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 0.6
        )

)

[11-Jul-2025 07:04:02 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 627
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-11T00:04:02-07:00
                            [LastModifiedByRef] => Array
                                (
                                    [value] => 123145870265994
                                )

                            [LastUpdatedTime] => 2025-07-11T00:04:02-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1232
                    [TxnDate] => 2025-07-10
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Invoice ID: in_1RjLofCDiOqgoJOUCe5KDXLD
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 20
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 25
                                                    [name] => product1
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 4
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 1
                                                    [name] => Services
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-99990202-V1-00020000
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 20
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 0.6
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0.05
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 20
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0.39
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 20
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0.1
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 20
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0.06
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 20
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 101
                            [name] => testt
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 149
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [DueDate] => 2025-08-09
                    [TotalAmt] => 20.6
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 20.6
                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-11T00:04:01.618-07:00
        )

)

[11-Jul-2025 07:04:02 UTC] Invoice created successfully in QBO. Invoice ID: 627
[11-Jul-2025 07:04:02 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[11-Jul-2025 07:07:07 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[11-Jul-2025 07:07:07 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[11-Jul-2025 07:07:07 UTC] Starting invoice creation process for event: evt_1Rjb31CDiOqgoJOUTLKYK87p
[11-Jul-2025 07:07:07 UTC] Fetching Stripe invoice: in_1Rjb30CDiOqgoJOUBodxSTyg
[11-Jul-2025 07:07:08 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjb30CDiOqgoJOUBodxSTyg
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 0
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 0
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1752217626
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 
    [effective_at] => 
    [ending_balance] => 
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => 
    [invoice_pdf] => 
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                )

            [has_more] => 
            [total_count] => 0
            [url] => /v1/invoices/in_1Rjb30CDiOqgoJOUBodxSTyg/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => 
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => 
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => auto
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => draft
    [status_transitions] => Array
        (
            [finalized_at] => 
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 0
    [subtotal_excluding_tax] => 0
    [tax] => 
    [test_clock] => 
    [total] => 0
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 0
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
        )

    [total_taxes] => Array
        (
        )

    [transfer_data] => 
    [webhooks_delivered_at] => 
)

[11-Jul-2025 07:07:08 UTC] Invoice creation failed: No line items in the invoice, nothing to process.
[11-Jul-2025 07:07:08 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php:167
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(42): process_stripe_invoice_created_to_qbo_invoice()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 167
[11-Jul-2025 07:10:24 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[11-Jul-2025 07:10:24 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[11-Jul-2025 07:10:24 UTC] Starting invoice creation process for event: evt_1Rjb31CDiOqgoJOUTLKYK87p
[11-Jul-2025 07:10:24 UTC] Fetching Stripe invoice: in_1Rjb30CDiOqgoJOUBodxSTyg
[11-Jul-2025 07:10:24 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjb30CDiOqgoJOUBodxSTyg
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 18315
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 1
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1752217626
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754809716
    [effective_at] => 1752217716
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0Mjc1ODYyNA0200qKj7biV6?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0Mjc1ODYyNA0200qKj7biV6/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjb3UCDiOqgoJOUlOS6H3SV
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjb30CDiOqgoJOUBodxSTyg/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0005
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3Rjb4TCDiOqgoJOU1nmHyolq
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => open
    [status_transitions] => Array
        (
            [finalized_at] => 1752217716
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752217628
)

[11-Jul-2025 07:10:25 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 62.5
                                    [BalanceWithJobs] => 62.5
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 101
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-10T06:03:19-07:00
                                            [LastUpdatedTime] => 2025-07-11T00:04:02-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt
                                    [DisplayName] => testt
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098e066dfbe82b54d139d83565e5f664ced
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                )

                            [1] => Array
                                (
                                    [Taxable] => 1
                                    [BillAddr] => Array
                                        (
                                            [Id] => 141
                                        )

                                    [ShipAddr] => Array
                                        (
                                            [Id] => 141
                                        )

                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 99
                                    [SyncToken] => 1
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-10T01:36:59-07:00
                                            [LastUpdatedTime] => 2025-07-10T06:02:55-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testtqq
                                    [DisplayName] => testtqq
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020981d6681610c5f4203ac7c35187bf645d0
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                    [DefaultTaxCodeRef] => Array
                                        (
                                            [value] => 2
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 2
                )

            [time] => 2025-07-11T00:10:25.522-07:00
        )

)

[11-Jul-2025 07:10:25 UTC] Using QBO customer ID: 101
[11-Jul-2025 07:10:26 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 101
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 165
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 25
                                )

                            [UnitPrice] => 5
                            [Qty] => 33
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-11
    [DueDate] => 2025-08-10
    [TotalAmt] => 183.15
    [PrivateNote] => Stripe Invoice ID: in_1Rjb30CDiOqgoJOUBodxSTyg
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 18.15
        )

)

[11-Jul-2025 07:10:27 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 628
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-11T00:10:27-07:00
                            [LastModifiedByRef] => Array
                                (
                                    [value] => 123145870265994
                                )

                            [LastUpdatedTime] => 2025-07-11T00:10:27-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1233
                    [TxnDate] => 2025-07-11
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Invoice ID: in_1Rjb30CDiOqgoJOUBodxSTyg
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 165
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 25
                                                    [name] => product1
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 33
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 1
                                                    [name] => Services
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-99990202-V1-00020000
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 165
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 18.15
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 1.44
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 165
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 11.93
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 165
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 2.87
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 165
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 1.91
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 165
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 101
                            [name] => testt
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 150
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [DueDate] => 2025-08-10
                    [TotalAmt] => 183.15
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 183.15
                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-11T00:10:26.312-07:00
        )

)

[11-Jul-2025 07:10:27 UTC] Invoice created successfully in QBO. Invoice ID: 628
[11-Jul-2025 07:10:27 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[11-Jul-2025 17:20:45 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1RjkcqCDiOqgoJOU6bFarlzm)
[11-Jul-2025 17:20:45 UTC] PHP Fatal error:  Cannot redeclare get_stripe_customer() (previously declared in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php:79) in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-paid-to-qbo-payment.php on line 103
[11-Jul-2025 18:00:06 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1RjkcqCDiOqgoJOU6bFarlzm)
[11-Jul-2025 18:00:06 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[11-Jul-2025 18:00:06 UTC] Starting payment process for Stripe invoice: evt_1RjkcqCDiOqgoJOU6bFarlzm
[11-Jul-2025 18:00:06 UTC] Fetching Stripe invoice: in_1Rjka2CDiOqgoJOUHTKqZegC
[11-Jul-2025 18:00:06 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 18315
    [amount_remaining] => 0
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 1
    [attempted] => 1
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => ch_3RjkcnCDiOqgoJOU0KxD8HfP
    [collection_method] => send_invoice
    [created] => 1752254270
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754846441
    [effective_at] => 1752254441
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => Array
        (
            [action] => revision
            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
        )

    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZjRqdXJFRTN1cUFKRXEzUXRFc1BFakJlSDRMUlQ0LDE0Mjc5NzYwNg0200LZ3lIEFP?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZjRqdXJFRTN1cUFKRXEzUXRFc1BFakJlSDRMUlQ0LDE0Mjc5NzYwNg0200LZ3lIEFP/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjka2CDiOqgoJOUb2xoQRXy
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjka2CDiOqgoJOUHTKqZegC
                            [invoice_item] => ii_1Rjka2CDiOqgoJOU4AZwXlnQ
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjka2CDiOqgoJOU4AZwXlnQ
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjka2CDiOqgoJOUHTKqZegC/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0006
    [on_behalf_of] => 
    [paid] => 1
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RjkcnCDiOqgoJOU04KzaIsc
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => 
            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => paid
    [status_transitions] => Array
        (
            [finalized_at] => 1752254441
            [marked_uncollectible_at] => 
            [paid_at] => 1752254441
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752254270
)

[11-Jul-2025 18:00:06 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function find_or_create_qbo_customer() in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-paid-to-qbo-payment.php:56
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(35): process_stripe_invoice_paid_to_qbo_payment()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-paid-to-qbo-payment.php on line 56
[11-Jul-2025 18:04:36 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1RjkcqCDiOqgoJOU6bFarlzm)
[11-Jul-2025 18:04:36 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[11-Jul-2025 18:04:36 UTC] Starting payment process for Stripe invoice: evt_1RjkcqCDiOqgoJOU6bFarlzm
[11-Jul-2025 18:04:36 UTC] Fetching Stripe invoice: in_1Rjka2CDiOqgoJOUHTKqZegC
[11-Jul-2025 18:04:37 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 18315
    [amount_remaining] => 0
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 1
    [attempted] => 1
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => ch_3RjkcnCDiOqgoJOU0KxD8HfP
    [collection_method] => send_invoice
    [created] => 1752254270
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754846441
    [effective_at] => 1752254441
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => Array
        (
            [action] => revision
            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
        )

    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZjRqdXJFRTN1cUFKRXEzUXRFc1BFakJlSDRMUlQ0LDE0Mjc5Nzg3Nw0200xGjzf6Xb?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZjRqdXJFRTN1cUFKRXEzUXRFc1BFakJlSDRMUlQ0LDE0Mjc5Nzg3Nw0200xGjzf6Xb/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjka2CDiOqgoJOUb2xoQRXy
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjka2CDiOqgoJOUHTKqZegC
                            [invoice_item] => ii_1Rjka2CDiOqgoJOU4AZwXlnQ
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjka2CDiOqgoJOU4AZwXlnQ
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjka2CDiOqgoJOUHTKqZegC/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0006
    [on_behalf_of] => 
    [paid] => 1
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RjkcnCDiOqgoJOU04KzaIsc
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => 
            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => paid
    [status_transitions] => Array
        (
            [finalized_at] => 1752254441
            [marked_uncollectible_at] => 
            [paid_at] => 1752254441
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752254270
)

[11-Jul-2025 18:04:37 UTC] Payment creation failed: Table 'wdsklsxvqb_stripe_qbo_integration.customer_mappings' doesn't exist
[11-Jul-2025 18:04:37 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-paid-to-qbo-payment.php:144
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(35): process_stripe_invoice_paid_to_qbo_payment()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-paid-to-qbo-payment.php on line 144
[12-Jul-2025 06:14:28 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1RjkcqCDiOqgoJOU6bFarlzm)
[12-Jul-2025 06:14:28 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[12-Jul-2025 06:14:28 UTC] Starting payment process for Stripe invoice: evt_1RjkcqCDiOqgoJOU6bFarlzm
[12-Jul-2025 06:14:28 UTC] Fetching Stripe invoice: in_1Rjka2CDiOqgoJOUHTKqZegC
[12-Jul-2025 06:14:28 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 18315
    [amount_remaining] => 0
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 1
    [attempted] => 1
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => ch_3RjkcnCDiOqgoJOU0KxD8HfP
    [collection_method] => send_invoice
    [created] => 1752254270
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754846441
    [effective_at] => 1752254441
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => Array
        (
            [action] => revision
            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
        )

    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZjRqdXJFRTN1cUFKRXEzUXRFc1BFakJlSDRMUlQ0LDE0Mjg0MTY2OA02008p853U9i?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZjRqdXJFRTN1cUFKRXEzUXRFc1BFakJlSDRMUlQ0LDE0Mjg0MTY2OA02008p853U9i/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjka2CDiOqgoJOUb2xoQRXy
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjka2CDiOqgoJOUHTKqZegC
                            [invoice_item] => ii_1Rjka2CDiOqgoJOU4AZwXlnQ
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjka2CDiOqgoJOU4AZwXlnQ
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjka2CDiOqgoJOUHTKqZegC/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0006
    [on_behalf_of] => 
    [paid] => 1
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RjkcnCDiOqgoJOU04KzaIsc
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => 
            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => paid
    [status_transitions] => Array
        (
            [finalized_at] => 1752254441
            [marked_uncollectible_at] => 
            [paid_at] => 1752254441
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752254270
)

[12-Jul-2025 06:14:30 UTC] Found QBO customer ID: 101
[12-Jul-2025 06:14:30 UTC] Payment creation failed: No matching QuickBooks invoice found for Stripe invoice: in_1Rjka2CDiOqgoJOUHTKqZegC
[12-Jul-2025 06:14:30 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-paid-to-qbo-payment.php:144
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(35): process_stripe_invoice_paid_to_qbo_payment()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-paid-to-qbo-payment.php on line 144
[12-Jul-2025 06:53:13 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1RjkcqCDiOqgoJOU6bFarlzm)
[12-Jul-2025 06:53:13 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[12-Jul-2025 06:53:13 UTC] Starting payment process for Stripe invoice: evt_1RjkcqCDiOqgoJOU6bFarlzm
[12-Jul-2025 06:53:13 UTC] Fetching Stripe invoice: in_1Rjka2CDiOqgoJOUHTKqZegC
[12-Jul-2025 06:53:14 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 18315
    [amount_remaining] => 0
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 1
    [attempted] => 1
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => ch_3RjkcnCDiOqgoJOU0KxD8HfP
    [collection_method] => send_invoice
    [created] => 1752254270
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754846441
    [effective_at] => 1752254441
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => Array
        (
            [action] => revision
            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
        )

    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZjRqdXJFRTN1cUFKRXEzUXRFc1BFakJlSDRMUlQ0LDE0Mjg0Mzk5NA0200rk4EvHyv?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZjRqdXJFRTN1cUFKRXEzUXRFc1BFakJlSDRMUlQ0LDE0Mjg0Mzk5NA0200rk4EvHyv/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjka2CDiOqgoJOUb2xoQRXy
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjka2CDiOqgoJOUHTKqZegC
                            [invoice_item] => ii_1Rjka2CDiOqgoJOU4AZwXlnQ
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjka2CDiOqgoJOU4AZwXlnQ
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjka2CDiOqgoJOUHTKqZegC/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0006
    [on_behalf_of] => 
    [paid] => 1
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RjkcnCDiOqgoJOU04KzaIsc
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => 
            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => paid
    [status_transitions] => Array
        (
            [finalized_at] => 1752254441
            [marked_uncollectible_at] => 
            [paid_at] => 1752254441
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752254270
)

[12-Jul-2025 06:53:15 UTC] Using QBO customer ID: 101
[12-Jul-2025 06:53:15 UTC] No existing QBO invoice found, creating new one
[12-Jul-2025 06:53:16 UTC] Creating new QBO invoice with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 101
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 165
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 25
                                )

                            [UnitPrice] => 5
                            [Qty] => 33
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-11
    [DueDate] => 2025-08-10
    [TotalAmt] => 183.15
    [PrivateNote] => Stripe Invoice ID: in_1Rjka2CDiOqgoJOUHTKqZegC
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 18.15
        )

)

[12-Jul-2025 06:53:17 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 629
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-11T23:53:17-07:00
                            [LastModifiedByRef] => Array
                                (
                                    [value] => 123145870265994
                                )

                            [LastUpdatedTime] => 2025-07-11T23:53:17-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1234
                    [TxnDate] => 2025-07-11
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Invoice ID: in_1Rjka2CDiOqgoJOUHTKqZegC
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 165
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 25
                                                    [name] => product1
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 33
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 1
                                                    [name] => Services
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-99990202-V1-00020000
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 165
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 18.15
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 1.44
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 165
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 11.93
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 165
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 2.87
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 165
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 1.91
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 165
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 101
                            [name] => testt
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 151
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [DueDate] => 2025-08-10
                    [TotalAmt] => 183.15
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 183.15
                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-11T23:53:16.523-07:00
        )

)

[12-Jul-2025 06:53:17 UTC] Created new QBO invoice ID: 629
[12-Jul-2025 06:53:19 UTC] Failed to create payment method: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Invalid Enumeration
                                    [Detail] => Invalid Enumeration : OTHER
                                    [code] => 2170
                                    [element] => Type
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-11T23:53:19.067-07:00
        )

)

[12-Jul-2025 06:53:19 UTC] Creating QBO payment with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 101
        )

    [TotalAmt] => 183.15
    [TxnDate] => 2025-07-11
    [PaymentRefNum] => pi_3RjkcnCDiOqgoJOU04KzaIsc
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

    [PrivateNote] => Stripe Invoice ID: in_1Rjka2CDiOqgoJOUHTKqZegC
    [Line] => Array
        (
            [0] => Array
                (
                    [Amount] => 183.15
                    [LinkedTxn] => Array
                        (
                            [0] => Array
                                (
                                    [TxnId] => 629
                                    [TxnType] => Invoice
                                )

                        )

                )

        )

)

[12-Jul-2025 06:53:20 UTC] QBO API response: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => A business validation error has occurred while processing your request
                                    [Detail] => Business Validation Error: You cannot enter more than 21 characters in the doc_num field. You tried entering pi_3RjkcnC..., which is 27 characters.
                                    [code] => 6000
                                    [element] => 
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-11T23:53:19.944-07:00
        )

)

[12-Jul-2025 06:53:20 UTC] Payment creation failed: Failed to create payment in QuickBooks
[12-Jul-2025 06:53:20 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[12-Jul-2025 07:02:51 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1RjkcqCDiOqgoJOU6bFarlzm)
[12-Jul-2025 07:02:51 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[12-Jul-2025 07:02:51 UTC] Starting payment process for Stripe invoice: evt_1RjkcqCDiOqgoJOU6bFarlzm
[12-Jul-2025 07:02:51 UTC] Fetching Stripe invoice: in_1Rjka2CDiOqgoJOUHTKqZegC
[12-Jul-2025 07:02:51 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 18315
    [amount_remaining] => 0
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 1
    [attempted] => 1
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => ch_3RjkcnCDiOqgoJOU0KxD8HfP
    [collection_method] => send_invoice
    [created] => 1752254270
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754846441
    [effective_at] => 1752254441
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => Array
        (
            [action] => revision
            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
        )

    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZjRqdXJFRTN1cUFKRXEzUXRFc1BFakJlSDRMUlQ0LDE0Mjg0NDU3MQ02003pX4plEC?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZjRqdXJFRTN1cUFKRXEzUXRFc1BFakJlSDRMUlQ0LDE0Mjg0NDU3MQ02003pX4plEC/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjka2CDiOqgoJOUb2xoQRXy
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjka2CDiOqgoJOUHTKqZegC
                            [invoice_item] => ii_1Rjka2CDiOqgoJOU4AZwXlnQ
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjka2CDiOqgoJOU4AZwXlnQ
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjka2CDiOqgoJOUHTKqZegC/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0006
    [on_behalf_of] => 
    [paid] => 1
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RjkcnCDiOqgoJOU04KzaIsc
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => 
            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => paid
    [status_transitions] => Array
        (
            [finalized_at] => 1752254441
            [marked_uncollectible_at] => 
            [paid_at] => 1752254441
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752254270
)

[12-Jul-2025 07:02:52 UTC] Using QBO customer ID: 101
[12-Jul-2025 07:02:52 UTC] Found existing QBO invoice ID: 629
[12-Jul-2025 07:02:53 UTC] Failed to create payment method: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Invalid Enumeration
                                    [Detail] => Invalid Enumeration : OTHER
                                    [code] => 2170
                                    [element] => Type
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-12T00:02:53.723-07:00
        )

)

[12-Jul-2025 07:02:54 UTC] Creating QBO payment with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 101
        )

    [TotalAmt] => 183.15
    [TxnDate] => 2025-07-11
    [PaymentRefNum] => pi_3RjkcnCDiOqgoJOU04
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

    [PrivateNote] => Stripe Invoice ID: in_1Rjka2CDiOqgoJOUHTKqZegC
    [Line] => Array
        (
            [0] => Array
                (
                    [Amount] => 183.15
                    [LinkedTxn] => Array
                        (
                            [0] => Array
                                (
                                    [TxnId] => 629
                                    [TxnType] => Invoice
                                )

                        )

                )

        )

)

[12-Jul-2025 07:02:55 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Payment] => Array
                (
                    [CustomerRef] => Array
                        (
                            [value] => 101
                            [name] => testt
                        )

                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                        )

                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                        )

                    [PaymentRefNum] => pi_3RjkcnCDiOqgoJOU04
                    [TotalAmt] => 183.15
                    [UnappliedAmt] => 0
                    [ProcessPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 630
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-12T00:02:55-07:00
                            [LastUpdatedTime] => 2025-07-12T00:02:55-07:00
                        )

                    [TxnDate] => 2025-07-11
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Invoice ID: in_1Rjka2CDiOqgoJOUHTKqZegC
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Amount] => 183.15
                                    [LinkedTxn] => Array
                                        (
                                            [0] => Array
                                                (
                                                    [TxnId] => 629
                                                    [TxnType] => Invoice
                                                )

                                        )

                                    [LineEx] => Array
                                        (
                                            [any] => Array
                                                (
                                                    [0] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnId
                                                                    [Value] => 629
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                    [1] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnOpenBalance
                                                                    [Value] => 183.15
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                    [2] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnReferenceNumber
                                                                    [Value] => 1234
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                )

                                        )

                                )

                        )

                )

            [time] => 2025-07-12T00:02:54.593-07:00
        )

)

[12-Jul-2025 07:02:55 UTC] Payment created successfully in QBO. Payment ID: 630
[12-Jul-2025 07:02:55 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[12-Jul-2025 09:57:24 UTC] PHP Warning:  Undefined array key "stripe_payment_intent_succeeded_to_qbo_sales_receipt" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 136
[12-Jul-2025 09:57:24 UTC] PHP Warning:  Undefined array key "stripe_charge_succeeded_to_qbo_payment" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 150
[12-Jul-2025 09:57:24 UTC] PHP Warning:  Undefined array key "stripe_charge_failed_to_qbo_note" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 164
[12-Jul-2025 09:57:24 UTC] PHP Warning:  Undefined array key "stripe_refund_created_to_qbo_refund_receipt" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 178
[12-Jul-2025 09:57:24 UTC] PHP Warning:  Undefined array key "stripe_credit_note_created_to_qbo_credit_memo" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 192
[12-Jul-2025 09:57:24 UTC] PHP Warning:  Undefined array key "stripe_product_created_to_qbo_item" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 206
[12-Jul-2025 09:57:24 UTC] PHP Warning:  Undefined array key "stripe_quote_accepted_to_qbo_sales_order" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 220
[12-Jul-2025 16:20:48 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rk6AMCDiOqgoJOU0T9j6tmH)
[12-Jul-2025 16:20:48 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[12-Jul-2025 16:40:22 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rk6AMCDiOqgoJOU0T9j6tmH)
[12-Jul-2025 16:40:22 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[12-Jul-2025 17:19:59 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rk6AMCDiOqgoJOU0T9j6tmH)
[12-Jul-2025 17:19:59 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[12-Jul-2025 17:19:59 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function find_or_create_qbo_customer() in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:56
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(50): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 56
[12-Jul-2025 17:52:13 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rk6AMCDiOqgoJOU0T9j6tmH)
[12-Jul-2025 17:52:13 UTC] PHP Fatal error:  Cannot redeclare make_qbo_api_request() (previously declared in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php:314) in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 234
[12-Jul-2025 17:54:11 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rk6AMCDiOqgoJOU0T9j6tmH)
[12-Jul-2025 17:54:11 UTC] PHP Fatal error:  Cannot redeclare log_sync_history() (previously declared in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php:370) in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 237
[12-Jul-2025 18:01:34 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rk6AMCDiOqgoJOU0T9j6tmH)
[12-Jul-2025 18:01:34 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[12-Jul-2025 18:01:34 UTC] Starting payment intent processing for event: evt_3Rk6AMCDiOqgoJOU0T9j6tmH
[12-Jul-2025 18:01:34 UTC] Fetching Stripe payment intent: pi_3Rk6AMCDiOqgoJOU00zYWSqG
[12-Jul-2025 18:01:34 UTC] Fetched Stripe payment intent: Array
(
    [id] => pi_3Rk6AMCDiOqgoJOU00zYWSqG
    [object] => payment_intent
    [amount] => 500
    [amount_capturable] => 0
    [amount_details] => Array
        (
            [tip] => Array
                (
                )

        )

    [amount_received] => 500
    [application] => 
    [application_fee_amount] => 
    [automatic_payment_methods] => 
    [canceled_at] => 
    [cancellation_reason] => 
    [capture_method] => automatic_async
    [client_secret] => pi_3Rk6AMCDiOqgoJOU00zYWSqG_secret_BwvSDjqAnPQhOECF4ATEtlKcz
    [confirmation_method] => automatic
    [created] => 1752337246
    [currency] => usd
    [customer] => 
    [description] => 
    [invoice] => 
    [last_payment_error] => 
    [latest_charge] => ch_3Rk6AMCDiOqgoJOU0KFmJIf5
    [livemode] => 
    [metadata] => Array
        (
        )

    [next_action] => 
    [on_behalf_of] => 
    [payment_method] => pm_1Rk6AMCDiOqgoJOUoAN5KsmG
    [payment_method_configuration_details] => 
    [payment_method_options] => Array
        (
            [card] => Array
                (
                    [installments] => 
                    [mandate_options] => 
                    [network] => 
                    [request_three_d_secure] => automatic
                )

        )

    [payment_method_types] => Array
        (
            [0] => card
        )

    [presentment_details] => Array
        (
            [presentment_amount] => 63224
            [presentment_currency] => bdt
        )

    [processing] => 
    [receipt_email] => 
    [review] => 
    [setup_future_usage] => 
    [shipping] => 
    [source] => 
    [statement_descriptor] => 
    [statement_descriptor_suffix] => 
    [status] => succeeded
    [transfer_data] => 
    [transfer_group] => 
)

[12-Jul-2025 18:01:34 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function find_or_create_qbo_customer() in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:72
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(50): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 72
[12-Jul-2025 18:09:33 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rk6AMCDiOqgoJOU0T9j6tmH)
[12-Jul-2025 18:09:33 UTC] PHP Fatal error:  Cannot redeclare make_qbo_api_request() (previously declared in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php:314) in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 249
[12-Jul-2025 18:13:46 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rk6AMCDiOqgoJOU0T9j6tmH)
[12-Jul-2025 18:13:46 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[12-Jul-2025 18:13:46 UTC] Starting payment intent processing for event: evt_3Rk6AMCDiOqgoJOU0T9j6tmH
[12-Jul-2025 18:13:46 UTC] Error processing payment intent: Unknown column 'access_token' in 'SELECT'
[13-Jul-2025 04:59:51 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rk6AMCDiOqgoJOU0T9j6tmH)
[13-Jul-2025 04:59:51 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[13-Jul-2025 04:59:51 UTC] Starting sales receipt creation process for event: evt_3Rk6AMCDiOqgoJOU0T9j6tmH
[13-Jul-2025 04:59:51 UTC] Fetching Stripe payment intent: pi_3Rk6AMCDiOqgoJOU00zYWSqG
[13-Jul-2025 04:59:52 UTC] Fetched Stripe payment intent: Array
(
    [id] => pi_3Rk6AMCDiOqgoJOU00zYWSqG
    [object] => payment_intent
    [amount] => 500
    [amount_capturable] => 0
    [amount_details] => Array
        (
            [tip] => Array
                (
                )

        )

    [amount_received] => 500
    [application] => 
    [application_fee_amount] => 
    [automatic_payment_methods] => 
    [canceled_at] => 
    [cancellation_reason] => 
    [capture_method] => automatic_async
    [client_secret] => pi_3Rk6AMCDiOqgoJOU00zYWSqG_secret_BwvSDjqAnPQhOECF4ATEtlKcz
    [confirmation_method] => automatic
    [created] => 1752337246
    [currency] => usd
    [customer] => 
    [description] => 
    [invoice] => 
    [last_payment_error] => 
    [latest_charge] => ch_3Rk6AMCDiOqgoJOU0KFmJIf5
    [livemode] => 
    [metadata] => Array
        (
        )

    [next_action] => 
    [on_behalf_of] => 
    [payment_method] => pm_1Rk6AMCDiOqgoJOUoAN5KsmG
    [payment_method_configuration_details] => 
    [payment_method_options] => Array
        (
            [card] => Array
                (
                    [installments] => 
                    [mandate_options] => 
                    [network] => 
                    [request_three_d_secure] => automatic
                )

        )

    [payment_method_types] => Array
        (
            [0] => card
        )

    [presentment_details] => Array
        (
            [presentment_amount] => 63224
            [presentment_currency] => bdt
        )

    [processing] => 
    [receipt_email] => 
    [review] => 
    [setup_future_usage] => 
    [shipping] => 
    [source] => 
    [statement_descriptor] => 
    [statement_descriptor_suffix] => 
    [status] => succeeded
    [transfer_data] => 
    [transfer_group] => 
)

[13-Jul-2025 04:59:52 UTC] Sales receipt creation failed: No charge found in payment intent
[13-Jul-2025 04:59:52 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:204
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(50): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 204
[13-Jul-2025 05:30:01 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rk6AMCDiOqgoJOU0T9j6tmH)
[13-Jul-2025 05:30:01 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[13-Jul-2025 05:30:01 UTC] Starting sales receipt creation process for event: evt_3Rk6AMCDiOqgoJOU0T9j6tmH
[13-Jul-2025 05:30:01 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function find_or_create_qbo_customer() in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:57
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(50): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 57
[13-Jul-2025 05:39:52 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rk6AMCDiOqgoJOU0T9j6tmH)
[13-Jul-2025 05:39:52 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[13-Jul-2025 05:39:52 UTC] Starting sales receipt creation process for event: evt_3Rk6AMCDiOqgoJOU0T9j6tmH
[13-Jul-2025 05:39:53 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                )

            [time] => 2025-07-12T22:39:53.797-07:00
        )

)

[13-Jul-2025 05:39:54 UTC] Using QBO customer ID: 102
[13-Jul-2025 05:39:57 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 102
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 5
                    [Description] => Payment
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 26
                                )

                            [UnitPrice] => 5
                            [Qty] => 1
                        )

                )

        )

    [TxnDate] => 2025-07-12
    [TotalAmt] => 5
    [PrivateNote] => Stripe Payment Intent ID: pi_3Rk6AMCDiOqgoJOU00zYWSqG
    [PaymentRefNum] => ch_3Rk6AMCDiOqgoJOU0KFmJIf5
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[13-Jul-2025 05:39:58 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 631
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-12T22:39:58-07:00
                            [LastUpdatedTime] => 2025-07-12T22:39:58-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1235
                    [TxnDate] => 2025-07-12
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3Rk6AMCDiOqgoJOU00zYWSqG
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => Payment
                                    [Amount] => 5
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 26
                                                    [name] => Payment
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-09020802-V1-00120000
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 5
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 0.48
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0.04
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 5
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0.31
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 5
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0.08
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 5
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0.05
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 5
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 102
                            [name] => yyyy yyyy
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 152
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 5.48
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3Rk6AMCDiOqgoJOU0KFmJIf5
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-12T22:39:57.382-07:00
        )

)

[13-Jul-2025 05:39:58 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 631
[13-Jul-2025 05:39:58 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[13-Jul-2025 06:43:43 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rk6AMCDiOqgoJOU0T9j6tmH)
[13-Jul-2025 06:43:43 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[13-Jul-2025 06:43:43 UTC] Starting sales receipt creation process for event: evt_3Rk6AMCDiOqgoJOU0T9j6tmH
[13-Jul-2025 06:43:43 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[13-Jul-2025 06:43:43 UTC] Payment intent already processed. QBO Sales Receipt ID: 631
[13-Jul-2025 06:54:05 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rk6AMCDiOqgoJOU0T9j6tmH)
[13-Jul-2025 06:54:05 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[13-Jul-2025 06:54:05 UTC] Starting sales receipt creation process for event: evt_3Rk6AMCDiOqgoJOU0T9j6tmH
[13-Jul-2025 06:54:06 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 102
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-12T22:39:54-07:00
                                            [LastUpdatedTime] => 2025-07-12T22:39:54-07:00
                                        )

                                    [GivenName] => yyyy yyyy
                                    [FamilyName] => yyyy yyyy
                                    [FullyQualifiedName] => yyyy yyyy
                                    [DisplayName] => yyyy yyyy
                                    [PrintOnCheckName] => yyyy yyyy yyyy yyyy
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020985e8aa6659f3449e38d4694ebe9b438ad
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => testtt@teseett.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-12T23:54:06.655-07:00
        )

)

[13-Jul-2025 06:54:06 UTC] Using QBO customer ID: 102
[13-Jul-2025 06:54:08 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 102
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 5
                    [Description] => Payment
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 26
                                )

                            [UnitPrice] => 5
                            [Qty] => 1
                        )

                )

        )

    [TxnDate] => 2025-07-12
    [TotalAmt] => 5
    [PrivateNote] => Stripe Payment Intent ID: pi_3Rk6AMCDiOqgoJOU00zYWSqG
    [PaymentRefNum] => ch_3Rk6AMCDiOqgoJOU0KFmJIf5
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[13-Jul-2025 06:54:09 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 632
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-12T23:54:09-07:00
                            [LastUpdatedTime] => 2025-07-12T23:54:09-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1236
                    [TxnDate] => 2025-07-12
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3Rk6AMCDiOqgoJOU00zYWSqG
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => Payment
                                    [Amount] => 5
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 26
                                                    [name] => Payment
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-09020802-V1-00120000
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 5
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 0.48
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0.04
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 5
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0.31
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 5
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0.08
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 5
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0.05
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 5
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 102
                            [name] => yyyy yyyy
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 153
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 5.48
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3Rk6AMCDiOqgoJOU0KFmJIf5
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-12T23:54:08.467-07:00
        )

)

[13-Jul-2025 06:54:09 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 632
[13-Jul-2025 06:54:09 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[13-Jul-2025 07:19:50 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rk6AMCDiOqgoJOU0T9j6tmH)
[13-Jul-2025 07:19:50 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[13-Jul-2025 07:19:50 UTC] Starting sales receipt creation process for event: evt_3Rk6AMCDiOqgoJOU0T9j6tmH
[13-Jul-2025 07:19:52 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 102
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-12T22:39:54-07:00
                                            [LastUpdatedTime] => 2025-07-12T22:39:54-07:00
                                        )

                                    [GivenName] => yyyy yyyy
                                    [FamilyName] => yyyy yyyy
                                    [FullyQualifiedName] => yyyy yyyy
                                    [DisplayName] => yyyy yyyy
                                    [PrintOnCheckName] => yyyy yyyy yyyy yyyy
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020985e8aa6659f3449e38d4694ebe9b438ad
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => testtt@teseett.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-13T00:19:51.951-07:00
        )

)

[13-Jul-2025 07:19:52 UTC] Using QBO customer ID: 102
[13-Jul-2025 07:19:53 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 102
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 5
                    [Description] => Payment
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 26
                                )

                            [UnitPrice] => 5
                            [Qty] => 1
                        )

                )

        )

    [TxnDate] => 2025-07-12
    [TotalAmt] => 5
    [PrivateNote] => Stripe Payment Intent ID: pi_3Rk6AMCDiOqgoJOU00zYWSqG
    [PaymentRefNum] => ch_3Rk6AMCDiOqgoJOU0KFmJIf5
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[13-Jul-2025 07:19:54 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 633
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-13T00:19:54-07:00
                            [LastUpdatedTime] => 2025-07-13T00:19:54-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1237
                    [TxnDate] => 2025-07-12
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3Rk6AMCDiOqgoJOU00zYWSqG
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => Payment
                                    [Amount] => 5
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 26
                                                    [name] => Payment
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-09020802-V1-00120000
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 5
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 0.48
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0.04
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 5
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0.31
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 5
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0.08
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 5
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0.05
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 5
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 102
                            [name] => yyyy yyyy
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 154
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 5.48
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3Rk6AMCDiOqgoJOU0KFmJIf5
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-13T00:19:53.697-07:00
        )

)

[13-Jul-2025 07:19:54 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 633
[13-Jul-2025 07:19:54 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[13-Jul-2025 09:25:27 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rk6AMCDiOqgoJOU0T9j6tmH)
[13-Jul-2025 09:25:27 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[13-Jul-2025 09:25:27 UTC] Starting sales receipt creation process for event: evt_3Rk6AMCDiOqgoJOU0T9j6tmH
[13-Jul-2025 09:25:27 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[13-Jul-2025 09:25:27 UTC] Payment intent already processed. QBO Sales Receipt ID: 633
[13-Jul-2025 09:26:15 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rk6AMCDiOqgoJOU0T9j6tmH)
[13-Jul-2025 09:26:15 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[13-Jul-2025 09:26:15 UTC] Starting sales receipt creation process for event: evt_3Rk6AMCDiOqgoJOU0T9j6tmH
[13-Jul-2025 09:26:15 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[13-Jul-2025 09:26:15 UTC] Payment intent already processed. QBO Sales Receipt ID: 633
[13-Jul-2025 09:28:29 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rk6AMCDiOqgoJOU0T9j6tmH)
[13-Jul-2025 09:28:30 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[13-Jul-2025 09:28:30 UTC] Starting sales receipt creation process for event: evt_3Rk6AMCDiOqgoJOU0T9j6tmH
[13-Jul-2025 09:28:31 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 102
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-12T22:39:54-07:00
                                            [LastUpdatedTime] => 2025-07-12T22:39:54-07:00
                                        )

                                    [GivenName] => yyyy yyyy
                                    [FamilyName] => yyyy yyyy
                                    [FullyQualifiedName] => yyyy yyyy
                                    [DisplayName] => yyyy yyyy
                                    [PrintOnCheckName] => yyyy yyyy yyyy yyyy
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020985e8aa6659f3449e38d4694ebe9b438ad
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => testtt@teseett.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-13T02:28:31.012-07:00
        )

)

[13-Jul-2025 09:28:31 UTC] Using QBO customer ID: 102
[13-Jul-2025 09:28:32 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 102
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 5
                    [Description] => Payment
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 26
                                )

                            [UnitPrice] => 5
                            [Qty] => 1
                        )

                )

        )

    [TxnDate] => 2025-07-12
    [TotalAmt] => 5
    [PrivateNote] => Stripe Payment Intent ID: pi_3Rk6AMCDiOqgoJOU00zYWSqG
    [PaymentRefNum] => ch_3Rk6AMCDiOqgoJOU0KFmJIf5
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[13-Jul-2025 09:28:33 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 634
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-13T02:28:33-07:00
                            [LastUpdatedTime] => 2025-07-13T02:28:33-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1238
                    [TxnDate] => 2025-07-12
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3Rk6AMCDiOqgoJOU00zYWSqG
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => Payment
                                    [Amount] => 5
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 26
                                                    [name] => Payment
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-09020802-V1-00120000
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 5
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 0.48
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0.04
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 5
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0.31
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 5
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0.08
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 5
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0.05
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 5
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 102
                            [name] => yyyy yyyy
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 155
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 5.48
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3Rk6AMCDiOqgoJOU0KFmJIf5
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-13T02:28:32.764-07:00
        )

)

[13-Jul-2025 09:28:33 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 634
[13-Jul-2025 09:28:33 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[13-Jul-2025 09:31:35 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rk6AMCDiOqgoJOU0T9j6tmH)
[13-Jul-2025 09:31:35 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[13-Jul-2025 09:31:35 UTC] Starting sales receipt creation process for event: evt_3Rk6AMCDiOqgoJOU0T9j6tmH
[13-Jul-2025 09:31:35 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[13-Jul-2025 09:31:35 UTC] Payment intent already processed. QBO Sales Receipt ID: 634
[13-Jul-2025 10:01:54 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rk6AMCDiOqgoJOU0T9j6tmH)
[13-Jul-2025 10:01:54 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[13-Jul-2025 10:01:54 UTC] Starting sales receipt creation process for event: evt_3Rk6AMCDiOqgoJOU0T9j6tmH
[13-Jul-2025 10:01:56 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 102
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-12T22:39:54-07:00
                                            [LastUpdatedTime] => 2025-07-12T22:39:54-07:00
                                        )

                                    [GivenName] => yyyy yyyy
                                    [FamilyName] => yyyy yyyy
                                    [FullyQualifiedName] => yyyy yyyy
                                    [DisplayName] => yyyy yyyy
                                    [PrintOnCheckName] => yyyy yyyy yyyy yyyy
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020985e8aa6659f3449e38d4694ebe9b438ad
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => testtt@teseett.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-13T03:01:56.021-07:00
        )

)

[13-Jul-2025 10:01:56 UTC] Using QBO customer ID: 102
[13-Jul-2025 10:01:58 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 102
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 5
                    [Description] => Payment
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 26
                                )

                            [UnitPrice] => 5
                            [Qty] => 1
                        )

                )

        )

    [TxnDate] => 2025-07-12
    [TotalAmt] => 5
    [PrivateNote] => Stripe Payment Intent ID: pi_3Rk6AMCDiOqgoJOU00zYWSqG
    [PaymentRefNum] => ch_3Rk6AMCDiOqgoJOU0KFmJIf5
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[13-Jul-2025 10:01:59 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 635
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-13T03:01:59-07:00
                            [LastUpdatedTime] => 2025-07-13T03:01:59-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1239
                    [TxnDate] => 2025-07-12
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3Rk6AMCDiOqgoJOU00zYWSqG
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => Payment
                                    [Amount] => 5
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 26
                                                    [name] => Payment
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-09020802-V1-00120000
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 5
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 0.48
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0.04
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 5
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0.31
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 5
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0.08
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 5
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0.05
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 5
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 102
                            [name] => yyyy yyyy
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 156
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 5.48
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3Rk6AMCDiOqgoJOU0KFmJIf5
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-13T03:01:58.655-07:00
        )

)

[13-Jul-2025 10:01:59 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 635
[13-Jul-2025 10:01:59 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[13-Jul-2025 15:56:33 UTC] Stripe Webhook Received: charge.succeeded (ID: evt_3RkSGSCDiOqgoJOU04TnINM7)
[13-Jul-2025 15:56:33 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[13-Jul-2025 16:07:02 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rk6AMCDiOqgoJOU0T9j6tmH)
[13-Jul-2025 16:07:02 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[13-Jul-2025 16:07:02 UTC] Starting sales receipt creation process for event: evt_3Rk6AMCDiOqgoJOU0T9j6tmH
[13-Jul-2025 16:07:04 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 102
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-12T22:39:54-07:00
                                            [LastUpdatedTime] => 2025-07-12T22:39:54-07:00
                                        )

                                    [GivenName] => yyyy yyyy
                                    [FamilyName] => yyyy yyyy
                                    [FullyQualifiedName] => yyyy yyyy
                                    [DisplayName] => yyyy yyyy
                                    [PrintOnCheckName] => yyyy yyyy yyyy yyyy
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020985e8aa6659f3449e38d4694ebe9b438ad
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => testtt@teseett.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-13T09:07:04.406-07:00
        )

)

[13-Jul-2025 16:07:04 UTC] Using QBO customer ID: 102
[13-Jul-2025 16:07:06 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 102
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 5
                    [Description] => Payment
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 26
                                )

                            [UnitPrice] => 5
                            [Qty] => 1
                        )

                )

        )

    [TxnDate] => 2025-07-12
    [TotalAmt] => 5
    [PrivateNote] => Stripe Payment Intent ID: pi_3Rk6AMCDiOqgoJOU00zYWSqG
    [PaymentRefNum] => ch_3Rk6AMCDiOqgoJOU0KFmJIf5
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[13-Jul-2025 16:07:07 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 636
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-13T09:07:07-07:00
                            [LastUpdatedTime] => 2025-07-13T09:07:07-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1240
                    [TxnDate] => 2025-07-12
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3Rk6AMCDiOqgoJOU00zYWSqG
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => Payment
                                    [Amount] => 5
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 26
                                                    [name] => Payment
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-09020802-V1-00120000
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 5
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 0.48
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0.04
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 5
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0.31
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 5
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0.08
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 5
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0.05
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 5
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 102
                            [name] => yyyy yyyy
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 157
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 5.48
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3Rk6AMCDiOqgoJOU0KFmJIf5
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-13T09:07:06.735-07:00
        )

)

[13-Jul-2025 16:07:07 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 636
[13-Jul-2025 16:07:07 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[13-Jul-2025 16:22:47 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rk6AMCDiOqgoJOU0T9j6tmH)
[13-Jul-2025 16:22:47 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[13-Jul-2025 16:22:47 UTC] Starting sales receipt creation process for event: evt_3Rk6AMCDiOqgoJOU0T9j6tmH
[13-Jul-2025 16:22:48 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 102
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-12T22:39:54-07:00
                                            [LastUpdatedTime] => 2025-07-12T22:39:54-07:00
                                        )

                                    [GivenName] => yyyy yyyy
                                    [FamilyName] => yyyy yyyy
                                    [FullyQualifiedName] => yyyy yyyy
                                    [DisplayName] => yyyy yyyy
                                    [PrintOnCheckName] => yyyy yyyy yyyy yyyy
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020985e8aa6659f3449e38d4694ebe9b438ad
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => testtt@teseett.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-13T09:22:48.214-07:00
        )

)

[13-Jul-2025 16:22:48 UTC] Using QBO customer ID: 102
[13-Jul-2025 16:22:49 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 102
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 5
                    [Description] => Payment
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 26
                                )

                            [UnitPrice] => 5
                            [Qty] => 1
                        )

                )

        )

    [TxnDate] => 2025-07-12
    [TotalAmt] => 5
    [PrivateNote] => Stripe Payment Intent ID: pi_3Rk6AMCDiOqgoJOU00zYWSqG
    [PaymentRefNum] => ch_3Rk6AMCDiOqgoJOU0KFmJIf5
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[13-Jul-2025 16:22:51 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 637
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-13T09:22:51-07:00
                            [LastUpdatedTime] => 2025-07-13T09:22:51-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1241
                    [TxnDate] => 2025-07-12
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3Rk6AMCDiOqgoJOU00zYWSqG
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => Payment
                                    [Amount] => 5
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 26
                                                    [name] => Payment
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-09020802-V1-00120000
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 5
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 0.48
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0.04
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 5
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0.31
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 5
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0.08
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 5
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0.05
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 5
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 102
                            [name] => yyyy yyyy
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 158
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 5.48
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3Rk6AMCDiOqgoJOU0KFmJIf5
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-13T09:22:50.328-07:00
        )

)

[13-Jul-2025 16:22:51 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 637
[13-Jul-2025 16:22:51 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[13-Jul-2025 16:38:34 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rk6AMCDiOqgoJOU0T9j6tmH)
[13-Jul-2025 16:38:34 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[13-Jul-2025 16:38:34 UTC] Starting sales receipt creation process for event: evt_3Rk6AMCDiOqgoJOU0T9j6tmH
[13-Jul-2025 16:38:35 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 102
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-12T22:39:54-07:00
                                            [LastUpdatedTime] => 2025-07-12T22:39:54-07:00
                                        )

                                    [GivenName] => yyyy yyyy
                                    [FamilyName] => yyyy yyyy
                                    [FullyQualifiedName] => yyyy yyyy
                                    [DisplayName] => yyyy yyyy
                                    [PrintOnCheckName] => yyyy yyyy yyyy yyyy
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020985e8aa6659f3449e38d4694ebe9b438ad
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => testtt@teseett.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-13T09:38:35.646-07:00
        )

)

[13-Jul-2025 16:38:35 UTC] Using QBO customer ID: 102
[13-Jul-2025 16:38:36 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 102
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 5
                    [Description] => Payment
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 26
                                )

                            [UnitPrice] => 5
                            [Qty] => 1
                        )

                )

        )

    [TxnDate] => 2025-07-12
    [TotalAmt] => 5
    [PrivateNote] => Stripe Payment Intent ID: pi_3Rk6AMCDiOqgoJOU00zYWSqG
    [PaymentRefNum] => ch_3Rk6AMCDiOqgoJOU0KFmJIf5
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[13-Jul-2025 16:38:38 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 638
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-13T09:38:37-07:00
                            [LastUpdatedTime] => 2025-07-13T09:38:37-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1242
                    [TxnDate] => 2025-07-12
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3Rk6AMCDiOqgoJOU00zYWSqG
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => Payment
                                    [Amount] => 5
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 26
                                                    [name] => Payment
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-09020802-V1-00120000
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 5
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 0.48
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0.04
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 5
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0.31
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 5
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0.08
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 5
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0.05
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 5
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 102
                            [name] => yyyy yyyy
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 159
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 5.48
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3Rk6AMCDiOqgoJOU0KFmJIf5
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-13T09:38:37.094-07:00
        )

)

[13-Jul-2025 16:38:38 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 638
[13-Jul-2025 16:38:38 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[13-Jul-2025 16:40:01 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rk6AMCDiOqgoJOU0T9j6tmH)
[13-Jul-2025 16:40:01 UTC] PHP Parse error:  Unclosed '[' on line 21 does not match ')' in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 23
[13-Jul-2025 16:43:39 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rk6AMCDiOqgoJOU0T9j6tmH)
[13-Jul-2025 16:43:39 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[13-Jul-2025 16:43:39 UTC] Starting sales receipt creation process for event: evt_3Rk6AMCDiOqgoJOU0T9j6tmH
[13-Jul-2025 16:43:40 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 102
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-12T22:39:54-07:00
                                            [LastUpdatedTime] => 2025-07-12T22:39:54-07:00
                                        )

                                    [GivenName] => yyyy yyyy
                                    [FamilyName] => yyyy yyyy
                                    [FullyQualifiedName] => yyyy yyyy
                                    [DisplayName] => yyyy yyyy
                                    [PrintOnCheckName] => yyyy yyyy yyyy yyyy
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020985e8aa6659f3449e38d4694ebe9b438ad
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => testtt@teseett.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-13T09:43:40.131-07:00
        )

)

[13-Jul-2025 16:43:40 UTC] Using QBO customer ID: 102
[13-Jul-2025 16:43:40 UTC] No checkout_session_id found in payment intent metadata
[13-Jul-2025 16:43:40 UTC] No line items from checkout session - using fallback single line item
[13-Jul-2025 16:43:40 UTC] Fallback product name: Payment
[13-Jul-2025 16:43:40 UTC] Finding or creating QBO item: Payment
[13-Jul-2025 16:43:40 UTC] Found existing item: 26
[13-Jul-2025 16:43:40 UTC] Looking up QBO payment method for Stripe type 'card' -> QBO name 'Credit Card'
[13-Jul-2025 16:43:41 UTC] Payment method not found, using default
[13-Jul-2025 16:43:41 UTC] Looking up QBO account: Undeposited Funds
[13-Jul-2025 16:43:41 UTC] Found account: 4
[13-Jul-2025 16:43:41 UTC] Final sales receipt data: Array
(
    [CustomerRef] => Array
        (
            [value] => 102
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 5
                    [Description] => Payment
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 26
                                )

                            [UnitPrice] => 5
                            [Qty] => 1
                        )

                )

        )

    [TxnDate] => 2025-07-12
    [TotalAmt] => 5
    [PrivateNote] => Stripe Payment Intent ID: pi_3Rk6AMCDiOqgoJOU00zYWSqG
    [PaymentRefNum] => ch_3Rk6AMCDiOqgoJOU0KFmJIf5
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[13-Jul-2025 16:43:42 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 639
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-13T09:43:42-07:00
                            [LastUpdatedTime] => 2025-07-13T09:43:42-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1243
                    [TxnDate] => 2025-07-12
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3Rk6AMCDiOqgoJOU00zYWSqG
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => Payment
                                    [Amount] => 5
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 26
                                                    [name] => Payment
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-09020802-V1-00120000
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 5
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 0.48
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0.04
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 5
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0.31
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 5
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0.08
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 5
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0.05
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 5
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 102
                            [name] => yyyy yyyy
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 160
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 5.48
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3Rk6AMCDiOqgoJOU0KFmJIf5
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-13T09:43:41.916-07:00
        )

)

[13-Jul-2025 16:43:42 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 639
[13-Jul-2025 16:43:42 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[13-Jul-2025 17:35:18 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rk6AMCDiOqgoJOU0T9j6tmH)
[13-Jul-2025 17:35:18 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[13-Jul-2025 17:35:18 UTC] Starting sales receipt creation process for event: evt_3Rk6AMCDiOqgoJOU0T9j6tmH
[13-Jul-2025 17:35:19 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1752428119440
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[13-Jul-2025 17:35:19 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1752428119829
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[13-Jul-2025 17:35:19 UTC] Sales receipt creation failed: Failed to find or create customer in QuickBooks
[13-Jul-2025 17:35:19 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:311
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(50): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 311
[13-Jul-2025 17:46:52 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rk6AMCDiOqgoJOU0T9j6tmH)
[13-Jul-2025 17:46:52 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[13-Jul-2025 17:46:52 UTC] [SYNC] Starting sales receipt creation for event: evt_3Rk6AMCDiOqgoJOU0T9j6tmH
[13-Jul-2025 17:46:52 UTC] [QBO] Looking up customer by email: testtt@teseett.com
[13-Jul-2025 17:46:52 UTC] [QBO] Creating new customer: {"DisplayName":"yyyy yyyy","GivenName":"yyyy yyyy","FamilyName":"yyyy yyyy","PrimaryEmailAddr":{"Address":"testtt@teseett.com"},"Notes":"Created via Stripe integration"}
[13-Jul-2025 17:46:53 UTC] [QBO] Failed to create customer: {"code":401,"body":{"warnings":null,"intuitObject":null,"fault":{"error":[{"message":"message=AuthenticationFailed; errorCode=003200; statusCode=401","detail":"Token expired","code":"3200","element":null}],"type":"AUTHENTICATION"},"report":null,"queryResponse":null,"batchItemResponse":[],"attachableResponse":[],"syncErrorResponse":null,"requestId":null,"time":1752428813032,"status":null,"cdcresponse":[]}}
[13-Jul-2025 17:46:53 UTC] [ERROR] Sales receipt creation failed: Failed to find or create customer in QuickBooks
[13-Jul-2025 17:46:53 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:235
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(50): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 235
[13-Jul-2025 17:48:12 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rk6AMCDiOqgoJOU0T9j6tmH)
[13-Jul-2025 17:48:12 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[13-Jul-2025 17:48:12 UTC] [SYNC] Starting sales receipt creation for event: evt_3Rk6AMCDiOqgoJOU0T9j6tmH
[13-Jul-2025 17:48:12 UTC] [QBO] Looking up customer by email: testtt@teseett.com
[13-Jul-2025 17:48:13 UTC] [QBO] Found existing customer: 102
[13-Jul-2025 17:48:13 UTC] [SYNC] Using QBO customer ID: 102
[13-Jul-2025 17:48:13 UTC] [STRIPE] Looking up checkout session for payment intent: pi_3Rk6AMCDiOqgoJOU00zYWSqG
[13-Jul-2025 17:48:13 UTC] PHP Warning:  Undefined array key "access_token" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 75
[13-Jul-2025 17:48:13 UTC] [STRIPE] API Request: GET checkout/sessions - Response: 401
[13-Jul-2025 17:48:13 UTC] [ERROR] Sales receipt creation failed: Stripe API error: You did not provide an API key. You need to provide your API key in the Authorization header, using Bearer auth (e.g. 'Authorization: Bearer YOUR_SECRET_KEY'). See https://stripe.com/docs/api#authentication for details, or we can help at https://support.stripe.com/.
[13-Jul-2025 17:48:13 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:235
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(50): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 235
[13-Jul-2025 18:04:08 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rk6AMCDiOqgoJOU0T9j6tmH)
[13-Jul-2025 18:04:08 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[13-Jul-2025 18:04:08 UTC] [SYNC] Starting sales receipt creation for event: evt_3Rk6AMCDiOqgoJOU0T9j6tmH
[13-Jul-2025 18:04:08 UTC] [ERROR] Sales receipt creation failed: Stripe account not properly connected - missing access token
[13-Jul-2025 18:04:08 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:235
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(50): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 235
[13-Jul-2025 18:15:50 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rk6AMCDiOqgoJOU0T9j6tmH)
[13-Jul-2025 18:15:50 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[13-Jul-2025 18:15:50 UTC] Starting sales receipt creation process for event: evt_3Rk6AMCDiOqgoJOU0T9j6tmH
[13-Jul-2025 18:15:52 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 102
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-12T22:39:54-07:00
                                            [LastUpdatedTime] => 2025-07-12T22:39:54-07:00
                                        )

                                    [GivenName] => yyyy yyyy
                                    [FamilyName] => yyyy yyyy
                                    [FullyQualifiedName] => yyyy yyyy
                                    [DisplayName] => yyyy yyyy
                                    [PrintOnCheckName] => yyyy yyyy yyyy yyyy
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020985e8aa6659f3449e38d4694ebe9b438ad
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => testtt@teseett.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-13T11:15:51.953-07:00
        )

)

[13-Jul-2025 18:15:52 UTC] Using QBO customer ID: 102
[13-Jul-2025 18:15:52 UTC] PHP Warning:  Undefined array key "access_token" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 70
[13-Jul-2025 18:15:52 UTC] Failed to fetch Checkout Session for Payment Intent: pi_3Rk6AMCDiOqgoJOU00zYWSqG
[13-Jul-2025 18:15:52 UTC] No checkout session or line items found, using default line item
[13-Jul-2025 18:15:53 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 102
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 5
                    [Description] => Payment
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 26
                                )

                            [UnitPrice] => 5
                            [Qty] => 1
                        )

                )

        )

    [TxnDate] => 2025-07-12
    [TotalAmt] => 5
    [PrivateNote] => Stripe Payment Intent ID: pi_3Rk6AMCDiOqgoJOU00zYWSqG
    [PaymentRefNum] => ch_3Rk6AMCDiOqgoJOU0KFmJIf5
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[13-Jul-2025 18:15:55 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 640
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-13T11:15:55-07:00
                            [LastUpdatedTime] => 2025-07-13T11:15:55-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1244
                    [TxnDate] => 2025-07-12
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3Rk6AMCDiOqgoJOU00zYWSqG
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => Payment
                                    [Amount] => 5
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 26
                                                    [name] => Payment
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-09020802-V1-00120000
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 5
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 0.48
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0.04
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 5
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0.31
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 5
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0.08
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 5
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0.05
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 5
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 102
                            [name] => yyyy yyyy
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 161
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 5.48
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3Rk6AMCDiOqgoJOU0KFmJIf5
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-13T11:15:54.326-07:00
        )

)

[13-Jul-2025 18:15:55 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 640
[13-Jul-2025 18:15:55 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[13-Jul-2025 18:31:13 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rk6AMCDiOqgoJOU0T9j6tmH)
[13-Jul-2025 18:31:13 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[13-Jul-2025 18:31:13 UTC] Starting sales receipt creation process for event: evt_3Rk6AMCDiOqgoJOU0T9j6tmH
[13-Jul-2025 18:31:14 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 102
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-12T22:39:54-07:00
                                            [LastUpdatedTime] => 2025-07-12T22:39:54-07:00
                                        )

                                    [GivenName] => yyyy yyyy
                                    [FamilyName] => yyyy yyyy
                                    [FullyQualifiedName] => yyyy yyyy
                                    [DisplayName] => yyyy yyyy
                                    [PrintOnCheckName] => yyyy yyyy yyyy yyyy
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020985e8aa6659f3449e38d4694ebe9b438ad
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => testtt@teseett.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-13T11:31:14.434-07:00
        )

)

[13-Jul-2025 18:31:14 UTC] Using QBO customer ID: 102
[13-Jul-2025 18:31:14 UTC] PHP Warning:  Undefined array key "access_token" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 70
[13-Jul-2025 18:31:14 UTC] Failed to fetch Checkout Session for Payment Intent: pi_3Rk6AMCDiOqgoJOU00zYWSqG HTTP Code: 401
[13-Jul-2025 18:31:14 UTC] No line items found from checkout session, using default line item
[13-Jul-2025 18:31:16 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 102
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 5
                    [Description] => Payment
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 26
                                )

                            [UnitPrice] => 5
                            [Qty] => 1
                        )

                )

        )

    [TxnDate] => 2025-07-12
    [TotalAmt] => 5
    [PrivateNote] => Stripe Payment Intent ID: pi_3Rk6AMCDiOqgoJOU00zYWSqG
    [PaymentRefNum] => ch_3Rk6AMCDiOqgoJOU0KFmJIf5
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[13-Jul-2025 18:31:17 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 641
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-13T11:31:17-07:00
                            [LastUpdatedTime] => 2025-07-13T11:31:17-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1245
                    [TxnDate] => 2025-07-12
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3Rk6AMCDiOqgoJOU00zYWSqG
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => Payment
                                    [Amount] => 5
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 26
                                                    [name] => Payment
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-09020802-V1-00120000
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 5
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 0.48
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0.04
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 5
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0.31
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 5
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0.08
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 5
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0.05
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 5
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 102
                            [name] => yyyy yyyy
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 162
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 5.48
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3Rk6AMCDiOqgoJOU0KFmJIf5
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-13T11:31:16.401-07:00
        )

)

[13-Jul-2025 18:31:17 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 641
[13-Jul-2025 18:31:17 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[14-Jul-2025 05:27:05 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rk6AMCDiOqgoJOU0T9j6tmH)
[14-Jul-2025 05:27:05 UTC] PHP Fatal error:  Cannot redeclare get_stripe_account() (previously declared in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php:102) in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 403
[14-Jul-2025 05:28:49 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rk6AMCDiOqgoJOU0T9j6tmH)
[14-Jul-2025 05:28:49 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[14-Jul-2025 05:28:49 UTC] Starting sales receipt creation process for event: evt_3Rk6AMCDiOqgoJOU0T9j6tmH
[14-Jul-2025 05:28:49 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[14-Jul-2025 05:28:49 UTC] Payment intent already processed. QBO Sales Receipt ID: 641
[14-Jul-2025 05:30:25 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rk6AMCDiOqgoJOU0T9j6tmH)
[14-Jul-2025 05:30:25 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[14-Jul-2025 05:30:25 UTC] Starting sales receipt creation process for event: evt_3Rk6AMCDiOqgoJOU0T9j6tmH
[14-Jul-2025 05:30:26 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 102
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-12T22:39:54-07:00
                                            [LastUpdatedTime] => 2025-07-12T22:39:54-07:00
                                        )

                                    [GivenName] => yyyy yyyy
                                    [FamilyName] => yyyy yyyy
                                    [FullyQualifiedName] => yyyy yyyy
                                    [DisplayName] => yyyy yyyy
                                    [PrintOnCheckName] => yyyy yyyy yyyy yyyy
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020985e8aa6659f3449e38d4694ebe9b438ad
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => testtt@teseett.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-13T22:30:26.415-07:00
        )

)

[14-Jul-2025 05:30:26 UTC] Using QBO customer ID: 102
[14-Jul-2025 05:30:27 UTC] Found checkout session line items: 1
[14-Jul-2025 05:30:28 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 102
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 5
                    [Description] => product1
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 25
                                )

                            [UnitPrice] => 5
                            [Qty] => 1
                        )

                )

        )

    [TxnDate] => 2025-07-12
    [TotalAmt] => 5
    [PrivateNote] => Stripe Payment Intent ID: pi_3Rk6AMCDiOqgoJOU00zYWSqG
    [PaymentRefNum] => ch_3Rk6AMCDiOqgoJOU0KFmJIf5
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[14-Jul-2025 05:30:29 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 642
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-13T22:30:29-07:00
                            [LastUpdatedTime] => 2025-07-13T22:30:29-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1246
                    [TxnDate] => 2025-07-12
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3Rk6AMCDiOqgoJOU00zYWSqG
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => product1
                                    [Amount] => 5
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 25
                                                    [name] => product1
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 1
                                                    [name] => Services
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-99990202-V1-00020000
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 5
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 0.48
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0.04
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 5
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0.31
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 5
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0.08
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 5
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0.05
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 5
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 102
                            [name] => yyyy yyyy
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 163
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 5.48
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3Rk6AMCDiOqgoJOU0KFmJIf5
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-13T22:30:28.332-07:00
        )

)

[14-Jul-2025 05:30:29 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 642
[14-Jul-2025 05:30:29 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[14-Jul-2025 05:41:36 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rk6AMCDiOqgoJOU0T9j6tmH)
[14-Jul-2025 05:41:36 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[14-Jul-2025 05:41:36 UTC] Starting sales receipt creation process for event: evt_3Rk6AMCDiOqgoJOU0T9j6tmH
[14-Jul-2025 05:41:37 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 102
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-12T22:39:54-07:00
                                            [LastUpdatedTime] => 2025-07-12T22:39:54-07:00
                                        )

                                    [GivenName] => yyyy yyyy
                                    [FamilyName] => yyyy yyyy
                                    [FullyQualifiedName] => yyyy yyyy
                                    [DisplayName] => yyyy yyyy
                                    [PrintOnCheckName] => yyyy yyyy yyyy yyyy
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020985e8aa6659f3449e38d4694ebe9b438ad
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => testtt@teseett.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-13T22:41:36.928-07:00
        )

)

[14-Jul-2025 05:41:37 UTC] Using QBO customer ID: 102
[14-Jul-2025 05:41:37 UTC] Found checkout session line items: 1
[14-Jul-2025 05:41:38 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 102
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 5
                    [Description] => product1
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 25
                                )

                            [UnitPrice] => 5
                            [Qty] => 1
                        )

                )

        )

    [TxnDate] => 2025-07-12
    [TotalAmt] => 5
    [PrivateNote] => Stripe Payment Intent ID: pi_3Rk6AMCDiOqgoJOU00zYWSqG
    [PaymentRefNum] => ch_3Rk6AMCDiOqgoJOU0KFmJIf5
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[14-Jul-2025 05:41:39 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 643
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-13T22:41:39-07:00
                            [LastUpdatedTime] => 2025-07-13T22:41:39-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1247
                    [TxnDate] => 2025-07-12
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3Rk6AMCDiOqgoJOU00zYWSqG
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => product1
                                    [Amount] => 5
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 25
                                                    [name] => product1
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 1
                                                    [name] => Services
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => NON
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 5
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 102
                            [name] => yyyy yyyy
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 164
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 5
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3Rk6AMCDiOqgoJOU0KFmJIf5
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-13T22:41:38.822-07:00
        )

)

[14-Jul-2025 05:41:39 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 643
[14-Jul-2025 05:41:39 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[14-Jul-2025 06:01:58 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rk6AMCDiOqgoJOU0T9j6tmH)
[14-Jul-2025 06:01:58 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[14-Jul-2025 06:01:59 UTC] Starting sales receipt creation process for event: evt_3Rk6AMCDiOqgoJOU0T9j6tmH
[14-Jul-2025 06:02:00 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 102
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-12T22:39:54-07:00
                                            [LastUpdatedTime] => 2025-07-12T22:39:54-07:00
                                        )

                                    [GivenName] => yyyy yyyy
                                    [FamilyName] => yyyy yyyy
                                    [FullyQualifiedName] => yyyy yyyy
                                    [DisplayName] => yyyy yyyy
                                    [PrintOnCheckName] => yyyy yyyy yyyy yyyy
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020985e8aa6659f3449e38d4694ebe9b438ad
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => testtt@teseett.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-13T23:01:59.824-07:00
        )

)

[14-Jul-2025 06:02:00 UTC] Using QBO customer ID: 102
[14-Jul-2025 06:02:00 UTC] Found checkout session line items: 1
[14-Jul-2025 06:02:01 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 102
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 5
                    [Description] => product1
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 25
                                )

                            [UnitPrice] => 5
                            [Qty] => 1
                        )

                )

        )

    [TxnDate] => 2025-07-12
    [TotalAmt] => 5
    [PrivateNote] => Stripe Payment Intent ID: pi_3Rk6AMCDiOqgoJOU00zYWSqG
    [PaymentRefNum] => ch_3Rk6AMCDiOqgoJOU0KFmJIf5
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 0
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[14-Jul-2025 06:02:02 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 644
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-13T23:02:02-07:00
                            [LastUpdatedTime] => 2025-07-13T23:02:02-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1248
                    [TxnDate] => 2025-07-12
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3Rk6AMCDiOqgoJOU00zYWSqG
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => product1
                                    [Amount] => 5
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 25
                                                    [name] => product1
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 1
                                                    [name] => Services
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => NON
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 5
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 102
                            [name] => yyyy yyyy
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 165
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 5
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3Rk6AMCDiOqgoJOU0KFmJIf5
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-13T23:02:01.838-07:00
        )

)

[14-Jul-2025 06:02:02 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 644
[14-Jul-2025 06:02:02 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[14-Jul-2025 10:05:42 UTC] Stripe Webhook Received: charge.succeeded (ID: evt_3RkSGSCDiOqgoJOU04TnINM7)
[14-Jul-2025 10:05:42 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[14-Jul-2025 10:05:42 UTC] Starting charge processing for Stripe charge: evt_3RkSGSCDiOqgoJOU04TnINM7
[14-Jul-2025 10:05:43 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                )

            [time] => 2025-07-14T03:05:43.626-07:00
        )

)

[14-Jul-2025 10:05:44 UTC] Failed to create customer: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Duplicate Name Exists Error
                                    [Detail] => The name supplied already exists. : null
                                    [code] => 6240
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-14T03:05:44.029-07:00
        )

)

[14-Jul-2025 10:05:44 UTC] Payment creation failed: Failed to find or create customer
[14-Jul-2025 10:05:44 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-charge-succeeded-to-qbo-payment.php:143
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(57): process_stripe_charge_succeeded_to_qbo_payment()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-charge-succeeded-to-qbo-payment.php on line 143
[14-Jul-2025 10:21:44 UTC] Stripe Webhook Received: charge.succeeded (ID: evt_3RkSGSCDiOqgoJOU04TnINM7)
[14-Jul-2025 10:21:44 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[14-Jul-2025 10:21:44 UTC] Starting charge processing for Stripe charge: evt_3RkSGSCDiOqgoJOU04TnINM7
[14-Jul-2025 10:21:45 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                )

            [time] => 2025-07-14T03:21:45.276-07:00
        )

)

[14-Jul-2025 10:21:45 UTC] Failed to create customer: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Duplicate Name Exists Error
                                    [Detail] => The name supplied already exists. : null
                                    [code] => 6240
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-14T03:21:45.686-07:00
        )

)

[14-Jul-2025 10:21:45 UTC] Payment creation failed: Failed to find or create customer in QuickBooks
[14-Jul-2025 10:21:45 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-charge-succeeded-to-qbo-payment.php:151
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(57): process_stripe_charge_succeeded_to_qbo_payment()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-charge-succeeded-to-qbo-payment.php on line 151
[14-Jul-2025 10:48:45 UTC] Stripe Webhook Received: charge.succeeded (ID: evt_3RkSGSCDiOqgoJOU04TnINM7)
[14-Jul-2025 10:48:45 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[14-Jul-2025 10:48:45 UTC] Starting charge processing for Stripe charge: evt_3RkSGSCDiOqgoJOU04TnINM7
[14-Jul-2025 10:48:46 UTC] ratulbinhasan110@gmail.com
[14-Jul-2025 10:48:46 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                )

            [time] => 2025-07-14T03:48:46.230-07:00
        )

)

[14-Jul-2025 10:48:46 UTC] Failed to create customer: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Duplicate Name Exists Error
                                    [Detail] => The name supplied already exists. : null
                                    [code] => 6240
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-14T03:48:46.632-07:00
        )

)

[14-Jul-2025 10:48:46 UTC] Payment creation failed: Failed to find or create customer in QuickBooks
[14-Jul-2025 10:48:46 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-charge-succeeded-to-qbo-payment.php:151
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(57): process_stripe_charge_succeeded_to_qbo_payment()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-charge-succeeded-to-qbo-payment.php on line 151
[14-Jul-2025 11:12:15 UTC] Stripe Webhook Received: charge.succeeded (ID: evt_3RkSGSCDiOqgoJOU04TnINM7)
[14-Jul-2025 11:12:15 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[14-Jul-2025 11:12:15 UTC] Starting charge processing for Stripe charge: evt_3RkSGSCDiOqgoJOU04TnINM7
[14-Jul-2025 11:12:16 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                )

            [time] => 2025-07-14T04:12:16.447-07:00
        )

)

[14-Jul-2025 11:12:17 UTC] Using QBO customer ID: 103
[14-Jul-2025 11:12:18 UTC] Failed to create payment method: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Invalid Enumeration
                                    [Detail] => Invalid Enumeration : OTHER
                                    [code] => 2170
                                    [element] => Type
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-14T04:12:18.935-07:00
        )

)

[14-Jul-2025 11:12:19 UTC] Creating QBO payment with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 103
        )

    [TotalAmt] => 5
    [TxnDate] => 2025-07-13
    [PaymentRefNum] => ch_3RkSGSCDiOqgoJOU0CiEQSzd
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [PrivateNote] => Stripe Charge: ch_3RkSGSCDiOqgoJOU0CiEQSzd
    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 5
                    [Description] => product1
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 25
                                )

                            [UnitPrice] => 5
                            [Qty] => 1
                        )

                )

        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[14-Jul-2025 11:12:19 UTC] QBO API response: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Required param missing, need to supply the required value for the API
                                    [Detail] => Required parameter LinkedTxn is missing in the request
                                    [code] => 2020
                                    [element] => LinkedTxn
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-14T04:12:19.562-07:00
        )

)

[14-Jul-2025 11:12:19 UTC] Payment creation failed: Failed to create payment in QuickBooks
[14-Jul-2025 11:12:19 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[14-Jul-2025 11:17:21 UTC] Stripe Webhook Received: charge.succeeded (ID: evt_3RkSGSCDiOqgoJOU04TnINM7)
[14-Jul-2025 11:17:21 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[14-Jul-2025 11:17:21 UTC] Starting charge processing for Stripe charge: evt_3RkSGSCDiOqgoJOU04TnINM7
[14-Jul-2025 11:17:22 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 103
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-14T04:12:17-07:00
                                            [LastUpdatedTime] => 2025-07-14T04:12:17-07:00
                                        )

                                    [GivenName] => test test
                                    [FamilyName] => test test
                                    [FullyQualifiedName] => test test(ratulbinhasan110@gmail.com)
                                    [DisplayName] => test test(ratulbinhasan110@gmail.com)
                                    [PrintOnCheckName] => test test test test
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098ddb8ef1a74da4e86a37a4834a65414ee
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratulbinhasan110@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-14T04:17:22.012-07:00
        )

)

[14-Jul-2025 11:17:23 UTC] Failed to create payment method: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Invalid Enumeration
                                    [Detail] => Invalid Enumeration : OTHER
                                    [code] => 2170
                                    [element] => Type
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-14T04:17:23.841-07:00
        )

)

[14-Jul-2025 11:17:24 UTC] Creating QBO payment with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 103
        )

    [TotalAmt] => 5
    [TxnDate] => 2025-07-13
    [PaymentRefNum] => ch_3RkSGSCDiOqgoJOU0CiEQSzd
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [PrivateNote] => Stripe Charge: ch_3RkSGSCDiOqgoJOU0CiEQSzd
    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 5
                    [Description] => product1
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 25
                                )

                            [UnitPrice] => 5
                            [Qty] => 1
                        )

                )

        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[14-Jul-2025 11:17:24 UTC] QBO API response: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Required param missing, need to supply the required value for the API
                                    [Detail] => Required parameter LinkedTxn is missing in the request
                                    [code] => 2020
                                    [element] => LinkedTxn
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-14T04:17:24.418-07:00
        )

)

[14-Jul-2025 11:17:24 UTC] Payment creation failed: Failed to create payment in QuickBooks
[14-Jul-2025 11:17:24 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[14-Jul-2025 11:35:30 UTC] Stripe Webhook Received: charge.succeeded (ID: evt_3RkSGSCDiOqgoJOU04TnINM7)
[14-Jul-2025 11:35:30 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[14-Jul-2025 11:35:30 UTC] Starting charge processing for Stripe charge: evt_3RkSGSCDiOqgoJOU04TnINM7
[14-Jul-2025 11:35:31 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 103
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-14T04:12:17-07:00
                                            [LastUpdatedTime] => 2025-07-14T04:12:17-07:00
                                        )

                                    [GivenName] => test test
                                    [FamilyName] => test test
                                    [FullyQualifiedName] => test test(ratulbinhasan110@gmail.com)
                                    [DisplayName] => test test(ratulbinhasan110@gmail.com)
                                    [PrintOnCheckName] => test test test test
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098ddb8ef1a74da4e86a37a4834a65414ee
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratulbinhasan110@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-14T04:35:31.094-07:00
        )

)

[14-Jul-2025 11:35:32 UTC] Creating QBO invoice with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 103
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 5
                    [Description] => product1
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 25
                                )

                            [UnitPrice] => 5
                            [Qty] => 1
                        )

                )

        )

    [TxnDate] => 2025-07-13
    [DueDate] => 2025-07-13
    [TotalAmt] => 5
    [PrivateNote] => Stripe Charge: ch_3RkSGSCDiOqgoJOU0CiEQSzd
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
)

[14-Jul-2025 11:35:33 UTC] QBO Invoice API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 645
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-14T04:35:33-07:00
                            [LastModifiedByRef] => Array
                                (
                                    [value] => 123145870265994
                                )

                            [LastUpdatedTime] => 2025-07-14T04:35:33-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1249
                    [TxnDate] => 2025-07-13
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Charge: ch_3RkSGSCDiOqgoJOU0CiEQSzd
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => product1
                                    [Amount] => 5
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 25
                                                    [name] => product1
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 1
                                                    [name] => Services
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => NON
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 5
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 103
                            [name] => test test(ratulbinhasan110@gmail.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 166
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [DueDate] => 2025-07-13
                    [TotalAmt] => 5
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 5
                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-14T04:35:32.755-07:00
        )

)

[14-Jul-2025 11:35:33 UTC] Invoice created successfully in QBO. Invoice ID: 645
[14-Jul-2025 11:35:34 UTC] Failed to create payment method: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Invalid Enumeration
                                    [Detail] => Invalid Enumeration : OTHER
                                    [code] => 2170
                                    [element] => Type
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-14T04:35:34.247-07:00
        )

)

[14-Jul-2025 11:35:34 UTC] Creating QBO payment with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 103
        )

    [TotalAmt] => 5
    [TxnDate] => 2025-07-13
    [PaymentRefNum] => ch_3RkSGSCDiOqgoJOU0CiEQSzd
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [PrivateNote] => Stripe Charge: ch_3RkSGSCDiOqgoJOU0CiEQSzd
    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [Amount] => 5
                    [LinkedTxn] => Array
                        (
                            [0] => Array
                                (
                                    [TxnId] => 645
                                    [TxnType] => Invoice
                                )

                        )

                )

        )

)

[14-Jul-2025 11:35:35 UTC] QBO Payment API response: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => A business validation error has occurred while processing your request
                                    [Detail] => Business Validation Error: You cannot enter more than 21 characters in the doc_num field. You tried entering ch_3RkSGSC..., which is 27 characters.
                                    [code] => 6000
                                    [element] => 
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-14T04:35:34.871-07:00
        )

)

[14-Jul-2025 11:35:35 UTC] Payment creation failed: Failed to create payment in QuickBooks
[14-Jul-2025 11:35:35 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[14-Jul-2025 12:42:12 UTC] Stripe Webhook Received: charge.succeeded (ID: evt_3RkSGSCDiOqgoJOU04TnINM7)
[14-Jul-2025 12:42:12 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[14-Jul-2025 12:42:12 UTC] Starting charge processing for Stripe charge: evt_3RkSGSCDiOqgoJOU04TnINM7
[14-Jul-2025 12:42:13 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 5
                                    [BalanceWithJobs] => 5
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 103
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-14T04:12:17-07:00
                                            [LastUpdatedTime] => 2025-07-14T04:35:34-07:00
                                        )

                                    [GivenName] => test test
                                    [FamilyName] => test test
                                    [FullyQualifiedName] => test test(ratulbinhasan110@gmail.com)
                                    [DisplayName] => test test(ratulbinhasan110@gmail.com)
                                    [PrintOnCheckName] => test test test test
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098ddb8ef1a74da4e86a37a4834a65414ee
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratulbinhasan110@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-14T05:42:13.688-07:00
        )

)

[14-Jul-2025 12:42:15 UTC] Creating QBO invoice with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 103
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 5
                    [Description] => product1
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 25
                                )

                            [UnitPrice] => 5
                            [Qty] => 1
                        )

                )

        )

    [TxnDate] => 2025-07-13
    [DueDate] => 2025-07-13
    [TotalAmt] => 5
    [PrivateNote] => Stripe Charge: ch_3RkSGSCDiOqgoJOU0CiEQSzd
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
)

[14-Jul-2025 12:42:16 UTC] QBO Invoice API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 646
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-14T05:42:16-07:00
                            [LastModifiedByRef] => Array
                                (
                                    [value] => 123145870265994
                                )

                            [LastUpdatedTime] => 2025-07-14T05:42:16-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1250
                    [TxnDate] => 2025-07-13
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Charge: ch_3RkSGSCDiOqgoJOU0CiEQSzd
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => product1
                                    [Amount] => 5
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 25
                                                    [name] => product1
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 1
                                                    [name] => Services
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => NON
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 5
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 103
                            [name] => test test(ratulbinhasan110@gmail.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 167
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [DueDate] => 2025-07-13
                    [TotalAmt] => 5
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 5
                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-14T05:42:15.570-07:00
        )

)

[14-Jul-2025 12:42:16 UTC] Invoice created successfully in QBO. Invoice ID: 646
[14-Jul-2025 12:42:17 UTC] Failed to create payment method: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Invalid Enumeration
                                    [Detail] => Invalid Enumeration : OTHER
                                    [code] => 2170
                                    [element] => Type
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-14T05:42:17.141-07:00
        )

)

[14-Jul-2025 12:42:17 UTC] Creating QBO payment with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 103
        )

    [TotalAmt] => 5
    [TxnDate] => 2025-07-13
    [PaymentRefNum] => ch_3RkSGSCDiOqgoJOU0CiEQSzd
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [PrivateNote] => Stripe Charge: ch_3RkSGSCDiOqgoJOU0CiEQSzd
    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [Amount] => 5
                    [LinkedTxn] => Array
                        (
                            [0] => Array
                                (
                                    [TxnId] => 646
                                    [TxnType] => Invoice
                                )

                        )

                )

        )

)

[14-Jul-2025 12:42:17 UTC] QBO Payment API response: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => A business validation error has occurred while processing your request
                                    [Detail] => Business Validation Error: You cannot enter more than 21 characters in the doc_num field. You tried entering ch_3RkSGSC..., which is 27 characters.
                                    [code] => 6000
                                    [element] => 
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-14T05:42:17.794-07:00
        )

)

[14-Jul-2025 12:42:17 UTC] Payment creation failed: Failed to create payment in QuickBooks
[14-Jul-2025 12:42:17 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[14-Jul-2025 12:52:24 UTC] Stripe Webhook Received: charge.succeeded (ID: evt_3RkSGSCDiOqgoJOU04TnINM7)
[14-Jul-2025 12:52:24 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[14-Jul-2025 12:52:24 UTC] Starting charge processing for Stripe charge: evt_3RkSGSCDiOqgoJOU04TnINM7
[14-Jul-2025 12:52:25 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 10
                                    [BalanceWithJobs] => 10
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 103
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-14T04:12:17-07:00
                                            [LastUpdatedTime] => 2025-07-14T05:42:16-07:00
                                        )

                                    [GivenName] => test test
                                    [FamilyName] => test test
                                    [FullyQualifiedName] => test test(ratulbinhasan110@gmail.com)
                                    [DisplayName] => test test(ratulbinhasan110@gmail.com)
                                    [PrintOnCheckName] => test test test test
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098ddb8ef1a74da4e86a37a4834a65414ee
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratulbinhasan110@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-14T05:52:25.472-07:00
        )

)

[14-Jul-2025 12:52:26 UTC] Creating QBO invoice with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 103
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 5
                    [Description] => product1
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 25
                                )

                            [UnitPrice] => 5
                            [Qty] => 1
                        )

                )

        )

    [TxnDate] => 2025-07-13
    [DueDate] => 2025-07-13
    [TotalAmt] => 5
    [PrivateNote] => Stripe Charge: ch_3RkSGSCDiOqgoJOU0CiEQSzd
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
)

[14-Jul-2025 12:52:28 UTC] QBO Invoice API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 647
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-14T05:52:28-07:00
                            [LastModifiedByRef] => Array
                                (
                                    [value] => 123145870265994
                                )

                            [LastUpdatedTime] => 2025-07-14T05:52:28-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1251
                    [TxnDate] => 2025-07-13
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Charge: ch_3RkSGSCDiOqgoJOU0CiEQSzd
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => product1
                                    [Amount] => 5
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 25
                                                    [name] => product1
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 1
                                                    [name] => Services
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => NON
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 5
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 103
                            [name] => test test(ratulbinhasan110@gmail.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 168
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [DueDate] => 2025-07-13
                    [TotalAmt] => 5
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 5
                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-14T05:52:27.069-07:00
        )

)

[14-Jul-2025 12:52:28 UTC] Invoice created successfully in QBO. Invoice ID: 647
[14-Jul-2025 12:52:28 UTC] Failed to create payment method: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Invalid Enumeration
                                    [Detail] => Invalid Enumeration : OTHER
                                    [code] => 2170
                                    [element] => Type
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-14T05:52:28.603-07:00
        )

)

[14-Jul-2025 12:52:28 UTC] Creating QBO payment with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 103
        )

    [TotalAmt] => 5
    [TxnDate] => 2025-07-13
    [PaymentRefNum] => stripe_ch_3RkSGSCDiOq
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [PrivateNote] => Stripe Charge: ch_3RkSGSCDiOqgoJOU0CiEQSzd
    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [Amount] => 5
                    [LinkedTxn] => Array
                        (
                            [0] => Array
                                (
                                    [TxnId] => 647
                                    [TxnType] => Invoice
                                )

                        )

                )

        )

)

[14-Jul-2025 12:52:29 UTC] QBO Payment API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Payment] => Array
                (
                    [CustomerRef] => Array
                        (
                            [value] => 103
                            [name] => test test(ratulbinhasan110@gmail.com)
                        )

                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                        )

                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                        )

                    [PaymentRefNum] => stripe_ch_3RkSGSCDiOq
                    [TotalAmt] => 5
                    [UnappliedAmt] => 0
                    [ProcessPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 648
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-14T05:52:29-07:00
                            [LastUpdatedTime] => 2025-07-14T05:52:29-07:00
                        )

                    [TxnDate] => 2025-07-13
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Charge: ch_3RkSGSCDiOqgoJOU0CiEQSzd
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Amount] => 5
                                    [LinkedTxn] => Array
                                        (
                                            [0] => Array
                                                (
                                                    [TxnId] => 647
                                                    [TxnType] => Invoice
                                                )

                                        )

                                    [LineEx] => Array
                                        (
                                            [any] => Array
                                                (
                                                    [0] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnId
                                                                    [Value] => 647
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                    [1] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnOpenBalance
                                                                    [Value] => 5.00
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                    [2] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnReferenceNumber
                                                                    [Value] => 1251
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                )

                                        )

                                )

                        )

                )

            [time] => 2025-07-14T05:52:29.224-07:00
        )

)

[14-Jul-2025 12:52:29 UTC] Payment created successfully in QBO. Payment ID: 648
[14-Jul-2025 12:52:29 UTC] Payment creation failed: Unknown column 'qbo_invoice_id' in 'INSERT INTO'
[14-Jul-2025 12:52:29 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[14-Jul-2025 12:59:33 UTC] Stripe Webhook Received: charge.succeeded (ID: evt_3RkSGSCDiOqgoJOU04TnINM7)
[14-Jul-2025 12:59:33 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[14-Jul-2025 12:59:33 UTC] Starting charge processing for Stripe charge: evt_3RkSGSCDiOqgoJOU04TnINM7
[14-Jul-2025 12:59:34 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 10
                                    [BalanceWithJobs] => 10
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 103
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-14T04:12:17-07:00
                                            [LastUpdatedTime] => 2025-07-14T05:52:29-07:00
                                        )

                                    [GivenName] => test test
                                    [FamilyName] => test test
                                    [FullyQualifiedName] => test test(ratulbinhasan110@gmail.com)
                                    [DisplayName] => test test(ratulbinhasan110@gmail.com)
                                    [PrintOnCheckName] => test test test test
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098ddb8ef1a74da4e86a37a4834a65414ee
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratulbinhasan110@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-14T05:59:34.596-07:00
        )

)

[14-Jul-2025 12:59:35 UTC] Creating QBO invoice with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 103
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 5
                    [Description] => product1
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 25
                                )

                            [UnitPrice] => 5
                            [Qty] => 1
                        )

                )

        )

    [TxnDate] => 2025-07-13
    [DueDate] => 2025-07-13
    [TotalAmt] => 5
    [PrivateNote] => Stripe Charge: ch_3RkSGSCDiOqgoJOU0CiEQSzd
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
)

[14-Jul-2025 12:59:36 UTC] QBO Invoice API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 649
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-14T05:59:37-07:00
                            [LastModifiedByRef] => Array
                                (
                                    [value] => 123145870265994
                                )

                            [LastUpdatedTime] => 2025-07-14T05:59:37-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1252
                    [TxnDate] => 2025-07-13
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Charge: ch_3RkSGSCDiOqgoJOU0CiEQSzd
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => product1
                                    [Amount] => 5
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 25
                                                    [name] => product1
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 1
                                                    [name] => Services
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => NON
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 5
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 103
                            [name] => test test(ratulbinhasan110@gmail.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 169
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [DueDate] => 2025-07-13
                    [TotalAmt] => 5
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 5
                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-14T05:59:36.140-07:00
        )

)

[14-Jul-2025 12:59:36 UTC] Invoice created successfully in QBO. Invoice ID: 649
[14-Jul-2025 12:59:37 UTC] Failed to create payment method: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Invalid Enumeration
                                    [Detail] => Invalid Enumeration : OTHER
                                    [code] => 2170
                                    [element] => Type
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-14T05:59:37.561-07:00
        )

)

[14-Jul-2025 12:59:37 UTC] Creating QBO payment with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 103
        )

    [TotalAmt] => 5
    [TxnDate] => 2025-07-13
    [PaymentRefNum] => stripe_ch_3RkSGSCDiOq
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [PrivateNote] => Stripe Charge: ch_3RkSGSCDiOqgoJOU0CiEQSzd
    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [Amount] => 5
                    [LinkedTxn] => Array
                        (
                            [0] => Array
                                (
                                    [TxnId] => 649
                                    [TxnType] => Invoice
                                )

                        )

                )

        )

)

[14-Jul-2025 12:59:38 UTC] QBO Payment API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Payment] => Array
                (
                    [CustomerRef] => Array
                        (
                            [value] => 103
                            [name] => test test(ratulbinhasan110@gmail.com)
                        )

                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                        )

                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                        )

                    [PaymentRefNum] => stripe_ch_3RkSGSCDiOq
                    [TotalAmt] => 5
                    [UnappliedAmt] => 0
                    [ProcessPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 650
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-14T05:59:38-07:00
                            [LastUpdatedTime] => 2025-07-14T05:59:38-07:00
                        )

                    [TxnDate] => 2025-07-13
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Charge: ch_3RkSGSCDiOqgoJOU0CiEQSzd
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Amount] => 5
                                    [LinkedTxn] => Array
                                        (
                                            [0] => Array
                                                (
                                                    [TxnId] => 649
                                                    [TxnType] => Invoice
                                                )

                                        )

                                    [LineEx] => Array
                                        (
                                            [any] => Array
                                                (
                                                    [0] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnId
                                                                    [Value] => 649
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                    [1] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnOpenBalance
                                                                    [Value] => 5.00
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                    [2] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnReferenceNumber
                                                                    [Value] => 1252
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                )

                                        )

                                )

                        )

                )

            [time] => 2025-07-14T05:59:38.087-07:00
        )

)

[14-Jul-2025 12:59:38 UTC] Payment created successfully in QBO. Payment ID: 650
[14-Jul-2025 12:59:38 UTC] Payment creation failed: Column count doesn't match value count at row 1
[14-Jul-2025 12:59:38 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[14-Jul-2025 13:01:12 UTC] Stripe Webhook Received: charge.succeeded (ID: evt_3RkSGSCDiOqgoJOU04TnINM7)
[14-Jul-2025 13:01:12 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[14-Jul-2025 13:01:12 UTC] Starting charge processing for Stripe charge: evt_3RkSGSCDiOqgoJOU04TnINM7
[14-Jul-2025 13:01:13 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 10
                                    [BalanceWithJobs] => 10
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 103
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-14T04:12:17-07:00
                                            [LastUpdatedTime] => 2025-07-14T05:59:38-07:00
                                        )

                                    [GivenName] => test test
                                    [FamilyName] => test test
                                    [FullyQualifiedName] => test test(ratulbinhasan110@gmail.com)
                                    [DisplayName] => test test(ratulbinhasan110@gmail.com)
                                    [PrintOnCheckName] => test test test test
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098ddb8ef1a74da4e86a37a4834a65414ee
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratulbinhasan110@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-14T06:01:13.385-07:00
        )

)

[14-Jul-2025 13:01:14 UTC] Creating QBO invoice with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 103
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 5
                    [Description] => product1
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 25
                                )

                            [UnitPrice] => 5
                            [Qty] => 1
                        )

                )

        )

    [TxnDate] => 2025-07-13
    [DueDate] => 2025-07-13
    [TotalAmt] => 5
    [PrivateNote] => Stripe Charge: ch_3RkSGSCDiOqgoJOU0CiEQSzd
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
)

[14-Jul-2025 13:01:16 UTC] QBO Invoice API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 651
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-14T06:01:16-07:00
                            [LastModifiedByRef] => Array
                                (
                                    [value] => 123145870265994
                                )

                            [LastUpdatedTime] => 2025-07-14T06:01:16-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1253
                    [TxnDate] => 2025-07-13
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Charge: ch_3RkSGSCDiOqgoJOU0CiEQSzd
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => product1
                                    [Amount] => 5
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 25
                                                    [name] => product1
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 1
                                                    [name] => Services
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => NON
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 5
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 103
                            [name] => test test(ratulbinhasan110@gmail.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 170
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [DueDate] => 2025-07-13
                    [TotalAmt] => 5
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 5
                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-14T06:01:15.193-07:00
        )

)

[14-Jul-2025 13:01:16 UTC] Invoice created successfully in QBO. Invoice ID: 651
[14-Jul-2025 13:01:16 UTC] Failed to create payment method: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Invalid Enumeration
                                    [Detail] => Invalid Enumeration : OTHER
                                    [code] => 2170
                                    [element] => Type
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-14T06:01:16.658-07:00
        )

)

[14-Jul-2025 13:01:17 UTC] Creating QBO payment with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 103
        )

    [TotalAmt] => 5
    [TxnDate] => 2025-07-13
    [PaymentRefNum] => stripe_ch_3RkSGSCDiOq
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [PrivateNote] => Stripe Charge: ch_3RkSGSCDiOqgoJOU0CiEQSzd
    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [Amount] => 5
                    [LinkedTxn] => Array
                        (
                            [0] => Array
                                (
                                    [TxnId] => 651
                                    [TxnType] => Invoice
                                )

                        )

                )

        )

)

[14-Jul-2025 13:01:17 UTC] QBO Payment API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Payment] => Array
                (
                    [CustomerRef] => Array
                        (
                            [value] => 103
                            [name] => test test(ratulbinhasan110@gmail.com)
                        )

                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                        )

                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                        )

                    [PaymentRefNum] => stripe_ch_3RkSGSCDiOq
                    [TotalAmt] => 5
                    [UnappliedAmt] => 0
                    [ProcessPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 652
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-14T06:01:17-07:00
                            [LastUpdatedTime] => 2025-07-14T06:01:17-07:00
                        )

                    [TxnDate] => 2025-07-13
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Charge: ch_3RkSGSCDiOqgoJOU0CiEQSzd
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Amount] => 5
                                    [LinkedTxn] => Array
                                        (
                                            [0] => Array
                                                (
                                                    [TxnId] => 651
                                                    [TxnType] => Invoice
                                                )

                                        )

                                    [LineEx] => Array
                                        (
                                            [any] => Array
                                                (
                                                    [0] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnId
                                                                    [Value] => 651
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                    [1] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnOpenBalance
                                                                    [Value] => 5.00
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                    [2] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnReferenceNumber
                                                                    [Value] => 1253
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                )

                                        )

                                )

                        )

                )

            [time] => 2025-07-14T06:01:17.298-07:00
        )

)

[14-Jul-2025 13:01:17 UTC] Payment created successfully in QBO. Payment ID: 652
[14-Jul-2025 13:01:17 UTC] PHP Fatal error:  Uncaught ArgumentCountError: The number of elements in the type definition string must match the number of bind variables in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-charge-succeeded-to-qbo-payment.php:159
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-charge-succeeded-to-qbo-payment.php(159): mysqli_stmt->bind_param()
#1 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(57): process_stripe_charge_succeeded_to_qbo_payment()
#2 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-charge-succeeded-to-qbo-payment.php on line 159
[14-Jul-2025 13:02:54 UTC] Stripe Webhook Received: charge.succeeded (ID: evt_3RkSGSCDiOqgoJOU04TnINM7)
[14-Jul-2025 13:02:54 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[14-Jul-2025 13:02:54 UTC] Starting charge processing for Stripe charge: evt_3RkSGSCDiOqgoJOU04TnINM7
[14-Jul-2025 13:02:54 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 10
                                    [BalanceWithJobs] => 10
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 103
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-14T04:12:17-07:00
                                            [LastUpdatedTime] => 2025-07-14T06:01:17-07:00
                                        )

                                    [GivenName] => test test
                                    [FamilyName] => test test
                                    [FullyQualifiedName] => test test(ratulbinhasan110@gmail.com)
                                    [DisplayName] => test test(ratulbinhasan110@gmail.com)
                                    [PrintOnCheckName] => test test test test
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098ddb8ef1a74da4e86a37a4834a65414ee
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratulbinhasan110@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-14T06:02:54.880-07:00
        )

)

[14-Jul-2025 13:02:56 UTC] Creating QBO invoice with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 103
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 5
                    [Description] => product1
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 25
                                )

                            [UnitPrice] => 5
                            [Qty] => 1
                        )

                )

        )

    [TxnDate] => 2025-07-13
    [DueDate] => 2025-07-13
    [TotalAmt] => 5
    [PrivateNote] => Stripe Charge: ch_3RkSGSCDiOqgoJOU0CiEQSzd
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
)

[14-Jul-2025 13:02:57 UTC] QBO Invoice API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 653
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-14T06:02:57-07:00
                            [LastModifiedByRef] => Array
                                (
                                    [value] => 123145870265994
                                )

                            [LastUpdatedTime] => 2025-07-14T06:02:57-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1254
                    [TxnDate] => 2025-07-13
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Charge: ch_3RkSGSCDiOqgoJOU0CiEQSzd
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => product1
                                    [Amount] => 5
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 25
                                                    [name] => product1
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 1
                                                    [name] => Services
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => NON
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 5
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 103
                            [name] => test test(ratulbinhasan110@gmail.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 171
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [DueDate] => 2025-07-13
                    [TotalAmt] => 5
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 5
                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-14T06:02:56.489-07:00
        )

)

[14-Jul-2025 13:02:57 UTC] Invoice created successfully in QBO. Invoice ID: 653
[14-Jul-2025 13:02:57 UTC] Failed to create payment method: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Invalid Enumeration
                                    [Detail] => Invalid Enumeration : OTHER
                                    [code] => 2170
                                    [element] => Type
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-14T06:02:57.891-07:00
        )

)

[14-Jul-2025 13:02:58 UTC] Creating QBO payment with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 103
        )

    [TotalAmt] => 5
    [TxnDate] => 2025-07-13
    [PaymentRefNum] => stripe_ch_3RkSGSCDiOq
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [PrivateNote] => Stripe Charge: ch_3RkSGSCDiOqgoJOU0CiEQSzd
    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [Amount] => 5
                    [LinkedTxn] => Array
                        (
                            [0] => Array
                                (
                                    [TxnId] => 653
                                    [TxnType] => Invoice
                                )

                        )

                )

        )

)

[14-Jul-2025 13:02:58 UTC] QBO Payment API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Payment] => Array
                (
                    [CustomerRef] => Array
                        (
                            [value] => 103
                            [name] => test test(ratulbinhasan110@gmail.com)
                        )

                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                        )

                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                        )

                    [PaymentRefNum] => stripe_ch_3RkSGSCDiOq
                    [TotalAmt] => 5
                    [UnappliedAmt] => 0
                    [ProcessPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 654
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-14T06:02:59-07:00
                            [LastUpdatedTime] => 2025-07-14T06:02:59-07:00
                        )

                    [TxnDate] => 2025-07-13
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Charge: ch_3RkSGSCDiOqgoJOU0CiEQSzd
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Amount] => 5
                                    [LinkedTxn] => Array
                                        (
                                            [0] => Array
                                                (
                                                    [TxnId] => 653
                                                    [TxnType] => Invoice
                                                )

                                        )

                                    [LineEx] => Array
                                        (
                                            [any] => Array
                                                (
                                                    [0] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnId
                                                                    [Value] => 653
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                    [1] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnOpenBalance
                                                                    [Value] => 5.00
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                    [2] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnReferenceNumber
                                                                    [Value] => 1254
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                )

                                        )

                                )

                        )

                )

            [time] => 2025-07-14T06:02:58.446-07:00
        )

)

[14-Jul-2025 13:02:58 UTC] Payment created successfully in QBO. Payment ID: 654
[14-Jul-2025 13:02:59 UTC] Mapping storage warning: Unknown column 'qbo_invoice_id' in 'INSERT INTO'
[14-Jul-2025 13:02:59 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[14-Jul-2025 13:03:36 UTC] Stripe Webhook Received: charge.succeeded (ID: evt_3RkSGSCDiOqgoJOU04TnINM7)
[14-Jul-2025 13:03:36 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[14-Jul-2025 13:03:36 UTC] Starting charge processing for Stripe charge: evt_3RkSGSCDiOqgoJOU04TnINM7
[14-Jul-2025 13:04:18 UTC] Stripe Webhook Received: charge.succeeded (ID: evt_3RkSGSCDiOqgoJOU04TnINM7)
[14-Jul-2025 13:04:18 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[14-Jul-2025 13:04:18 UTC] Starting charge processing for Stripe charge: evt_3RkSGSCDiOqgoJOU04TnINM7
[14-Jul-2025 13:05:05 UTC] Stripe Webhook Received: charge.succeeded (ID: evt_3RkSGSCDiOqgoJOU04TnINM7)
[14-Jul-2025 13:05:05 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[14-Jul-2025 13:05:05 UTC] Starting charge processing for Stripe charge: evt_3RkSGSCDiOqgoJOU04TnINM7
[14-Jul-2025 13:05:46 UTC] Stripe Webhook Received: charge.succeeded (ID: evt_3RkSGSCDiOqgoJOU04TnINM7)
[14-Jul-2025 13:05:46 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[14-Jul-2025 13:05:46 UTC] Starting charge processing for Stripe charge: evt_3RkSGSCDiOqgoJOU04TnINM7
[14-Jul-2025 13:05:47 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 10
                                    [BalanceWithJobs] => 10
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 103
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-14T04:12:17-07:00
                                            [LastUpdatedTime] => 2025-07-14T06:02:59-07:00
                                        )

                                    [GivenName] => test test
                                    [FamilyName] => test test
                                    [FullyQualifiedName] => test test(ratulbinhasan110@gmail.com)
                                    [DisplayName] => test test(ratulbinhasan110@gmail.com)
                                    [PrintOnCheckName] => test test test test
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098ddb8ef1a74da4e86a37a4834a65414ee
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratulbinhasan110@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-14T06:05:47.345-07:00
        )

)

[14-Jul-2025 13:05:48 UTC] Creating QBO invoice with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 103
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 5
                    [Description] => product1
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 25
                                )

                            [UnitPrice] => 5
                            [Qty] => 1
                        )

                )

        )

    [TxnDate] => 2025-07-13
    [DueDate] => 2025-07-13
    [TotalAmt] => 5
    [PrivateNote] => Stripe Charge: ch_3RkSGSCDiOqgoJOU0CiEQSzd
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
)

[14-Jul-2025 13:05:49 UTC] QBO Invoice API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 655
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-14T06:05:49-07:00
                            [LastModifiedByRef] => Array
                                (
                                    [value] => 123145870265994
                                )

                            [LastUpdatedTime] => 2025-07-14T06:05:49-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1255
                    [TxnDate] => 2025-07-13
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Charge: ch_3RkSGSCDiOqgoJOU0CiEQSzd
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => product1
                                    [Amount] => 5
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 25
                                                    [name] => product1
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 1
                                                    [name] => Services
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => NON
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 5
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 103
                            [name] => test test(ratulbinhasan110@gmail.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 172
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [DueDate] => 2025-07-13
                    [TotalAmt] => 5
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 5
                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-14T06:05:48.964-07:00
        )

)

[14-Jul-2025 13:05:49 UTC] Invoice created successfully in QBO. Invoice ID: 655
[14-Jul-2025 13:05:50 UTC] Failed to create payment method: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Invalid Enumeration
                                    [Detail] => Invalid Enumeration : OTHER
                                    [code] => 2170
                                    [element] => Type
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-14T06:05:50.275-07:00
        )

)

[14-Jul-2025 13:05:50 UTC] Creating QBO payment with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 103
        )

    [TotalAmt] => 5
    [TxnDate] => 2025-07-13
    [PaymentRefNum] => stripe_ch_3RkSGSCDiOq
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [PrivateNote] => Stripe Charge: ch_3RkSGSCDiOqgoJOU0CiEQSzd
    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [Amount] => 5
                    [LinkedTxn] => Array
                        (
                            [0] => Array
                                (
                                    [TxnId] => 655
                                    [TxnType] => Invoice
                                )

                        )

                )

        )

)

[14-Jul-2025 13:05:51 UTC] QBO Payment API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Payment] => Array
                (
                    [CustomerRef] => Array
                        (
                            [value] => 103
                            [name] => test test(ratulbinhasan110@gmail.com)
                        )

                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                        )

                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                        )

                    [PaymentRefNum] => stripe_ch_3RkSGSCDiOq
                    [TotalAmt] => 5
                    [UnappliedAmt] => 0
                    [ProcessPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 656
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-14T06:05:51-07:00
                            [LastUpdatedTime] => 2025-07-14T06:05:51-07:00
                        )

                    [TxnDate] => 2025-07-13
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Charge: ch_3RkSGSCDiOqgoJOU0CiEQSzd
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Amount] => 5
                                    [LinkedTxn] => Array
                                        (
                                            [0] => Array
                                                (
                                                    [TxnId] => 655
                                                    [TxnType] => Invoice
                                                )

                                        )

                                    [LineEx] => Array
                                        (
                                            [any] => Array
                                                (
                                                    [0] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnId
                                                                    [Value] => 655
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                    [1] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnOpenBalance
                                                                    [Value] => 5.00
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                    [2] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnReferenceNumber
                                                                    [Value] => 1255
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                )

                                        )

                                )

                        )

                )

            [time] => 2025-07-14T06:05:50.817-07:00
        )

)

[14-Jul-2025 13:05:51 UTC] Payment created successfully in QBO. Payment ID: 656
[14-Jul-2025 13:05:51 UTC] Payment creation failed: Column count doesn't match value count at row 1
[14-Jul-2025 13:05:51 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[14-Jul-2025 13:07:27 UTC] Stripe Webhook Received: charge.succeeded (ID: evt_3RkSGSCDiOqgoJOU04TnINM7)
[14-Jul-2025 13:07:27 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[14-Jul-2025 13:07:27 UTC] Starting charge processing for Stripe charge: evt_3RkSGSCDiOqgoJOU04TnINM7
[14-Jul-2025 13:07:28 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 10
                                    [BalanceWithJobs] => 10
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 103
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-14T04:12:17-07:00
                                            [LastUpdatedTime] => 2025-07-14T06:05:51-07:00
                                        )

                                    [GivenName] => test test
                                    [FamilyName] => test test
                                    [FullyQualifiedName] => test test(ratulbinhasan110@gmail.com)
                                    [DisplayName] => test test(ratulbinhasan110@gmail.com)
                                    [PrintOnCheckName] => test test test test
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098ddb8ef1a74da4e86a37a4834a65414ee
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratulbinhasan110@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-14T06:07:28.196-07:00
        )

)

[14-Jul-2025 13:07:29 UTC] Creating QBO invoice with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 103
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 5
                    [Description] => product1
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 25
                                )

                            [UnitPrice] => 5
                            [Qty] => 1
                        )

                )

        )

    [TxnDate] => 2025-07-13
    [DueDate] => 2025-07-13
    [TotalAmt] => 5
    [PrivateNote] => Stripe Charge: ch_3RkSGSCDiOqgoJOU0CiEQSzd
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
)

[14-Jul-2025 13:07:30 UTC] QBO Invoice API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 657
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-14T06:07:30-07:00
                            [LastModifiedByRef] => Array
                                (
                                    [value] => 123145870265994
                                )

                            [LastUpdatedTime] => 2025-07-14T06:07:30-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1256
                    [TxnDate] => 2025-07-13
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Charge: ch_3RkSGSCDiOqgoJOU0CiEQSzd
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => product1
                                    [Amount] => 5
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 25
                                                    [name] => product1
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 1
                                                    [name] => Services
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => NON
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 5
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 103
                            [name] => test test(ratulbinhasan110@gmail.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 173
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [DueDate] => 2025-07-13
                    [TotalAmt] => 5
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 5
                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-14T06:07:29.808-07:00
        )

)

[14-Jul-2025 13:07:30 UTC] Invoice created successfully in QBO. Invoice ID: 657
[14-Jul-2025 13:07:31 UTC] Failed to create payment method: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Invalid Enumeration
                                    [Detail] => Invalid Enumeration : OTHER
                                    [code] => 2170
                                    [element] => Type
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-14T06:07:31.362-07:00
        )

)

[14-Jul-2025 13:07:31 UTC] Creating QBO payment with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 103
        )

    [TotalAmt] => 5
    [TxnDate] => 2025-07-13
    [PaymentRefNum] => stripe_ch_3RkSGSCDiOq
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [PrivateNote] => Stripe Charge: ch_3RkSGSCDiOqgoJOU0CiEQSzd
    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [Amount] => 5
                    [LinkedTxn] => Array
                        (
                            [0] => Array
                                (
                                    [TxnId] => 657
                                    [TxnType] => Invoice
                                )

                        )

                )

        )

)

[14-Jul-2025 13:07:32 UTC] QBO Payment API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Payment] => Array
                (
                    [CustomerRef] => Array
                        (
                            [value] => 103
                            [name] => test test(ratulbinhasan110@gmail.com)
                        )

                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                        )

                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                        )

                    [PaymentRefNum] => stripe_ch_3RkSGSCDiOq
                    [TotalAmt] => 5
                    [UnappliedAmt] => 0
                    [ProcessPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 658
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-14T06:07:32-07:00
                            [LastUpdatedTime] => 2025-07-14T06:07:32-07:00
                        )

                    [TxnDate] => 2025-07-13
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Charge: ch_3RkSGSCDiOqgoJOU0CiEQSzd
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Amount] => 5
                                    [LinkedTxn] => Array
                                        (
                                            [0] => Array
                                                (
                                                    [TxnId] => 657
                                                    [TxnType] => Invoice
                                                )

                                        )

                                    [LineEx] => Array
                                        (
                                            [any] => Array
                                                (
                                                    [0] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnId
                                                                    [Value] => 657
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                    [1] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnOpenBalance
                                                                    [Value] => 5.00
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                    [2] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnReferenceNumber
                                                                    [Value] => 1256
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                )

                                        )

                                )

                        )

                )

            [time] => 2025-07-14T06:07:31.923-07:00
        )

)

[14-Jul-2025 13:07:32 UTC] Payment created successfully in QBO. Payment ID: 658
[14-Jul-2025 13:07:32 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[14-Jul-2025 13:27:48 UTC] Stripe Webhook Received: charge.failed (ID: evt_3RkmQ2CDiOqgoJOU02qlL7rY)
[14-Jul-2025 13:27:48 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[14-Jul-2025 13:37:13 UTC] Stripe Webhook Received: charge.failed (ID: evt_3RkmQ2CDiOqgoJOU02qlL7rY)
[14-Jul-2025 13:37:13 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[14-Jul-2025 13:47:05 UTC] Stripe Webhook Received: charge.failed (ID: evt_3RkmQ2CDiOqgoJOU02qlL7rY)
[14-Jul-2025 13:47:05 UTC] Starting charge.failed processing for event: evt_3RkmQ2CDiOqgoJOU02qlL7rY
[14-Jul-2025 13:47:05 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[14-Jul-2025 13:47:05 UTC] Processing charge ID: ch_3RkmQ2CDiOqgoJOU0DgWbrU2
[14-Jul-2025 13:47:05 UTC] Checking if charge already processed...
[14-Jul-2025 13:47:05 UTC] Getting Stripe and QBO accounts...
[14-Jul-2025 13:47:05 UTC] Extracting customer details from charge...
[14-Jul-2025 13:47:05 UTC] Customer details - Name: yuit trre, Email: ratulbinhasan1d10@gmail.com
[14-Jul-2025 13:47:05 UTC] Finding or creating QBO customer...
[14-Jul-2025 13:47:05 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function find_or_create_qbo_customer() in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-charge-failed-to-qbo-note.php:57
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(64): process_stripe_charge_failed_to_qbo_note()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-charge-failed-to-qbo-note.php on line 57
[14-Jul-2025 13:49:32 UTC] Stripe Webhook Received: charge.failed (ID: evt_3RkmQ2CDiOqgoJOU02qlL7rY)
[14-Jul-2025 13:49:32 UTC] Starting charge.failed processing for event: evt_3RkmQ2CDiOqgoJOU02qlL7rY
[14-Jul-2025 13:49:32 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[14-Jul-2025 13:49:32 UTC] Processing charge ID: ch_3RkmQ2CDiOqgoJOU0DgWbrU2
[14-Jul-2025 13:49:32 UTC] Checking if charge already processed...
[14-Jul-2025 13:49:32 UTC] Getting Stripe and QBO accounts...
[14-Jul-2025 13:49:32 UTC] Extracting customer details from charge...
[14-Jul-2025 13:49:32 UTC] Customer details - Name: yuit trre, Email: ratulbinhasan1d10@gmail.com
[14-Jul-2025 13:49:32 UTC] Finding or creating QBO customer...
[14-Jul-2025 13:49:32 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function find_or_create_qbo_customer() in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-charge-failed-to-qbo-note.php:58
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(64): process_stripe_charge_failed_to_qbo_note()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-charge-failed-to-qbo-note.php on line 58
[14-Jul-2025 14:18:05 UTC] Stripe Webhook Received: charge.failed (ID: evt_3RkmQ2CDiOqgoJOU02qlL7rY)
[14-Jul-2025 14:18:05 UTC] Starting charge.failed processing for event: evt_3RkmQ2CDiOqgoJOU02qlL7rY
[14-Jul-2025 14:18:05 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[14-Jul-2025 14:18:05 UTC] Processing charge ID: ch_3RkmQ2CDiOqgoJOU0DgWbrU2
[14-Jul-2025 14:18:05 UTC] Checking if charge already processed...
[14-Jul-2025 14:18:05 UTC] Getting Stripe and QBO accounts...
[14-Jul-2025 14:18:05 UTC] Extracting customer details from charge...
[14-Jul-2025 14:18:05 UTC] Customer details - Name: yuit trre, Email: ratulbinhasan1d10@gmail.com
[14-Jul-2025 14:18:05 UTC] Finding or creating QBO customer...
[14-Jul-2025 14:18:05 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1752502685888
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[14-Jul-2025 14:18:06 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1752502686069
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[14-Jul-2025 14:18:06 UTC] Error processing charge.failed: Failed to find or create customer
[14-Jul-2025 14:18:06 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[14-Jul-2025 14:19:09 UTC] Stripe Webhook Received: charge.failed (ID: evt_3RkmQ2CDiOqgoJOU02qlL7rY)
[14-Jul-2025 14:19:09 UTC] Starting charge.failed processing for event: evt_3RkmQ2CDiOqgoJOU02qlL7rY
[14-Jul-2025 14:19:09 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[14-Jul-2025 14:19:09 UTC] Processing charge ID: ch_3RkmQ2CDiOqgoJOU0DgWbrU2
[14-Jul-2025 14:19:09 UTC] Checking if charge already processed...
[14-Jul-2025 14:19:09 UTC] Getting Stripe and QBO accounts...
[14-Jul-2025 14:19:09 UTC] Extracting customer details from charge...
[14-Jul-2025 14:19:09 UTC] Customer details - Name: yuit trre, Email: ratulbinhasan1d10@gmail.com
[14-Jul-2025 14:19:09 UTC] Finding or creating QBO customer...
[14-Jul-2025 14:19:10 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                )

            [time] => 2025-07-14T07:19:10.494-07:00
        )

)

[14-Jul-2025 14:19:11 UTC] Using QBO customer ID: 104
[14-Jul-2025 14:19:11 UTC] Preparing note content...
[14-Jul-2025 14:19:11 UTC] Fetching existing customer record...
[14-Jul-2025 14:19:11 UTC] Successfully fetched customer record
[14-Jul-2025 14:19:11 UTC] Preparing customer update...
[14-Jul-2025 14:19:11 UTC] Sending customer update to QBO...
[14-Jul-2025 14:19:12 UTC] Logging charge failure in database...
[14-Jul-2025 14:19:12 UTC] Note update failed. Response: {"code":400,"body":{"Fault":{"Error":[{"Message":"Stale Object Error","Detail":"Stale Object Error : You and Ratul Bin Hasan were working on this at the same time. Ratul Bin Hasan finished before you did, so your work was not saved.","code":"5010","element":""}],"type":"ValidationFault"},"time":"2025-07-14T07:19:11.958-07:00"}}
[14-Jul-2025 14:19:12 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[14-Jul-2025 14:21:21 UTC] Stripe Webhook Received: charge.failed (ID: evt_3RkmQ2CDiOqgoJOU02qlL7rY)
[14-Jul-2025 14:21:21 UTC] Starting charge.failed processing for event: evt_3RkmQ2CDiOqgoJOU02qlL7rY
[14-Jul-2025 14:21:21 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[14-Jul-2025 14:21:21 UTC] Processing charge ID: ch_3RkmQ2CDiOqgoJOU0DgWbrU2
[14-Jul-2025 14:21:21 UTC] Checking if charge already processed...
[14-Jul-2025 14:21:21 UTC] Charge already processed, skipping
[14-Jul-2025 14:23:03 UTC] Stripe Webhook Received: charge.failed (ID: evt_3RkmQ2CDiOqgoJOU02qlL7rY)
[14-Jul-2025 14:23:03 UTC] Starting charge.failed processing for event: evt_3RkmQ2CDiOqgoJOU02qlL7rY
[14-Jul-2025 14:23:03 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[14-Jul-2025 14:23:03 UTC] Processing charge ID: ch_3RkmQ2CDiOqgoJOU0DgWbrU2
[14-Jul-2025 14:23:03 UTC] Checking if charge already processed...
[14-Jul-2025 14:23:03 UTC] Getting Stripe and QBO accounts...
[14-Jul-2025 14:23:03 UTC] Extracting customer details from charge...
[14-Jul-2025 14:23:03 UTC] Customer details - Name: yuit trre, Email: ratulbinhasan1d10@gmail.com
[14-Jul-2025 14:23:03 UTC] Finding or creating QBO customer...
[14-Jul-2025 14:23:04 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 104
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-14T07:19:11-07:00
                                            [LastUpdatedTime] => 2025-07-14T07:19:11-07:00
                                        )

                                    [GivenName] => yuit trre
                                    [FamilyName] => yuit trre
                                    [FullyQualifiedName] => yuit trre
                                    [DisplayName] => yuit trre
                                    [PrintOnCheckName] => yuit trre yuit trre
                                    [Active] => 1
                                    [V4IDPseudonym] => 00209855e73eee462a43f5bbb02c3411505554
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratulbinhasan1d10@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-14T07:23:04.308-07:00
        )

)

[14-Jul-2025 14:23:04 UTC] Using QBO customer ID: 104
[14-Jul-2025 14:23:04 UTC] Preparing note content...
[14-Jul-2025 14:23:04 UTC] Fetching existing customer record...
[14-Jul-2025 14:23:04 UTC] Successfully fetched customer record
[14-Jul-2025 14:23:04 UTC] Preparing customer update...
[14-Jul-2025 14:23:04 UTC] Sending customer update to QBO...
[14-Jul-2025 14:23:05 UTC] Logging charge failure in database...
[14-Jul-2025 14:23:05 UTC] Note update failed. Response: {"code":400,"body":{"Fault":{"Error":[{"Message":"Stale Object Error","Detail":"Stale Object Error : You and Ratul Bin Hasan were working on this at the same time. Ratul Bin Hasan finished before you did, so your work was not saved.","code":"5010","element":""}],"type":"ValidationFault"},"time":"2025-07-14T07:23:05.199-07:00"}}
[14-Jul-2025 14:23:05 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[14-Jul-2025 15:34:13 UTC] Stripe Webhook Received: refund.created (ID: evt_3RjkcnCDiOqgoJOU0Uid5sxh)
[14-Jul-2025 15:34:13 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[14-Jul-2025 15:38:20 UTC] Stripe Webhook Received: refund.created (ID: evt_3RjkcnCDiOqgoJOU0Uid5sxh)
[14-Jul-2025 15:38:20 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[14-Jul-2025 15:48:27 UTC] Stripe Webhook Received: refund.created (ID: evt_3RjkcnCDiOqgoJOU0Uid5sxh)
[14-Jul-2025 15:48:27 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[14-Jul-2025 15:48:27 UTC] Starting refund receipt creation process for event: evt_3RjkcnCDiOqgoJOU0Uid5sxh
[14-Jul-2025 15:48:27 UTC] Refund receipt creation failed: No charge found in payment intent
[14-Jul-2025 15:57:49 UTC] Stripe Webhook Received: refund.created (ID: evt_3RjkcnCDiOqgoJOU0Uid5sxh)
[14-Jul-2025 15:57:49 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[14-Jul-2025 15:57:49 UTC] Starting refund receipt creation process for event: evt_3RjkcnCDiOqgoJOU0Uid5sxh
[14-Jul-2025 15:57:49 UTC] Refund details:
[14-Jul-2025 15:57:49 UTC]  - ID: re_3RjkcnCDiOqgoJOU0RQpkvda
[14-Jul-2025 15:57:49 UTC]  - Amount: 183.15
[14-Jul-2025 15:57:49 UTC]  - Currency: USD
[14-Jul-2025 15:57:49 UTC]  - Charge ID: ch_3RjkcnCDiOqgoJOU0KxD8HfP
[14-Jul-2025 15:57:49 UTC]  - Payment Intent ID: pi_3RjkcnCDiOqgoJOU04KzaIsc
[14-Jul-2025 15:57:49 UTC] Accounts verified successfully
[14-Jul-2025 15:57:49 UTC] Fetching charge details for ID: ch_3RjkcnCDiOqgoJOU0KxD8HfP
[14-Jul-2025 15:57:50 UTC] Successfully retrieved charge details
[14-Jul-2025 15:57:50 UTC] Charge retrieved directly from charge ID
[14-Jul-2025 15:57:50 UTC] Customer details:
[14-Jul-2025 15:57:50 UTC]  - Name: 
[14-Jul-2025 15:57:50 UTC]  - Email: 
[14-Jul-2025 15:57:50 UTC] Refund receipt creation failed: Customer email is required but missing
[14-Jul-2025 15:57:50 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-refund-created-to-qbo-refund-receipt.php:226
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(71): process_stripe_refund_created_to_qbo_refund_receipt()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-refund-created-to-qbo-refund-receipt.php on line 226
[14-Jul-2025 16:11:46 UTC] Stripe Webhook Received: refund.created (ID: evt_3RjkcnCDiOqgoJOU0Uid5sxh)
[14-Jul-2025 16:11:46 UTC] PHP Fatal error:  Cannot redeclare get_stripe_customer() (previously declared in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php:79) in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-refund-created-to-qbo-refund-receipt.php on line 279
[14-Jul-2025 16:16:42 UTC] Stripe Webhook Received: refund.created (ID: evt_3RjkcnCDiOqgoJOU0Uid5sxh)
[14-Jul-2025 16:16:42 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[14-Jul-2025 16:16:42 UTC] Starting refund receipt creation process for event: evt_3RjkcnCDiOqgoJOU0Uid5sxh
[14-Jul-2025 16:16:42 UTC] Refund details:
[14-Jul-2025 16:16:42 UTC]  - ID: re_3RjkcnCDiOqgoJOU0RQpkvda
[14-Jul-2025 16:16:42 UTC]  - Amount: 183.15
[14-Jul-2025 16:16:42 UTC]  - Currency: USD
[14-Jul-2025 16:16:42 UTC]  - Charge ID: ch_3RjkcnCDiOqgoJOU0KxD8HfP
[14-Jul-2025 16:16:42 UTC]  - Payment Intent ID: pi_3RjkcnCDiOqgoJOU04KzaIsc
[14-Jul-2025 16:16:42 UTC] Accounts verified successfully
[14-Jul-2025 16:16:42 UTC] Fetching payment intent details for ID: pi_3RjkcnCDiOqgoJOU04KzaIsc
[14-Jul-2025 16:16:43 UTC] Successfully retrieved payment intent details
[14-Jul-2025 16:16:43 UTC] Payment intent retrieved successfully
[14-Jul-2025 16:16:43 UTC] Fetching customer details for ID: cus_SYxhIfsEqHRWWB
[14-Jul-2025 16:16:43 UTC] Fetching Stripe customer: cus_SYxhIfsEqHRWWB
[14-Jul-2025 16:16:43 UTC] Customer details from Stripe:
[14-Jul-2025 16:16:43 UTC]  - Name: testt
[14-Jul-2025 16:16:43 UTC]  - Email: test@fsdf.fg
[14-Jul-2025 16:16:43 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function find_or_create_qbo_customer() in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-refund-created-to-qbo-refund-receipt.php:103
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(71): process_stripe_refund_created_to_qbo_refund_receipt()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-refund-created-to-qbo-refund-receipt.php on line 103
[14-Jul-2025 16:20:20 UTC] Stripe Webhook Received: refund.created (ID: evt_3RjkcnCDiOqgoJOU0Uid5sxh)
[14-Jul-2025 16:20:20 UTC] PHP Fatal error:  Cannot redeclare get_stripe_customer() (previously declared in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php:79) in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-refund-created-to-qbo-refund-receipt.php on line 281
[14-Jul-2025 16:42:10 UTC] Stripe Webhook Received: refund.created (ID: evt_3RjkcnCDiOqgoJOU0Uid5sxh)
[14-Jul-2025 16:42:10 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[14-Jul-2025 16:42:10 UTC] Starting refund receipt creation process for event: evt_3RjkcnCDiOqgoJOU0Uid5sxh
[14-Jul-2025 16:42:10 UTC] Refund details:
[14-Jul-2025 16:42:10 UTC]  - ID: re_3RjkcnCDiOqgoJOU0RQpkvda
[14-Jul-2025 16:42:10 UTC]  - Amount: 183.15
[14-Jul-2025 16:42:10 UTC]  - Currency: USD
[14-Jul-2025 16:42:10 UTC]  - Charge ID: ch_3RjkcnCDiOqgoJOU0KxD8HfP
[14-Jul-2025 16:42:10 UTC]  - Payment Intent ID: pi_3RjkcnCDiOqgoJOU04KzaIsc
[14-Jul-2025 16:42:10 UTC] Accounts verified successfully
[14-Jul-2025 16:42:10 UTC] Fetching payment intent details for ID: pi_3RjkcnCDiOqgoJOU04KzaIsc
[14-Jul-2025 16:42:10 UTC] Successfully retrieved payment intent details
[14-Jul-2025 16:42:10 UTC] Payment intent retrieved successfully
[14-Jul-2025 16:42:10 UTC] Fetching customer details for ID: cus_SYxhIfsEqHRWWB
[14-Jul-2025 16:42:10 UTC] Fetching Stripe customer: cus_SYxhIfsEqHRWWB
[14-Jul-2025 16:42:11 UTC] Customer details from Stripe:
[14-Jul-2025 16:42:11 UTC]  - Name: testt
[14-Jul-2025 16:42:11 UTC]  - Email: test@fsdf.fg
[14-Jul-2025 16:42:11 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1752511331379
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[14-Jul-2025 16:42:11 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1752511331566
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[14-Jul-2025 16:42:11 UTC] Refund receipt creation failed: Failed to find or create customer in QuickBooks
[14-Jul-2025 16:42:11 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-refund-created-to-qbo-refund-receipt.php:249
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(71): process_stripe_refund_created_to_qbo_refund_receipt()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-refund-created-to-qbo-refund-receipt.php on line 249
[14-Jul-2025 16:43:07 UTC] Stripe Webhook Received: refund.created (ID: evt_3RjkcnCDiOqgoJOU0Uid5sxh)
[14-Jul-2025 16:43:07 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[14-Jul-2025 16:43:07 UTC] Starting refund receipt creation process for event: evt_3RjkcnCDiOqgoJOU0Uid5sxh
[14-Jul-2025 16:43:07 UTC] Refund details:
[14-Jul-2025 16:43:07 UTC]  - ID: re_3RjkcnCDiOqgoJOU0RQpkvda
[14-Jul-2025 16:43:07 UTC]  - Amount: 183.15
[14-Jul-2025 16:43:07 UTC]  - Currency: USD
[14-Jul-2025 16:43:07 UTC]  - Charge ID: ch_3RjkcnCDiOqgoJOU0KxD8HfP
[14-Jul-2025 16:43:07 UTC]  - Payment Intent ID: pi_3RjkcnCDiOqgoJOU04KzaIsc
[14-Jul-2025 16:43:07 UTC] Accounts verified successfully
[14-Jul-2025 16:43:07 UTC] Fetching payment intent details for ID: pi_3RjkcnCDiOqgoJOU04KzaIsc
[14-Jul-2025 16:43:07 UTC] Successfully retrieved payment intent details
[14-Jul-2025 16:43:07 UTC] Payment intent retrieved successfully
[14-Jul-2025 16:43:07 UTC] Fetching customer details for ID: cus_SYxhIfsEqHRWWB
[14-Jul-2025 16:43:07 UTC] Fetching Stripe customer: cus_SYxhIfsEqHRWWB
[14-Jul-2025 16:43:08 UTC] Customer details from Stripe:
[14-Jul-2025 16:43:08 UTC]  - Name: testt
[14-Jul-2025 16:43:08 UTC]  - Email: test@fsdf.fg
[14-Jul-2025 16:43:09 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 225.05
                                    [BalanceWithJobs] => 225.05
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 101
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-10T06:03:19-07:00
                                            [LastUpdatedTime] => 2025-07-14T06:10:34-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt
                                    [DisplayName] => testt
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098e066dfbe82b54d139d83565e5f664ced
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                )

                            [1] => Array
                                (
                                    [Taxable] => 1
                                    [BillAddr] => Array
                                        (
                                            [Id] => 141
                                        )

                                    [ShipAddr] => Array
                                        (
                                            [Id] => 141
                                        )

                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 99
                                    [SyncToken] => 1
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-10T01:36:59-07:00
                                            [LastUpdatedTime] => 2025-07-10T06:02:55-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testtqq
                                    [DisplayName] => testtqq
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020981d6681610c5f4203ac7c35187bf645d0
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                    [DefaultTaxCodeRef] => Array
                                        (
                                            [value] => 2
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 2
                )

            [time] => 2025-07-14T09:43:09.122-07:00
        )

)

[14-Jul-2025 16:43:09 UTC] Using QBO customer ID: 101
[14-Jul-2025 16:43:09 UTC] Fetching checkout session for payment intent: pi_3RjkcnCDiOqgoJOU04KzaIsc
[14-Jul-2025 16:43:09 UTC] No Checkout Session found for Payment Intent
[14-Jul-2025 16:43:09 UTC] No line items found from checkout session, using default line item
[14-Jul-2025 16:43:09 UTC] Using product name: Payment for Invoice
[14-Jul-2025 16:43:10 UTC] Using payment method: affirm (QBO ID: 1)
[14-Jul-2025 16:43:10 UTC] Prepared refund receipt data:
[14-Jul-2025 16:43:10 UTC] Array
(
    [CustomerRef] => Array
        (
            [value] => 101
        )

    [TotalAmt] => 183.15
    [TxnDate] => 2025-07-14
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [PaymentRefNum] => re_3RjkcnCDiOqgoJOU0RQpkvda
    [PrivateNote] => Stripe Refund for Charge: ch_3RjkcnCDiOqgoJOU0KxD8HfP (Payment Intent: pi_3RjkcnCDiOqgoJOU04KzaIsc)
    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 183.15
                    [Description] => Payment for Invoice
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 27
                                )

                            [UnitPrice] => 183.15
                            [Qty] => 1
                        )

                )

        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

)

[14-Jul-2025 16:43:11 UTC] QBO API response:
[14-Jul-2025 16:43:11 UTC] Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Required param missing, need to supply the required value for the API
                                    [Detail] => Required parameter DepositToAccountRef is missing in the request
                                    [code] => 2020
                                    [element] => DepositToAccountRef
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-14T09:43:11.262-07:00
        )

)

[14-Jul-2025 16:43:11 UTC] Refund receipt creation failed: Failed to create refund receipt in QuickBooks
[14-Jul-2025 16:43:11 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[14-Jul-2025 17:59:25 UTC] Stripe Webhook Received: refund.created (ID: evt_3RjkcnCDiOqgoJOU0Uid5sxh)
[14-Jul-2025 17:59:25 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[14-Jul-2025 17:59:25 UTC] Starting refund receipt creation process for event: evt_3RjkcnCDiOqgoJOU0Uid5sxh
[14-Jul-2025 17:59:25 UTC] Refund details:
[14-Jul-2025 17:59:25 UTC]  - ID: re_3RjkcnCDiOqgoJOU0RQpkvda
[14-Jul-2025 17:59:25 UTC]  - Amount: 183.15
[14-Jul-2025 17:59:25 UTC]  - Currency: USD
[14-Jul-2025 17:59:25 UTC]  - Charge ID: ch_3RjkcnCDiOqgoJOU0KxD8HfP
[14-Jul-2025 17:59:25 UTC]  - Payment Intent ID: pi_3RjkcnCDiOqgoJOU04KzaIsc
[14-Jul-2025 17:59:25 UTC] Accounts verified successfully
[14-Jul-2025 17:59:25 UTC] Fetching payment intent details for ID: pi_3RjkcnCDiOqgoJOU04KzaIsc
[14-Jul-2025 17:59:25 UTC] Successfully retrieved payment intent details
[14-Jul-2025 17:59:25 UTC] Payment intent retrieved successfully
[14-Jul-2025 17:59:25 UTC] Fetching charge details for ID: ch_3RjkcnCDiOqgoJOU0KxD8HfP
[14-Jul-2025 17:59:25 UTC] Successfully retrieved charge details
[14-Jul-2025 17:59:25 UTC] Fetching customer details for ID: cus_SYxhIfsEqHRWWB
[14-Jul-2025 17:59:25 UTC] Fetching Stripe customer: cus_SYxhIfsEqHRWWB
[14-Jul-2025 17:59:26 UTC] Customer details from Stripe:
[14-Jul-2025 17:59:26 UTC]  - Name: testt
[14-Jul-2025 17:59:26 UTC]  - Email: test@fsdf.fg
[14-Jul-2025 17:59:27 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 225.05
                                    [BalanceWithJobs] => 225.05
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 101
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-10T06:03:19-07:00
                                            [LastUpdatedTime] => 2025-07-14T06:10:34-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt
                                    [DisplayName] => testt
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098e066dfbe82b54d139d83565e5f664ced
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                )

                            [1] => Array
                                (
                                    [Taxable] => 1
                                    [BillAddr] => Array
                                        (
                                            [Id] => 141
                                        )

                                    [ShipAddr] => Array
                                        (
                                            [Id] => 141
                                        )

                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 99
                                    [SyncToken] => 1
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-10T01:36:59-07:00
                                            [LastUpdatedTime] => 2025-07-10T06:02:55-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testtqq
                                    [DisplayName] => testtqq
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020981d6681610c5f4203ac7c35187bf645d0
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                    [DefaultTaxCodeRef] => Array
                                        (
                                            [value] => 2
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 2
                )

            [time] => 2025-07-14T10:59:27.016-07:00
        )

)

[14-Jul-2025 17:59:27 UTC] Using QBO customer ID: 101
[14-Jul-2025 17:59:27 UTC] Fetching checkout session for payment intent: pi_3RjkcnCDiOqgoJOU04KzaIsc
[14-Jul-2025 17:59:27 UTC] No Checkout Session found for Payment Intent
[14-Jul-2025 17:59:27 UTC] No checkout session found, trying to get invoice line items for invoice ID: in_1Rjka2CDiOqgoJOUHTKqZegC
[14-Jul-2025 17:59:27 UTC] Fetching invoice details for ID: in_1Rjka2CDiOqgoJOUHTKqZegC
[14-Jul-2025 17:59:27 UTC] Successfully retrieved invoice details
[14-Jul-2025 17:59:27 UTC] Found 1 line items in invoice
[14-Jul-2025 17:59:27 UTC] Processing invoice line item:
[14-Jul-2025 17:59:27 UTC]  - Product: product1
[14-Jul-2025 17:59:27 UTC]  - Amount: 165
[14-Jul-2025 17:59:27 UTC]  - Quantity: 33
[14-Jul-2025 17:59:28 UTC] Using payment method: card (QBO ID: 1)
[14-Jul-2025 17:59:28 UTC] Prepared refund receipt data:
[14-Jul-2025 17:59:28 UTC] Array
(
    [CustomerRef] => Array
        (
            [value] => 101
        )

    [TotalAmt] => 183.15
    [TxnDate] => 2025-07-14
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [PaymentRefNum] => re_3RjkcnCDiOqgoJOU0RQpkvda
    [PrivateNote] => Stripe Refund for Charge: ch_3RjkcnCDiOqgoJOU0KxD8HfP (Payment Intent: pi_3RjkcnCDiOqgoJOU04KzaIsc)
    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 165
                    [Description] => product1
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 25
                                )

                            [UnitPrice] => 5
                            [Qty] => 33
                        )

                )

        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

)

[14-Jul-2025 17:59:28 UTC] QBO API response:
[14-Jul-2025 17:59:28 UTC] Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Required param missing, need to supply the required value for the API
                                    [Detail] => Required parameter DepositToAccountRef is missing in the request
                                    [code] => 2020
                                    [element] => DepositToAccountRef
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-14T10:59:28.781-07:00
        )

)

[14-Jul-2025 17:59:28 UTC] Refund receipt creation failed: Failed to create refund receipt in QuickBooks
[14-Jul-2025 17:59:28 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[14-Jul-2025 18:39:09 UTC] Stripe Webhook Received: refund.created (ID: evt_3RjkcnCDiOqgoJOU0Uid5sxh)
[14-Jul-2025 18:39:09 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[14-Jul-2025 18:39:09 UTC] Starting refund receipt creation process for event: evt_3RjkcnCDiOqgoJOU0Uid5sxh
[14-Jul-2025 18:39:09 UTC] Refund details:
[14-Jul-2025 18:39:09 UTC]  - ID: re_3RjkcnCDiOqgoJOU0RQpkvda
[14-Jul-2025 18:39:09 UTC]  - Amount: 183.15
[14-Jul-2025 18:39:09 UTC]  - Currency: USD
[14-Jul-2025 18:39:09 UTC]  - Charge ID: ch_3RjkcnCDiOqgoJOU0KxD8HfP
[14-Jul-2025 18:39:09 UTC]  - Payment Intent ID: pi_3RjkcnCDiOqgoJOU04KzaIsc
[14-Jul-2025 18:39:09 UTC] Accounts verified successfully
[14-Jul-2025 18:39:09 UTC] Fetching payment intent details for ID: pi_3RjkcnCDiOqgoJOU04KzaIsc
[14-Jul-2025 18:39:09 UTC] Successfully retrieved payment intent details
[14-Jul-2025 18:39:09 UTC] Payment intent retrieved successfully
[14-Jul-2025 18:39:09 UTC] Fetching charge details for ID: ch_3RjkcnCDiOqgoJOU0KxD8HfP
[14-Jul-2025 18:39:09 UTC] Successfully retrieved charge details
[14-Jul-2025 18:39:09 UTC] Fetching customer details for ID: cus_SYxhIfsEqHRWWB
[14-Jul-2025 18:39:09 UTC] Fetching Stripe customer: cus_SYxhIfsEqHRWWB
[14-Jul-2025 18:39:10 UTC] Customer details from Stripe:
[14-Jul-2025 18:39:10 UTC]  - Name: testt
[14-Jul-2025 18:39:10 UTC]  - Email: test@fsdf.fg
[14-Jul-2025 18:39:11 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 225.05
                                    [BalanceWithJobs] => 225.05
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 101
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-10T06:03:19-07:00
                                            [LastUpdatedTime] => 2025-07-14T06:10:34-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt
                                    [DisplayName] => testt
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098e066dfbe82b54d139d83565e5f664ced
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                )

                            [1] => Array
                                (
                                    [Taxable] => 1
                                    [BillAddr] => Array
                                        (
                                            [Id] => 141
                                        )

                                    [ShipAddr] => Array
                                        (
                                            [Id] => 141
                                        )

                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 99
                                    [SyncToken] => 1
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-10T01:36:59-07:00
                                            [LastUpdatedTime] => 2025-07-10T06:02:55-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testtqq
                                    [DisplayName] => testtqq
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020981d6681610c5f4203ac7c35187bf645d0
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                    [DefaultTaxCodeRef] => Array
                                        (
                                            [value] => 2
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 2
                )

            [time] => 2025-07-14T11:39:10.883-07:00
        )

)

[14-Jul-2025 18:39:11 UTC] Using QBO customer ID: 101
[14-Jul-2025 18:39:11 UTC] Fetching checkout session for payment intent: pi_3RjkcnCDiOqgoJOU04KzaIsc
[14-Jul-2025 18:39:11 UTC] No Checkout Session found for Payment Intent
[14-Jul-2025 18:39:11 UTC] No checkout session found, trying to get invoice line items for invoice ID: in_1Rjka2CDiOqgoJOUHTKqZegC
[14-Jul-2025 18:39:11 UTC] Fetching invoice details for ID: in_1Rjka2CDiOqgoJOUHTKqZegC
[14-Jul-2025 18:39:11 UTC] Successfully retrieved invoice details
[14-Jul-2025 18:39:11 UTC] Found 1 line items in invoice
[14-Jul-2025 18:39:11 UTC] Processing invoice line item:
[14-Jul-2025 18:39:11 UTC]  - Product: product1
[14-Jul-2025 18:39:11 UTC]  - Amount: 165
[14-Jul-2025 18:39:11 UTC]  - Quantity: 33
[14-Jul-2025 18:39:12 UTC] Using payment method: card (QBO ID: 1)
[14-Jul-2025 18:39:12 UTC] Using deposit account ID: 4
[14-Jul-2025 18:39:12 UTC] Prepared refund receipt data:
[14-Jul-2025 18:39:12 UTC] Array
(
    [CustomerRef] => Array
        (
            [value] => 101
        )

    [TotalAmt] => 183.15
    [TxnDate] => 2025-07-14
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [PaymentRefNum] => re_3RjkcnCDiOqgoJOU0RQpkvda
    [PrivateNote] => Stripe Refund for Charge: ch_3RjkcnCDiOqgoJOU0KxD8HfP (Payment Intent: pi_3RjkcnCDiOqgoJOU04KzaIsc)
    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 165
                    [Description] => product1
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 25
                                )

                            [UnitPrice] => 5
                            [Qty] => 33
                        )

                )

        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[14-Jul-2025 18:39:13 UTC] QBO API response:
[14-Jul-2025 18:39:13 UTC] Array
(
    [code] => 200
    [body] => Array
        (
            [RefundReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 660
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-14T11:39:13-07:00
                            [LastUpdatedTime] => 2025-07-14T11:39:13-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1257
                    [TxnDate] => 2025-07-14
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Refund for Charge: ch_3RjkcnCDiOqgoJOU0KxD8HfP (Payment Intent: pi_3RjkcnCDiOqgoJOU04KzaIsc)
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => product1
                                    [Amount] => 165
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 25
                                                    [name] => product1
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 33
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 1
                                                    [name] => Services
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => NON
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 165
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 101
                            [name] => testt
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 175
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 165
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-14T11:39:13.072-07:00
        )

)

[14-Jul-2025 18:39:13 UTC] Refund receipt created successfully in QBO. Refund Receipt ID: 660
[14-Jul-2025 18:39:13 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[15-Jul-2025 08:29:32 UTC] Stripe Webhook Received: refund.created (ID: evt_3RjLqZCDiOqgoJOU0PYvDpcZ)
[15-Jul-2025 08:29:32 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[15-Jul-2025 08:29:32 UTC] Starting refund receipt creation process for event: evt_3RjLqZCDiOqgoJOU0PYvDpcZ
[15-Jul-2025 08:29:32 UTC] Refund details:
[15-Jul-2025 08:29:32 UTC]  - ID: re_3RjLqZCDiOqgoJOU0iGffENL
[15-Jul-2025 08:29:32 UTC]  - Amount: 20.11
[15-Jul-2025 08:29:32 UTC]  - Currency: USD
[15-Jul-2025 08:29:32 UTC]  - Charge ID: ch_3RjLqZCDiOqgoJOU0ayReX2y
[15-Jul-2025 08:29:32 UTC]  - Payment Intent ID: pi_3RjLqZCDiOqgoJOU0Bhclz9u
[15-Jul-2025 08:29:32 UTC] Accounts verified successfully
[15-Jul-2025 08:29:32 UTC] Fetching payment intent details for ID: pi_3RjLqZCDiOqgoJOU0Bhclz9u
[15-Jul-2025 08:29:32 UTC] Successfully retrieved payment intent details
[15-Jul-2025 08:29:32 UTC] Payment intent retrieved successfully
[15-Jul-2025 08:29:32 UTC] Fetching charge details for ID: ch_3RjLqZCDiOqgoJOU0ayReX2y
[15-Jul-2025 08:29:32 UTC] Successfully retrieved charge details
[15-Jul-2025 08:29:32 UTC] Fetching customer details for ID: cus_SYxhIfsEqHRWWB
[15-Jul-2025 08:29:32 UTC] Fetching Stripe customer: cus_SYxhIfsEqHRWWB
[15-Jul-2025 08:29:32 UTC] Customer details from Stripe:
[15-Jul-2025 08:29:32 UTC]  - Name: testt
[15-Jul-2025 08:29:32 UTC]  - Email: test@fsdf.fg
[15-Jul-2025 08:29:33 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 225.05
                                    [BalanceWithJobs] => 225.05
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 101
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-10T06:03:19-07:00
                                            [LastUpdatedTime] => 2025-07-14T06:10:34-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt
                                    [DisplayName] => testt
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098e066dfbe82b54d139d83565e5f664ced
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                )

                            [1] => Array
                                (
                                    [Taxable] => 1
                                    [BillAddr] => Array
                                        (
                                            [Id] => 141
                                        )

                                    [ShipAddr] => Array
                                        (
                                            [Id] => 141
                                        )

                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 99
                                    [SyncToken] => 1
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-10T01:36:59-07:00
                                            [LastUpdatedTime] => 2025-07-10T06:02:55-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testtqq
                                    [DisplayName] => testtqq
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020981d6681610c5f4203ac7c35187bf645d0
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                    [DefaultTaxCodeRef] => Array
                                        (
                                            [value] => 2
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 2
                )

            [time] => 2025-07-15T01:29:33.742-07:00
        )

)

[15-Jul-2025 08:29:33 UTC] Using QBO customer ID: 101
[15-Jul-2025 08:29:33 UTC] Fetching checkout session for payment intent: pi_3RjLqZCDiOqgoJOU0Bhclz9u
[15-Jul-2025 08:29:34 UTC] No Checkout Session found for Payment Intent
[15-Jul-2025 08:29:34 UTC] No checkout session found, trying to get invoice line items for invoice ID: in_1RjLofCDiOqgoJOUCe5KDXLD
[15-Jul-2025 08:29:34 UTC] Fetching invoice details for ID: in_1RjLofCDiOqgoJOUCe5KDXLD
[15-Jul-2025 08:29:34 UTC] Successfully retrieved invoice details
[15-Jul-2025 08:29:34 UTC] Found 1 line items in invoice
[15-Jul-2025 08:29:34 UTC] Processing invoice line item:
[15-Jul-2025 08:29:34 UTC]  - Product: product1
[15-Jul-2025 08:29:34 UTC]  - Amount: 20
[15-Jul-2025 08:29:34 UTC]  - Quantity: 4
[15-Jul-2025 08:29:35 UTC] Using payment method: card (QBO ID: 1)
[15-Jul-2025 08:29:35 UTC] Using deposit account ID: 4
[15-Jul-2025 08:29:35 UTC] Prepared refund receipt data:
[15-Jul-2025 08:29:35 UTC] Array
(
    [CustomerRef] => Array
        (
            [value] => 101
        )

    [TotalAmt] => 20.11
    [TxnDate] => 2025-07-15
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [PaymentRefNum] => re_3RjLqZCDiOqgoJOU0iGffENL
    [PrivateNote] => Stripe Refund for Charge: ch_3RjLqZCDiOqgoJOU0ayReX2y (Payment Intent: pi_3RjLqZCDiOqgoJOU0Bhclz9u)
    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 20
                    [Description] => product1
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 25
                                )

                            [UnitPrice] => 5
                            [Qty] => 4
                        )

                )

        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[15-Jul-2025 08:29:36 UTC] QBO API response:
[15-Jul-2025 08:29:36 UTC] Array
(
    [code] => 200
    [body] => Array
        (
            [RefundReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 661
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-15T01:29:36-07:00
                            [LastUpdatedTime] => 2025-07-15T01:29:36-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1258
                    [TxnDate] => 2025-07-15
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Refund for Charge: ch_3RjLqZCDiOqgoJOU0ayReX2y (Payment Intent: pi_3RjLqZCDiOqgoJOU0Bhclz9u)
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => product1
                                    [Amount] => 20
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 25
                                                    [name] => product1
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 4
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 1
                                                    [name] => Services
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => NON
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 20
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 101
                            [name] => testt
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 176
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 20
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-15T01:29:35.695-07:00
        )

)

[15-Jul-2025 08:29:36 UTC] Refund receipt created successfully in QBO. Refund Receipt ID: 661
[15-Jul-2025 08:29:36 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[15-Jul-2025 17:53:46 UTC] Stripe Webhook Received: refund.created (ID: evt_3RjLqZCDiOqgoJOU0PYvDpcZ)
[15-Jul-2025 17:53:46 UTC] PHP Fatal error:  Cannot redeclare get_stripe_customer() (previously declared in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php:79) in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-refund-created-to-qbo-refund-receipt.php on line 406
[15-Jul-2025 17:58:04 UTC] Stripe Webhook Received: refund.created (ID: evt_3RjLqZCDiOqgoJOU0PYvDpcZ)
[15-Jul-2025 17:58:04 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[15-Jul-2025 17:58:04 UTC] Starting refund receipt creation process for event: evt_3RjLqZCDiOqgoJOU0PYvDpcZ
[15-Jul-2025 17:58:04 UTC] Refund details:
[15-Jul-2025 17:58:04 UTC]  - ID: re_3RjLqZCDiOqgoJOU0iGffENL
[15-Jul-2025 17:58:04 UTC]  - Amount: 20.11
[15-Jul-2025 17:58:04 UTC]  - Currency: USD
[15-Jul-2025 17:58:04 UTC]  - Charge ID: ch_3RjLqZCDiOqgoJOU0ayReX2y
[15-Jul-2025 17:58:04 UTC]  - Payment Intent ID: pi_3RjLqZCDiOqgoJOU0Bhclz9u
[15-Jul-2025 17:58:04 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[15-Jul-2025 17:58:04 UTC] Refund already processed. QBO Refund Receipt ID: 661
[15-Jul-2025 18:13:39 UTC] Stripe Webhook Received: refund.created (ID: evt_3RjLqZCDiOqgoJOU0PYvDpcZ)
[15-Jul-2025 18:13:39 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[15-Jul-2025 18:13:39 UTC] Starting refund receipt creation process for event: evt_3RjLqZCDiOqgoJOU0PYvDpcZ
[15-Jul-2025 18:13:39 UTC] Refund details:
[15-Jul-2025 18:13:39 UTC]  - ID: re_3RjLqZCDiOqgoJOU0iGffENL
[15-Jul-2025 18:13:39 UTC]  - Amount: 20.11
[15-Jul-2025 18:13:39 UTC]  - Currency: USD
[15-Jul-2025 18:13:39 UTC]  - Charge ID: ch_3RjLqZCDiOqgoJOU0ayReX2y
[15-Jul-2025 18:13:39 UTC]  - Payment Intent ID: pi_3RjLqZCDiOqgoJOU0Bhclz9u
[15-Jul-2025 18:13:39 UTC] Accounts verified successfully
[15-Jul-2025 18:13:39 UTC] Fetching payment intent details for ID: pi_3RjLqZCDiOqgoJOU0Bhclz9u
[15-Jul-2025 18:13:39 UTC] Successfully retrieved payment intent details
[15-Jul-2025 18:13:39 UTC] Payment intent retrieved successfully
[15-Jul-2025 18:13:39 UTC] Fetching charge details for ID: ch_3RjLqZCDiOqgoJOU0ayReX2y
[15-Jul-2025 18:13:40 UTC] Successfully retrieved charge details
[15-Jul-2025 18:13:40 UTC] Fetching customer details for ID: cus_SYxhIfsEqHRWWB
[15-Jul-2025 18:13:40 UTC] Fetching Stripe customer: cus_SYxhIfsEqHRWWB
[15-Jul-2025 18:13:40 UTC] Customer details from Stripe:
[15-Jul-2025 18:13:40 UTC]  - Name: testt
[15-Jul-2025 18:13:40 UTC]  - Email: test@fsdf.fg
[15-Jul-2025 18:13:41 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 225.05
                                    [BalanceWithJobs] => 225.05
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 101
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-10T06:03:19-07:00
                                            [LastUpdatedTime] => 2025-07-14T06:10:34-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt
                                    [DisplayName] => testt
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098e066dfbe82b54d139d83565e5f664ced
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                )

                            [1] => Array
                                (
                                    [Taxable] => 1
                                    [BillAddr] => Array
                                        (
                                            [Id] => 141
                                        )

                                    [ShipAddr] => Array
                                        (
                                            [Id] => 141
                                        )

                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 99
                                    [SyncToken] => 1
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-10T01:36:59-07:00
                                            [LastUpdatedTime] => 2025-07-10T06:02:55-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testtqq
                                    [DisplayName] => testtqq
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020981d6681610c5f4203ac7c35187bf645d0
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                    [DefaultTaxCodeRef] => Array
                                        (
                                            [value] => 2
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 2
                )

            [time] => 2025-07-15T11:13:41.261-07:00
        )

)

[15-Jul-2025 18:13:41 UTC] Using QBO customer ID: 101
[15-Jul-2025 18:13:42 UTC] Using simple refund line item with product: Refund
[15-Jul-2025 18:13:42 UTC] Using payment method: card (QBO ID: 1)
[15-Jul-2025 18:13:43 UTC] Using deposit account ID: 4
[15-Jul-2025 18:13:43 UTC] Prepared refund receipt data:
[15-Jul-2025 18:13:43 UTC] Array
(
    [CustomerRef] => Array
        (
            [value] => 101
        )

    [TotalAmt] => 20.11
    [TxnDate] => 2025-07-15
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [PaymentRefNum] => re_3RjLqZCDiOqgoJOU0iGffENL
    [PrivateNote] => Stripe Refund for Charge: ch_3RjLqZCDiOqgoJOU0ayReX2y (Payment Intent: pi_3RjLqZCDiOqgoJOU0Bhclz9u)
    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 20.11
                    [Description] => Refund
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 28
                                )

                            [UnitPrice] => 20.11
                            [Qty] => 1
                        )

                )

        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[15-Jul-2025 18:13:44 UTC] QBO API response:
[15-Jul-2025 18:13:44 UTC] Array
(
    [code] => 200
    [body] => Array
        (
            [RefundReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 662
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-15T11:13:44-07:00
                            [LastUpdatedTime] => 2025-07-15T11:13:44-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1259
                    [TxnDate] => 2025-07-15
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Refund for Charge: ch_3RjLqZCDiOqgoJOU0ayReX2y (Payment Intent: pi_3RjLqZCDiOqgoJOU0Bhclz9u)
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => Refund
                                    [Amount] => 20.11
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 28
                                                    [name] => Refund
                                                )

                                            [UnitPrice] => 20.11
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => NON
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 20.11
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 101
                            [name] => testt
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 177
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 20.11
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-15T11:13:43.528-07:00
        )

)

[15-Jul-2025 18:13:44 UTC] Refund receipt created successfully in QBO. Refund Receipt ID: 662
[15-Jul-2025 18:13:44 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[16-Jul-2025 05:21:32 UTC] Stripe Webhook Received: credit_note.created (ID: evt_1RlNmZCDiOqgoJOU8rSLa8fN)
[16-Jul-2025 05:21:32 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[16-Jul-2025 05:21:32 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function fetch_stripe_invoice() in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-credit-note-created-to-qbo-credit-memo.php:30
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(78): process_stripe_credit_note_created_to_qbo_credit_memo()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-credit-note-created-to-qbo-credit-memo.php on line 30
[16-Jul-2025 05:31:25 UTC] Stripe Webhook Received: credit_note.created (ID: evt_1RlNmZCDiOqgoJOU8rSLa8fN)
[16-Jul-2025 05:31:25 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[16-Jul-2025 05:31:25 UTC] Starting credit note creation process for event: evt_1RlNmZCDiOqgoJOU8rSLa8fN
[16-Jul-2025 05:31:25 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function fetch_stripe_invoice() in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-credit-note-created-to-qbo-credit-memo.php:35
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(78): process_stripe_credit_note_created_to_qbo_credit_memo()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-credit-note-created-to-qbo-credit-memo.php on line 35
[16-Jul-2025 06:40:31 UTC] Stripe Webhook Received: credit_note.created (ID: evt_1RlNmZCDiOqgoJOU8rSLa8fN)
[16-Jul-2025 06:40:31 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[16-Jul-2025 06:40:31 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function find_or_create_qbo_customer() in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-credit-note-created-to-qbo-credit-memo.php:57
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(78): process_stripe_credit_note_created_to_qbo_credit_memo()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-credit-note-created-to-qbo-credit-memo.php on line 57
[16-Jul-2025 06:43:09 UTC] Stripe Webhook Received: credit_note.created (ID: evt_1RlNmZCDiOqgoJOU8rSLa8fN)
[16-Jul-2025 06:43:09 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[16-Jul-2025 06:47:13 UTC] Stripe Webhook Received: credit_note.created (ID: evt_1RlNmZCDiOqgoJOU8rSLa8fN)
[16-Jul-2025 06:47:13 UTC] PHP Parse error:  Unclosed '[' on line 21 does not match ')' in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-credit-note-created-to-qbo-credit-memo.php on line 23
[16-Jul-2025 06:48:49 UTC] Stripe Webhook Received: credit_note.created (ID: evt_1RlNmZCDiOqgoJOU8rSLa8fN)
[16-Jul-2025 06:48:49 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[16-Jul-2025 06:48:49 UTC] Starting credit note creation process for event: evt_1RlNmZCDiOqgoJOU8rSLa8fN
[16-Jul-2025 06:48:49 UTC] Fetching Stripe credit note: cn_1RlNmYCDiOqgoJOUNv4Nj941
[16-Jul-2025 06:48:49 UTC] Fetched Stripe credit note: Array
(
    [id] => cn_1RlNmYCDiOqgoJOUNv4Nj941
    [object] => credit_note
    [amount] => 500
    [amount_shipping] => 0
    [created] => 1752643289
    [currency] => usd
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_balance_transaction] => 
    [discount_amount] => 0
    [discount_amounts] => Array
        (
        )

    [effective_at] => 1752643289
    [invoice] => in_1RlNgDCDiOqgoJOUsSD48DcY
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => cnli_1RlNmYCDiOqgoJOU39z4l7OL
                            [object] => credit_note_line_item
                            [amount] => 500
                            [amount_excluding_tax] => 500
                            [description] => product1
                            [discount_amount] => 0
                            [discount_amounts] => Array
                                (
                                )

                            [invoice_line_item] => il_1RlNgDCDiOqgoJOUNBKzG8KQ
                            [livemode] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [quantity] => 1
                            [tax_amounts] => Array
                                (
                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                )

                            [type] => invoice_line_item
                            [unit_amount] => 500
                            [unit_amount_decimal] => 500
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [url] => /v1/credit_notes/cn_1RlNmYCDiOqgoJOUNv4Nj941/lines
        )

    [livemode] => 
    [memo] => 
    [metadata] => Array
        (
        )

    [number] => RPYUF7UP-0007-CN-01
    [out_of_band_amount] => 
    [pdf] => https://pay.stripe.com/credit_notes/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZ2xKMW1KdHB0QmE2dnNqMklBcE1lVk10NE1ueW9FLDE0MzE4OTMyOQ0200ViuOEpN3/pdf?s=ap
    [post_payment_amount] => 0
    [pre_payment_amount] => 500
    [pretax_credit_amounts] => Array
        (
        )

    [reason] => duplicate
    [refund] => 
    [refunds] => Array
        (
        )

    [shipping_cost] => 
    [status] => issued
    [subtotal] => 500
    [subtotal_excluding_tax] => 500
    [tax_amounts] => Array
        (
        )

    [total] => 500
    [total_excluding_tax] => 500
    [total_taxes] => Array
        (
        )

    [type] => pre_payment
    [voided_at] => 
)

[16-Jul-2025 06:48:49 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function fetch_stripe_invoice() in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-credit-note-created-to-qbo-credit-memo.php:54
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(78): process_stripe_credit_note_created_to_qbo_credit_memo()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-credit-note-created-to-qbo-credit-memo.php on line 54
[16-Jul-2025 06:56:23 UTC] Stripe Webhook Received: credit_note.created (ID: evt_1RlNmZCDiOqgoJOU8rSLa8fN)
[16-Jul-2025 06:56:23 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[16-Jul-2025 06:56:23 UTC] Starting credit note creation process for event: evt_1RlNmZCDiOqgoJOU8rSLa8fN
[16-Jul-2025 06:56:23 UTC] Fetching Stripe credit note: cn_1RlNmYCDiOqgoJOUNv4Nj941
[16-Jul-2025 06:56:23 UTC] Fetched Stripe credit note: Array
(
    [id] => cn_1RlNmYCDiOqgoJOUNv4Nj941
    [object] => credit_note
    [amount] => 500
    [amount_shipping] => 0
    [created] => 1752643289
    [currency] => usd
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_balance_transaction] => 
    [discount_amount] => 0
    [discount_amounts] => Array
        (
        )

    [effective_at] => 1752643289
    [invoice] => in_1RlNgDCDiOqgoJOUsSD48DcY
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => cnli_1RlNmYCDiOqgoJOU39z4l7OL
                            [object] => credit_note_line_item
                            [amount] => 500
                            [amount_excluding_tax] => 500
                            [description] => product1
                            [discount_amount] => 0
                            [discount_amounts] => Array
                                (
                                )

                            [invoice_line_item] => il_1RlNgDCDiOqgoJOUNBKzG8KQ
                            [livemode] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [quantity] => 1
                            [tax_amounts] => Array
                                (
                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                )

                            [type] => invoice_line_item
                            [unit_amount] => 500
                            [unit_amount_decimal] => 500
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [url] => /v1/credit_notes/cn_1RlNmYCDiOqgoJOUNv4Nj941/lines
        )

    [livemode] => 
    [memo] => 
    [metadata] => Array
        (
        )

    [number] => RPYUF7UP-0007-CN-01
    [out_of_band_amount] => 
    [pdf] => https://pay.stripe.com/credit_notes/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZ2xKMW1KdHB0QmE2dnNqMklBcE1lVk10NE1ueW9FLDE0MzE4OTc4Mw0200im1hb2pw/pdf?s=ap
    [post_payment_amount] => 0
    [pre_payment_amount] => 500
    [pretax_credit_amounts] => Array
        (
        )

    [reason] => duplicate
    [refund] => 
    [refunds] => Array
        (
        )

    [shipping_cost] => 
    [status] => issued
    [subtotal] => 500
    [subtotal_excluding_tax] => 500
    [tax_amounts] => Array
        (
        )

    [total] => 500
    [total_excluding_tax] => 500
    [total_taxes] => Array
        (
        )

    [type] => pre_payment
    [voided_at] => 
)

[16-Jul-2025 06:56:23 UTC] Fetching Stripe invoice: in_1RlNgDCDiOqgoJOUsSD48DcY
[16-Jul-2025 06:56:24 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                )

            [time] => 2025-07-15T23:56:24.690-07:00
        )

)

[16-Jul-2025 06:56:25 UTC] Failed to create customer: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Duplicate Name Exists Error
                                    [Detail] => The name supplied already exists. : null
                                    [code] => 6240
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-15T23:56:25.103-07:00
        )

)

[16-Jul-2025 06:56:25 UTC] Credit memo creation failed: Failed to find or create customer in QuickBooks
[16-Jul-2025 06:56:25 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-credit-note-created-to-qbo-credit-memo.php:172
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(78): process_stripe_credit_note_created_to_qbo_credit_memo()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-credit-note-created-to-qbo-credit-memo.php on line 172
[16-Jul-2025 06:59:12 UTC] Stripe Webhook Received: credit_note.created (ID: evt_1RlNmZCDiOqgoJOU8rSLa8fN)
[16-Jul-2025 06:59:12 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[16-Jul-2025 06:59:12 UTC] Starting credit note creation process for event: evt_1RlNmZCDiOqgoJOU8rSLa8fN
[16-Jul-2025 06:59:12 UTC] Fetching Stripe credit note: cn_1RlNmYCDiOqgoJOUNv4Nj941
[16-Jul-2025 06:59:12 UTC] Fetched Stripe credit note: Array
(
    [id] => cn_1RlNmYCDiOqgoJOUNv4Nj941
    [object] => credit_note
    [amount] => 500
    [amount_shipping] => 0
    [created] => 1752643289
    [currency] => usd
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_balance_transaction] => 
    [discount_amount] => 0
    [discount_amounts] => Array
        (
        )

    [effective_at] => 1752643289
    [invoice] => in_1RlNgDCDiOqgoJOUsSD48DcY
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => cnli_1RlNmYCDiOqgoJOU39z4l7OL
                            [object] => credit_note_line_item
                            [amount] => 500
                            [amount_excluding_tax] => 500
                            [description] => product1
                            [discount_amount] => 0
                            [discount_amounts] => Array
                                (
                                )

                            [invoice_line_item] => il_1RlNgDCDiOqgoJOUNBKzG8KQ
                            [livemode] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [quantity] => 1
                            [tax_amounts] => Array
                                (
                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                )

                            [type] => invoice_line_item
                            [unit_amount] => 500
                            [unit_amount_decimal] => 500
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [url] => /v1/credit_notes/cn_1RlNmYCDiOqgoJOUNv4Nj941/lines
        )

    [livemode] => 
    [memo] => 
    [metadata] => Array
        (
        )

    [number] => RPYUF7UP-0007-CN-01
    [out_of_band_amount] => 
    [pdf] => https://pay.stripe.com/credit_notes/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZ2xKMW1KdHB0QmE2dnNqMklBcE1lVk10NE1ueW9FLDE0MzE4OTk1Mg0200pULx91vy/pdf?s=ap
    [post_payment_amount] => 0
    [pre_payment_amount] => 500
    [pretax_credit_amounts] => Array
        (
        )

    [reason] => duplicate
    [refund] => 
    [refunds] => Array
        (
        )

    [shipping_cost] => 
    [status] => issued
    [subtotal] => 500
    [subtotal_excluding_tax] => 500
    [tax_amounts] => Array
        (
        )

    [total] => 500
    [total_excluding_tax] => 500
    [total_taxes] => Array
        (
        )

    [type] => pre_payment
    [voided_at] => 
)

[16-Jul-2025 06:59:12 UTC] Fetching Stripe invoice: in_1RlNgDCDiOqgoJOUsSD48DcY
[16-Jul-2025 06:59:13 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                )

            [time] => 2025-07-15T23:59:13.740-07:00
        )

)

[16-Jul-2025 06:59:13 UTC] PHP Warning:  Undefined variable $nam1e in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-credit-note-created-to-qbo-credit-memo.php on line 248
[16-Jul-2025 06:59:13 UTC] PHP Deprecated:  substr(): Passing null to parameter #1 ($string) of type string is deprecated in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-credit-note-created-to-qbo-credit-memo.php on line 248
[16-Jul-2025 06:59:14 UTC] Using QBO customer ID: 105
[16-Jul-2025 06:59:15 UTC] Credit memo data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 105
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 5
                    [Description] => product1
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 25
                                )

                            [UnitPrice] => 5
                            [Qty] => 1
                        )

                )

        )

    [TxnDate] => 2025-07-16
    [TotalAmt] => 5
    [PrivateNote] => Stripe Credit Note ID: cn_1RlNmYCDiOqgoJOUNv4Nj941
    [DocNumber] => RPYUF7UP-0007-CN-01
    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 0
        )

)

[16-Jul-2025 06:59:16 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [CreditMemo] => Array
                (
                    [RemainingCredit] => 5
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 663
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-15T23:59:16-07:00
                            [LastUpdatedTime] => 2025-07-15T23:59:16-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => RPYUF7UP-0007-CN-01
                    [TxnDate] => 2025-07-16
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Credit Note ID: cn_1RlNmYCDiOqgoJOUNv4Nj941
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => product1
                                    [Amount] => 5
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 25
                                                    [name] => product1
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 1
                                                    [name] => Services
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => NON
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 5
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 105
                            [name] => testt testt
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 178
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 5
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 5
                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-15T23:59:15.545-07:00
        )

)

[16-Jul-2025 06:59:16 UTC] Credit memo created successfully in QBO. Credit Memo ID: 663
[16-Jul-2025 06:59:16 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[16-Jul-2025 07:10:00 UTC] Stripe Webhook Received: product.created (ID: evt_1RlPTXCDiOqgoJOUhC1h6OeZ)
[16-Jul-2025 07:10:00 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[16-Jul-2025 07:10:00 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function get_qbo_account_id() in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-product-created-to-qbo-item.php:32
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(85): process_stripe_product_created_to_qbo_item()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-product-created-to-qbo-item.php on line 32
[16-Jul-2025 07:18:33 UTC] Stripe Webhook Received: product.created (ID: evt_1RlPTXCDiOqgoJOUhC1h6OeZ)
[16-Jul-2025 07:18:33 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[16-Jul-2025 07:18:34 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[16-Jul-2025 07:22:02 UTC] Stripe Webhook Received: product.created (ID: evt_1RlPfBCDiOqgoJOU6eOlc418)
[16-Jul-2025 07:22:02 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[16-Jul-2025 07:22:03 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[16-Jul-2025 07:31:11 UTC] Stripe Webhook Received: product.created (ID: evt_1RlPo2CDiOqgoJOUVDzh0KB1)
[16-Jul-2025 07:31:11 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[16-Jul-2025 07:31:12 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[16-Jul-2025 07:34:11 UTC] Stripe Webhook Received: product.created (ID: evt_1RlPqxCDiOqgoJOUqFFdss9H)
[16-Jul-2025 07:34:11 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function process_stripe_product_created_to_qbo_item() in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php:85
Stack trace:
#0 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php on line 85
[16-Jul-2025 07:37:19 UTC] Stripe Webhook Received: product.created (ID: evt_1RlPtyCDiOqgoJOUsSBZYNyT)
[16-Jul-2025 07:37:19 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[16-Jul-2025 07:37:20 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[16-Jul-2025 07:43:40 UTC] Stripe Webhook Received: quote.accepted (ID: evt_1RlQ08CDiOqgoJOUWnVfVfWN)
[16-Jul-2025 07:43:40 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[16-Jul-2025 08:15:51 UTC] Stripe Webhook Received: quote.accepted (ID: evt_1RlQ08CDiOqgoJOUWnVfVfWN)
[16-Jul-2025 08:15:51 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[16-Jul-2025 08:15:51 UTC] Fetching Stripe customer: cus_SYxhIfsEqHRWWB
[16-Jul-2025 08:15:51 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function find_or_create_qbo_customer() in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-quote-accepted-to-qbo-sales-order.php:43
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(92): process_stripe_quote_accepted_to_qbo_sales_order()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-quote-accepted-to-qbo-sales-order.php on line 43
[16-Jul-2025 08:17:52 UTC] Stripe Webhook Received: quote.accepted (ID: evt_1RlQ08CDiOqgoJOUWnVfVfWN)
[16-Jul-2025 08:17:52 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[16-Jul-2025 08:17:52 UTC] Fetching Stripe customer: cus_SYxhIfsEqHRWWB
[16-Jul-2025 08:17:52 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function find_or_create_qbo_customer() in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-quote-accepted-to-qbo-sales-order.php:44
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(92): process_stripe_quote_accepted_to_qbo_sales_order()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-quote-accepted-to-qbo-sales-order.php on line 44
[16-Jul-2025 08:19:47 UTC] Stripe Webhook Received: quote.accepted (ID: evt_1RlQ08CDiOqgoJOUWnVfVfWN)
[16-Jul-2025 08:19:47 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[16-Jul-2025 08:19:47 UTC] Fetching Stripe customer: cus_SYxhIfsEqHRWWB
[16-Jul-2025 08:19:48 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => -5
                                    [BalanceWithJobs] => -5
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 105
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-15T23:59:14-07:00
                                            [LastUpdatedTime] => 2025-07-15T23:59:16-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt testt
                                    [DisplayName] => testt testt
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098127805f7fa6e41dea97e908749fd2b9e
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratulbinhasan.integration@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-16T01:19:48.512-07:00
        )

)

[16-Jul-2025 08:19:48 UTC] Using QBO customer ID: 105
[16-Jul-2025 08:19:49 UTC] PHP Warning:  Undefined array key "amount" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-quote-accepted-to-qbo-sales-order.php on line 74
[16-Jul-2025 08:19:49 UTC] PHP Warning:  Undefined array key "amount" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-quote-accepted-to-qbo-sales-order.php on line 76
[16-Jul-2025 08:19:49 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[16-Jul-2025 08:19:49 UTC] Failed to create sales order from quote: Failed to create sales order in QuickBooks
[16-Jul-2025 08:21:53 UTC] Stripe Webhook Received: quote.accepted (ID: evt_1RlQ08CDiOqgoJOUWnVfVfWN)
[16-Jul-2025 08:21:53 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[16-Jul-2025 08:21:53 UTC] Fetching Stripe customer: cus_SYxhIfsEqHRWWB
[16-Jul-2025 08:21:54 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => -5
                                    [BalanceWithJobs] => -5
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 105
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-15T23:59:14-07:00
                                            [LastUpdatedTime] => 2025-07-15T23:59:16-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt testt
                                    [DisplayName] => testt testt
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098127805f7fa6e41dea97e908749fd2b9e
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratulbinhasan.integration@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-16T01:21:54.486-07:00
        )

)

[16-Jul-2025 08:21:54 UTC] Using QBO customer ID: 105
[16-Jul-2025 08:21:55 UTC] PHP Warning:  Undefined array key "amount" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-quote-accepted-to-qbo-sales-order.php on line 76
[16-Jul-2025 08:21:55 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[16-Jul-2025 08:21:55 UTC] Failed to create sales order from quote: Failed to create sales order in QuickBooks
[16-Jul-2025 08:27:17 UTC] Stripe Webhook Received: quote.accepted (ID: evt_1RlQ08CDiOqgoJOUWnVfVfWN)
[16-Jul-2025 08:27:17 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[16-Jul-2025 08:27:17 UTC] Fetching Stripe customer: cus_SYxhIfsEqHRWWB
[16-Jul-2025 08:27:18 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => -5
                                    [BalanceWithJobs] => -5
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 105
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-15T23:59:14-07:00
                                            [LastUpdatedTime] => 2025-07-15T23:59:16-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt testt
                                    [DisplayName] => testt testt
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098127805f7fa6e41dea97e908749fd2b9e
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratulbinhasan.integration@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-16T01:27:18.235-07:00
        )

)

[16-Jul-2025 08:27:18 UTC] Using QBO customer ID: 105
[16-Jul-2025 08:27:19 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[16-Jul-2025 08:27:19 UTC] Failed to create sales order from quote: Failed to create sales order in QuickBooks
[16-Jul-2025 08:38:58 UTC] Stripe Webhook Received: quote.accepted (ID: evt_1RlQ08CDiOqgoJOUWnVfVfWN)
[16-Jul-2025 08:38:58 UTC] [Quote Processing] Starting processing for user 1, event ID: evt_1RlQ08CDiOqgoJOUWnVfVfWN
[16-Jul-2025 08:38:58 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[16-Jul-2025 08:38:58 UTC] [Quote Processing] Processing quote ID: qt_1RlPvvCDiOqgoJOUAAcTFvyq
[16-Jul-2025 08:38:58 UTC] [Quote Processing] Retrieving connected accounts for user 1
[16-Jul-2025 08:38:58 UTC] [Quote Processing] Accounts retrieved successfully
[16-Jul-2025 08:38:58 UTC] [Quote Processing] Fetching customer details for customer ID: cus_SYxhIfsEqHRWWB
[16-Jul-2025 08:38:58 UTC] Fetching Stripe customer: cus_SYxhIfsEqHRWWB
[16-Jul-2025 08:38:59 UTC] [Quote Processing] Customer details - Name: testt, Email: ratulbinhasan.integration@gmail.com
[16-Jul-2025 08:38:59 UTC] [Quote Processing] Finding or creating customer in QBO
[16-Jul-2025 08:38:59 UTC] [Customer Lookup] Starting for testt (ratulbinhasan.integration@gmail.com)
[16-Jul-2025 08:38:59 UTC] [Customer Lookup] Searching QBO for customer with email: ratulbinhasan.integration@gmail.com
[16-Jul-2025 08:38:59 UTC] [Customer Lookup] Creating new customer for testt
[16-Jul-2025 08:38:59 UTC] [Customer Lookup] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1752655140305
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[16-Jul-2025 08:38:59 UTC] [Quote Processing] ERROR: Failed to find or create customer in QuickBooks
[16-Jul-2025 08:38:59 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-quote-accepted-to-qbo-sales-order.php:171
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(92): process_stripe_quote_accepted_to_qbo_sales_order()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-quote-accepted-to-qbo-sales-order.php on line 171
[16-Jul-2025 08:40:03 UTC] Stripe Webhook Received: quote.accepted (ID: evt_1RlQ08CDiOqgoJOUWnVfVfWN)
[16-Jul-2025 08:40:03 UTC] PHP Parse error:  syntax error, unexpected token "if" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-quote-accepted-to-qbo-sales-order.php on line 237
[16-Jul-2025 08:45:01 UTC] Stripe Webhook Received: quote.accepted (ID: evt_1RlQ08CDiOqgoJOUWnVfVfWN)
[16-Jul-2025 08:45:01 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[16-Jul-2025 08:45:01 UTC] Fetching Stripe customer: cus_SYxhIfsEqHRWWB
[16-Jul-2025 08:45:02 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1752655502780
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[16-Jul-2025 08:45:02 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1752655502965
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[16-Jul-2025 08:45:02 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-quote-accepted-to-qbo-sales-order.php:147
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(92): process_stripe_quote_accepted_to_qbo_sales_order()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-quote-accepted-to-qbo-sales-order.php on line 147
[16-Jul-2025 08:49:52 UTC] Stripe Webhook Received: quote.accepted (ID: evt_1RlQ08CDiOqgoJOUWnVfVfWN)
[16-Jul-2025 08:49:52 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[16-Jul-2025 08:49:52 UTC] Fetching Stripe customer: cus_SYxhIfsEqHRWWB
[16-Jul-2025 08:49:54 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => -5
                                    [BalanceWithJobs] => -5
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 105
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-15T23:59:14-07:00
                                            [LastUpdatedTime] => 2025-07-15T23:59:16-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt testt
                                    [DisplayName] => testt testt
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098127805f7fa6e41dea97e908749fd2b9e
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratulbinhasan.integration@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-16T01:49:53.961-07:00
        )

)

[16-Jul-2025 08:49:54 UTC] Using QBO customer ID: 105
[16-Jul-2025 08:49:55 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[16-Jul-2025 08:49:55 UTC] Failed to create sales order from quote: Failed to create sales order in QuickBooks
[16-Jul-2025 08:54:43 UTC] Stripe Webhook Received: quote.accepted (ID: evt_1RlQ08CDiOqgoJOUWnVfVfWN)
[16-Jul-2025 08:54:43 UTC] [QUOTE PROCESSING] Starting processing for event: evt_1RlQ08CDiOqgoJOUWnVfVfWN
[16-Jul-2025 08:54:43 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[16-Jul-2025 08:54:43 UTC] [QUOTE PROCESSING] Processing quote ID: qt_1RlPvvCDiOqgoJOUAAcTFvyq
[16-Jul-2025 08:54:43 UTC] [QUOTE PROCESSING] Checking if quote already processed...
[16-Jul-2025 08:54:43 UTC] [QUOTE PROCESSING] Retrieving Stripe and QBO accounts...
[16-Jul-2025 08:54:43 UTC] [QUOTE PROCESSING] Fetching customer details from Stripe...
[16-Jul-2025 08:54:43 UTC] Fetching Stripe customer: cus_SYxhIfsEqHRWWB
[16-Jul-2025 08:54:43 UTC] [QUOTE PROCESSING] Customer details - Name: testt, Email: ratulbinhasan.integration@gmail.com
[16-Jul-2025 08:54:43 UTC] [QUOTE PROCESSING] Finding/creating customer in QBO...
[16-Jul-2025 08:54:43 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function find_or_create_qbo_customer() in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-quote-accepted-to-qbo-sales-order.php:64
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(92): process_stripe_quote_accepted_to_qbo_sales_order()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-quote-accepted-to-qbo-sales-order.php on line 64
[16-Jul-2025 09:20:10 UTC] Stripe Webhook Received: quote.accepted (ID: evt_1RlQ08CDiOqgoJOUWnVfVfWN)
[16-Jul-2025 09:20:10 UTC] [QUOTE PROCESSING] Starting processing for event: evt_1RlQ08CDiOqgoJOUWnVfVfWN
[16-Jul-2025 09:20:10 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[16-Jul-2025 09:20:10 UTC] [QUOTE PROCESSING] Processing quote ID: qt_1RlPvvCDiOqgoJOUAAcTFvyq
[16-Jul-2025 09:20:10 UTC] [QUOTE PROCESSING] Checking if quote already processed...
[16-Jul-2025 09:20:10 UTC] [QUOTE PROCESSING] Retrieving Stripe and QBO accounts...
[16-Jul-2025 09:20:10 UTC] [QUOTE PROCESSING] Fetching customer details from Stripe...
[16-Jul-2025 09:20:10 UTC] Fetching Stripe customer: cus_SYxhIfsEqHRWWB
[16-Jul-2025 09:20:10 UTC] [QUOTE PROCESSING] Customer details - Name: testt, Email: ratulbinhasan.integration@gmail.com
[16-Jul-2025 09:20:10 UTC] [QUOTE PROCESSING] Finding/creating customer in QBO...
[16-Jul-2025 09:20:10 UTC] [CUSTOMER] Searching for customer with email: ratulbinhasan.integration@gmail.com
[16-Jul-2025 09:20:11 UTC] [CUSTOMER] Found existing customer ID: 105
[16-Jul-2025 09:20:11 UTC] [QUOTE PROCESSING] Using QBO customer ID: 105
[16-Jul-2025 09:20:11 UTC] [QUOTE PROCESSING] Preparing line items...
[16-Jul-2025 09:20:11 UTC] [QUOTE PROCESSING] Fetching quote line items from Stripe...
[16-Jul-2025 09:20:11 UTC] [STRIPE] Fetching line items for quote: qt_1RlPvvCDiOqgoJOUAAcTFvyq
[16-Jul-2025 09:20:11 UTC] [STRIPE] Retrieved 1 line items
[16-Jul-2025 09:20:11 UTC] [QUOTE PROCESSING] Processing 1 line items
[16-Jul-2025 09:20:11 UTC] [QUOTE PROCESSING] Processing line item #0
[16-Jul-2025 09:20:11 UTC] [QUOTE PROCESSING] Product: llll, SKU: prod_SgnUhRleVQlEod
[16-Jul-2025 09:20:11 UTC] [ITEM] Searching for item: llll
[16-Jul-2025 09:20:11 UTC] [ITEM] Found existing item ID: 32
[16-Jul-2025 09:20:11 UTC] [QUOTE PROCESSING] Line item details - Qty: 1, Unit Price: 66, Total: 66, Tax: 0
[16-Jul-2025 09:20:11 UTC] [QUOTE PROCESSING] Processed 1 valid line items
[16-Jul-2025 09:20:11 UTC] [QUOTE PROCESSING] Total Tax: 0
[16-Jul-2025 09:20:11 UTC] [QUOTE PROCESSING] Prepared QBO Sales Order data: {"CustomerRef":{"value":"105"},"Line":[{"DetailType":"SalesItemLineDetail","Amount":66,"SalesItemLineDetail":{"ItemRef":{"value":"32"},"UnitPrice":66,"Qty":1}}],"TxnDate":"2025-07-16","TotalAmt":66,"PrivateNote":"Stripe Quote: qt_1RlPvvCDiOqgoJOUAAcTFvyq","TxnTaxDetail":{"TxnTaxCodeRef":{"value":"TAX"},"TotalTax":0}}
[16-Jul-2025 09:20:11 UTC] [QUOTE PROCESSING] Creating sales order in QBO...
[16-Jul-2025 09:20:12 UTC] [QUOTE PROCESSING] QBO API Response: {"code":400,"body":{"Fault":{"Error":[{"Message":"Unsupported Operation","Detail":"Operation salesorder is not supported.","code":"500"}],"type":"ValidationFault"},"time":"2025-07-16T02:20:12.125-07:00"}}
[16-Jul-2025 09:20:12 UTC] [QUOTE PROCESSING] ERROR: Failed to create sales order in QuickBooks
[16-Jul-2025 09:20:12 UTC] [QUOTE PROCESSING] ERROR: Failed to create sales order in QuickBooks
[16-Jul-2025 09:20:12 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[16-Jul-2025 10:35:39 UTC] Stripe Webhook Received: invoice.created (ID: evt_1RlSgZCDiOqgoJOUdUb98P2Z)
[16-Jul-2025 10:35:39 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[16-Jul-2025 10:35:39 UTC] Starting invoice creation process for event: evt_1RlSgZCDiOqgoJOUdUb98P2Z
[16-Jul-2025 10:35:39 UTC] Fetching Stripe invoice: in_1RlSgYCDiOqgoJOUx5SxXlYk
[16-Jul-2025 10:35:40 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RlSgYCDiOqgoJOUx5SxXlYk
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 6600
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 6600
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 1
            [liability] => Array
                (
                    [type] => self
                )

            [provider] => stripe
            [status] => complete
        )

    [automatically_finalizes_at] => 
    [billing_reason] => quote_accept
    [charge] => 
    [collection_method] => charge_automatically
    [created] => 1752662138
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => Array
        (
            [city] => testt
            [country] => US
            [line1] => rwrwr
            [line2] => fsf
            [postal_code] => 95014
            [state] => CO
        )

    [customer_email] => ratulbinhasan.integration@gmail.com
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => Array
        (
            [address] => Array
                (
                    [city] => testt
                    [country] => US
                    [line1] => rwrwr
                    [line2] => fsf
                    [postal_code] => 95014
                    [state] => CO
                )

            [name] => testt
            [phone] => 
        )

    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 
    [effective_at] => 
    [ending_balance] => 
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => 
    [invoice_pdf] => 
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RlSgYCDiOqgoJOUnf3EgQ1A
                            [object] => line_item
                            [amount] => 6600
                            [amount_excluding_tax] => 6600
                            [currency] => usd
                            [description] => llll
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RlSgYCDiOqgoJOUx5SxXlYk
                            [invoice_item] => ii_1RlSgYCDiOqgoJOUpCQKPyRH
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1RlSgYCDiOqgoJOUpCQKPyRH
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752662138
                                    [start] => 1752662138
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RlPu2CDiOqgoJOUqYL6qJsw
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1752651442
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SgnUhRleVQlEod
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 6600
                                    [unit_amount_decimal] => 6600
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RlPu2CDiOqgoJOUqYL6qJsw
                                            [product] => prod_SgnUhRleVQlEod
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 6600
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 1
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 0
                                            [inclusive] => 
                                            [tax_rate] => txr_1RlPxVCDiOqgoJOUtbT35WCR
                                            [taxability_reason] => not_collecting
                                            [taxable_amount] => 0
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 0
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1RlPxVCDiOqgoJOUtbT35WCR
                                                )

                                            [taxability_reason] => not_collecting
                                            [taxable_amount] => 0
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 6600
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1RlSgYCDiOqgoJOUx5SxXlYk/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => 
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => Array
        (
            [quote_details] => Array
                (
                    [quote] => qt_1RlSg2CDiOqgoJOUuNI41qf7
                )

            [subscription_details] => 
            [type] => quote_details
        )

    [payment_intent] => 
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752662138
    [period_start] => 1752662138
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => qt_1RlSg2CDiOqgoJOUuNI41qf7
    [receipt_number] => 
    [rendering] => 
    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => draft
    [status_transitions] => Array
        (
            [finalized_at] => 
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 6600
    [subtotal_excluding_tax] => 6600
    [tax] => 0
    [test_clock] => 
    [total] => 6600
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 6600
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 0
                    [inclusive] => 
                    [tax_rate] => txr_1RlPxVCDiOqgoJOUtbT35WCR
                    [taxability_reason] => not_collecting
                    [taxable_amount] => 0
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 0
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1RlPxVCDiOqgoJOUtbT35WCR
                        )

                    [taxability_reason] => not_collecting
                    [taxable_amount] => 0
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 
)

[16-Jul-2025 10:35:41 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => -5
                                    [BalanceWithJobs] => -5
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 105
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-15T23:59:14-07:00
                                            [LastUpdatedTime] => 2025-07-15T23:59:16-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt testt
                                    [DisplayName] => testt testt
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098127805f7fa6e41dea97e908749fd2b9e
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratulbinhasan.integration@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-16T03:35:41.248-07:00
        )

)

[16-Jul-2025 10:35:41 UTC] Using QBO customer ID: 105
[16-Jul-2025 10:35:41 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 105
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 66
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 32
                                )

                            [UnitPrice] => 66
                            [Qty] => 1
                        )

                )

        )

    [TxnDate] => 2025-07-16
    [DueDate] => 2025-08-15
    [TotalAmt] => 66
    [PrivateNote] => Stripe Invoice ID: in_1RlSgYCDiOqgoJOUx5SxXlYk
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 0
        )

)

[16-Jul-2025 10:35:43 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 664
                    [SyncToken] => 1
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-16T03:35:43-07:00
                            [LastModifiedByRef] => Array
                                (
                                    [value] => 123145870265994
                                )

                            [LastUpdatedTime] => 2025-07-16T03:35:43-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1260
                    [TxnDate] => 2025-07-16
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Invoice ID: in_1RlSgYCDiOqgoJOUx5SxXlYk
                    [LinkedTxn] => Array
                        (
                            [0] => Array
                                (
                                    [TxnId] => 665
                                    [TxnType] => Payment
                                )

                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 66
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 32
                                                    [name] => llll
                                                )

                                            [UnitPrice] => 66
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-09020802-V1-00120000
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 66
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 66
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 66
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 66
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 66
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 105
                            [name] => testt testt
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 179
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [DueDate] => 2025-08-15
                    [TotalAmt] => 66
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 61
                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-16T03:35:41.999-07:00
        )

)

[16-Jul-2025 10:35:43 UTC] Invoice created successfully in QBO. Invoice ID: 664
[16-Jul-2025 10:35:43 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[16-Jul-2025 12:34:33 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[16-Jul-2025 12:34:33 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[16-Jul-2025 12:34:33 UTC] Starting invoice creation process for event: evt_1Rjb31CDiOqgoJOUTLKYK87p
[16-Jul-2025 12:34:33 UTC] Fetching Stripe invoice: in_1Rjb30CDiOqgoJOUBodxSTyg
[16-Jul-2025 12:34:34 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjb30CDiOqgoJOUBodxSTyg
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 18315
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1752217626
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754809716
    [effective_at] => 1752217716
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzIxMDA3NA0200K2HM6GrI?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzIxMDA3NA0200K2HM6GrI/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjb3UCDiOqgoJOUlOS6H3SV
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjb30CDiOqgoJOUBodxSTyg/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0005
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3Rjb4TCDiOqgoJOU1nmHyolq
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => void
    [status_transitions] => Array
        (
            [finalized_at] => 1752217716
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 1752254441
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752217628
)

[16-Jul-2025 12:34:35 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                )

            [time] => 2025-07-16T05:34:35.134-07:00
        )

)

[16-Jul-2025 12:34:36 UTC] Using QBO customer ID: 70
[16-Jul-2025 12:34:37 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 70
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 165
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 26
                                )

                            [UnitPrice] => 5
                            [Qty] => 33
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-11
    [DueDate] => 2025-08-10
    [TotalAmt] => 183.15
    [PrivateNote] => Stripe Invoice ID: in_1Rjb30CDiOqgoJOUBodxSTyg
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 18.15
        )

)

[16-Jul-2025 12:34:39 UTC] QBO API response: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => A business validation error has occurred while processing your request
                                    [Detail] => Business Validation Error: Make sure all your transactions have a GST rate before you save.
                                    [code] => 6000
                                    [element] => 
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-16T05:34:38.087-07:00
        )

)

[16-Jul-2025 12:34:39 UTC] Invoice creation failed: Failed to create invoice in QuickBooks
[16-Jul-2025 12:34:39 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[16-Jul-2025 12:56:34 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[16-Jul-2025 12:56:34 UTC] PHP Fatal error:  Cannot redeclare get_qbo_company_info() (previously declared in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php:584) in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 514
[16-Jul-2025 12:58:04 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[16-Jul-2025 12:58:04 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[16-Jul-2025 12:58:04 UTC] Starting invoice creation process for event: evt_1Rjb31CDiOqgoJOUTLKYK87p
[16-Jul-2025 12:58:04 UTC] Fetching Stripe invoice: in_1Rjb30CDiOqgoJOUBodxSTyg
[16-Jul-2025 12:58:04 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjb30CDiOqgoJOUBodxSTyg
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 18315
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1752217626
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754809716
    [effective_at] => 1752217716
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzIxMTQ4NA0200eEpQkuqL?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzIxMTQ4NA0200eEpQkuqL/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjb3UCDiOqgoJOUlOS6H3SV
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjb30CDiOqgoJOUBodxSTyg/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0005
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3Rjb4TCDiOqgoJOU1nmHyolq
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => void
    [status_transitions] => Array
        (
            [finalized_at] => 1752217716
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 1752254441
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752217628
)

[16-Jul-2025 12:58:06 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 70
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-16T05:34:36-07:00
                                            [LastUpdatedTime] => 2025-07-16T05:34:36-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt(test@fsdf.fg)
                                    [DisplayName] => testt(test@fsdf.fg)
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002099faf13f8ad34a4e63aef829e8a9142f8a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-16T05:58:06.012-07:00
        )

)

[16-Jul-2025 12:58:06 UTC] Using QBO customer ID: 70
[16-Jul-2025 12:58:07 UTC] Failed to create tax rate: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Request has invalid or unsupported property
                                    [Detail] => Property Name:failed to parse json object; a property specified is unsupported or invalid
                                    [code] => 2010
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-16T05:58:07.065-07:00
        )

)

[16-Jul-2025 12:58:07 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 70
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 165
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 26
                                )

                            [UnitPrice] => 5
                            [Qty] => 33
                            [TaxCodeRef] => GST
                        )

                )

        )

    [TxnDate] => 2025-07-11
    [DueDate] => 2025-08-10
    [TotalAmt] => 183.15
    [PrivateNote] => Stripe Invoice ID: in_1Rjb30CDiOqgoJOUBodxSTyg
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => GST
                )

            [TotalTax] => 18.15
        )

)

[16-Jul-2025 12:58:07 UTC] QBO API response: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Request has invalid or unsupported property
                                    [Detail] => Property Name:failed to parse json object; a property specified is unsupported or invalid
                                    [code] => 2010
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-16T05:58:07.683-07:00
        )

)

[16-Jul-2025 12:58:07 UTC] Invoice creation failed: Failed to create invoice in QuickBooks
[16-Jul-2025 12:58:07 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[16-Jul-2025 13:29:28 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[16-Jul-2025 13:29:28 UTC] PHP Fatal error:  Cannot redeclare get_qbo_company_info() (previously declared in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php:584) in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 334
[16-Jul-2025 13:30:08 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[16-Jul-2025 13:30:08 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[16-Jul-2025 13:30:08 UTC] Starting invoice creation process for event: evt_1Rjb31CDiOqgoJOUTLKYK87p
[16-Jul-2025 13:30:08 UTC] Fetching Stripe invoice: in_1Rjb30CDiOqgoJOUBodxSTyg
[16-Jul-2025 13:30:09 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjb30CDiOqgoJOUBodxSTyg
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 18315
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1752217626
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754809716
    [effective_at] => 1752217716
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzIxMzQwOQ0200c1K3lhO1?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzIxMzQwOQ0200c1K3lhO1/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjb3UCDiOqgoJOUlOS6H3SV
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjb30CDiOqgoJOUBodxSTyg/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0005
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3Rjb4TCDiOqgoJOU1nmHyolq
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => void
    [status_transitions] => Array
        (
            [finalized_at] => 1752217716
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 1752254441
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752217628
)

[16-Jul-2025 13:30:10 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 70
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-16T05:34:36-07:00
                                            [LastUpdatedTime] => 2025-07-16T05:34:36-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt(test@fsdf.fg)
                                    [DisplayName] => testt(test@fsdf.fg)
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002099faf13f8ad34a4e63aef829e8a9142f8a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-16T06:30:10.303-07:00
        )

)

[16-Jul-2025 13:30:10 UTC] Using QBO customer ID: 70
[16-Jul-2025 13:30:10 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 70
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 165
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 26
                                )

                            [UnitPrice] => 5
                            [Qty] => 33
                            [TaxCodeRef] => Array
                                (
                                    [value] => GST
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-11
    [DueDate] => 2025-08-10
    [TotalAmt] => 183.15
    [PrivateNote] => Stripe Invoice ID: in_1Rjb30CDiOqgoJOUBodxSTyg
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => GST
                )

            [TotalTax] => 18.15
        )

)

[16-Jul-2025 13:30:11 UTC] QBO API response: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => A business validation error has occurred while processing your request
                                    [Detail] => Business Validation Error: Make sure all your transactions have a GST rate before you save.
                                    [code] => 6000
                                    [element] => 
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-16T06:30:11.135-07:00
        )

)

[16-Jul-2025 13:30:11 UTC] Invoice creation failed: Failed to create invoice in QuickBooks
[16-Jul-2025 13:30:11 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[16-Jul-2025 13:58:55 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[16-Jul-2025 13:58:55 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[16-Jul-2025 13:58:55 UTC] Starting invoice creation for event: evt_1Rjb31CDiOqgoJOUTLKYK87p
[16-Jul-2025 13:58:56 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function find_or_create_qbo_customer() in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php:57
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(43): process_stripe_invoice_created_to_qbo_invoice()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 57
[16-Jul-2025 14:31:29 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[16-Jul-2025 14:31:29 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[16-Jul-2025 14:31:29 UTC] Starting invoice creation process for event: evt_1Rjb31CDiOqgoJOUTLKYK87p
[16-Jul-2025 14:31:29 UTC] Fetching Stripe invoice: in_1Rjb30CDiOqgoJOUBodxSTyg
[16-Jul-2025 14:31:29 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjb30CDiOqgoJOUBodxSTyg
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 18315
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1752217626
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754809716
    [effective_at] => 1752217716
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzIxNzA4OQ0200fna0Fwmb?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzIxNzA4OQ0200fna0Fwmb/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjb3UCDiOqgoJOUlOS6H3SV
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjb30CDiOqgoJOUBodxSTyg/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0005
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3Rjb4TCDiOqgoJOU1nmHyolq
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => void
    [status_transitions] => Array
        (
            [finalized_at] => 1752217716
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 1752254441
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752217628
)

[16-Jul-2025 14:31:30 UTC] Detected QBO country: AU
[16-Jul-2025 14:31:31 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 70
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-16T05:34:36-07:00
                                            [LastUpdatedTime] => 2025-07-16T05:34:36-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt(test@fsdf.fg)
                                    [DisplayName] => testt(test@fsdf.fg)
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002099faf13f8ad34a4e63aef829e8a9142f8a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-16T07:31:31.094-07:00
        )

)

[16-Jul-2025 14:31:31 UTC] Using QBO customer ID: 70
[16-Jul-2025 14:31:32 UTC] Failed to create tax rate: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Unsupported Operation
                                    [Detail] => Operation Update is not supported.
                                    [code] => 500
                                    [element] => Operation
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-16T07:31:32.763-07:00
        )

)

[16-Jul-2025 14:31:32 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 70
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 165
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 26
                                )

                            [UnitPrice] => 5
                            [Qty] => 33
                            [TaxCodeRef] => Array
                                (
                                    [value] => 10
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-11
    [DueDate] => 2025-08-10
    [TotalAmt] => 183.15
    [PrivateNote] => Stripe Invoice ID: in_1Rjb30CDiOqgoJOUBodxSTyg
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [TxnTaxDetail] => Array
        (
            [TotalTax] => 18.15
            [TaxLine] => Array
                (
                )

        )

)

[16-Jul-2025 14:31:34 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 196
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-16T07:31:34-07:00
                            [LastModifiedByRef] => Array
                                (
                                    [value] => 9341455021033327
                                )

                            [LastUpdatedTime] => 2025-07-16T07:31:34-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-07-11
                    [CurrencyRef] => Array
                        (
                            [value] => AUD
                            [name] => Australian Dollar
                        )

                    [ExchangeRate] => 1
                    [PrivateNote] => Stripe Invoice ID: in_1Rjb30CDiOqgoJOUBodxSTyg
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 165
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 26
                                                    [name] => product1
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 33
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 81
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => 10
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 165
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 16.5
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 16.5
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 20
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 10
                                                    [NetAmountTaxable] => 165
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 70
                            [name] => testt(test@fsdf.fg)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 57
                            [Line1] => 2500 Garcia Ave
                            [Line2] => Sydney NSW  2050
                        )

                    [DueDate] => 2025-08-10
                    [GlobalTaxCalculation] => TaxExcluded
                    [TotalAmt] => 181.5
                    [HomeTotalAmt] => 181.5
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 181.5
                    [HomeBalance] => 181.5
                )

            [time] => 2025-07-16T07:31:33.341-07:00
        )

)

[16-Jul-2025 14:31:34 UTC] Invoice created successfully in QBO. Invoice ID: 196
[16-Jul-2025 14:31:34 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[16-Jul-2025 14:40:48 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[16-Jul-2025 14:40:48 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[16-Jul-2025 14:40:48 UTC] Starting invoice creation process for event: evt_1Rjb31CDiOqgoJOUTLKYK87p
[16-Jul-2025 14:40:48 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[16-Jul-2025 14:40:48 UTC] Invoice already processed. QBO Invoice ID: 196
[16-Jul-2025 14:41:29 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[16-Jul-2025 14:41:29 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[16-Jul-2025 14:41:29 UTC] Starting invoice creation process for event: evt_1Rjb31CDiOqgoJOUTLKYK87p
[16-Jul-2025 14:41:29 UTC] Fetching Stripe invoice: in_1Rjb30CDiOqgoJOUBodxSTyg
[16-Jul-2025 14:41:30 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjb30CDiOqgoJOUBodxSTyg
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 18315
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1752217626
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754809716
    [effective_at] => 1752217716
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzIxNzY5MA0200KiIiqt9r?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzIxNzY5MA0200KiIiqt9r/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjb3UCDiOqgoJOUlOS6H3SV
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjb30CDiOqgoJOUBodxSTyg/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0005
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3Rjb4TCDiOqgoJOU1nmHyolq
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => void
    [status_transitions] => Array
        (
            [finalized_at] => 1752217716
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 1752254441
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752217628
)

[16-Jul-2025 14:41:30 UTC] Detected QBO country: AU
[16-Jul-2025 14:41:31 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 181.5
                                    [BalanceWithJobs] => 181.5
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 70
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-16T05:34:36-07:00
                                            [LastUpdatedTime] => 2025-07-16T07:31:34-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt(test@fsdf.fg)
                                    [DisplayName] => testt(test@fsdf.fg)
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002099faf13f8ad34a4e63aef829e8a9142f8a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-16T07:41:31.250-07:00
        )

)

[16-Jul-2025 14:41:31 UTC] Using QBO customer ID: 70
[16-Jul-2025 14:41:32 UTC] Failed to create tax rate: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Unsupported Operation
                                    [Detail] => Operation Update is not supported.
                                    [code] => 500
                                    [element] => Operation
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-16T07:41:32.573-07:00
        )

)

[16-Jul-2025 14:41:33 UTC] Failed to create tax rate: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Unsupported Operation
                                    [Detail] => Operation Update is not supported.
                                    [code] => 500
                                    [element] => Operation
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-16T07:41:33.343-07:00
        )

)

[16-Jul-2025 14:41:33 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 70
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 165
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 26
                                )

                            [UnitPrice] => 5
                            [Qty] => 33
                            [TaxCodeRef] => Array
                                (
                                    [value] => GST
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-11
    [DueDate] => 2025-08-10
    [TotalAmt] => 183.15
    [PrivateNote] => Stripe Invoice ID: in_1Rjb30CDiOqgoJOUBodxSTyg
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [TxnTaxDetail] => Array
        (
            [TotalTax] => 18.15
            [TaxLine] => Array
                (
                    [0] => Array
                        (
                            [Amount] => 18.15
                            [DetailType] => TaxLineDetail
                            [TaxLineDetail] => Array
                                (
                                    [TaxRateRef] => Array
                                        (
                                            [value] => TAX
                                        )

                                    [NetAmountTaxable] => 165
                                    [PercentBased] => 1
                                    [TaxPercent] => 11
                                )

                        )

                )

        )

)

[16-Jul-2025 14:41:33 UTC] QBO API response: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Invalid Number
                                    [Detail] => Invalid Number : TAX
                                    [code] => 2090
                                    [element] => TxnTaxDetail.TaxLineDetail.TaxLine.TaxRateRef.value
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-16T07:41:33.667-07:00
        )

)

[16-Jul-2025 14:41:33 UTC] Invoice creation failed: Failed to create invoice in QuickBooks
[16-Jul-2025 14:41:33 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[16-Jul-2025 14:50:39 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function require_login() in /home/wdsklsxvqb/automationv.com/stripe-app/dashboard.php:7
Stack trace:
#0 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/dashboard.php on line 7
[16-Jul-2025 14:50:56 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function require_login() in /home/wdsklsxvqb/automationv.com/stripe-app/dashboard.php:7
Stack trace:
#0 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/dashboard.php on line 7
[16-Jul-2025 14:51:51 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function require_login() in /home/wdsklsxvqb/automationv.com/stripe-app/dashboard.php:7
Stack trace:
#0 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/dashboard.php on line 7
[16-Jul-2025 14:52:05 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function require_login() in /home/wdsklsxvqb/automationv.com/stripe-app/dashboard.php:7
Stack trace:
#0 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/dashboard.php on line 7
[16-Jul-2025 14:57:24 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[16-Jul-2025 14:57:24 UTC] PHP Fatal error:  Cannot redeclare make_qbo_api_request() (previously declared in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php:314) in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 408
[16-Jul-2025 15:17:55 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[16-Jul-2025 15:17:55 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[16-Jul-2025 15:17:55 UTC] Starting invoice creation process for event: evt_1Rjb31CDiOqgoJOUTLKYK87p
[16-Jul-2025 15:17:55 UTC] Fetching Stripe invoice: in_1Rjb30CDiOqgoJOUBodxSTyg
[16-Jul-2025 15:17:56 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjb30CDiOqgoJOUBodxSTyg
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 18315
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1752217626
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754809716
    [effective_at] => 1752217716
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzIxOTg3NQ0200msB6EZ1T?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzIxOTg3NQ0200msB6EZ1T/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjb3UCDiOqgoJOUlOS6H3SV
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjb30CDiOqgoJOUBodxSTyg/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0005
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3Rjb4TCDiOqgoJOU1nmHyolq
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => void
    [status_transitions] => Array
        (
            [finalized_at] => 1752217716
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 1752254441
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752217628
)

[16-Jul-2025 15:17:56 UTC] Detected QBO country: AU
[16-Jul-2025 15:17:57 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 181.5
                                    [BalanceWithJobs] => 181.5
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 70
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-16T05:34:36-07:00
                                            [LastUpdatedTime] => 2025-07-16T07:31:34-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt(test@fsdf.fg)
                                    [DisplayName] => testt(test@fsdf.fg)
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002099faf13f8ad34a4e63aef829e8a9142f8a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-16T08:17:57.134-07:00
        )

)

[16-Jul-2025 15:17:57 UTC] Using QBO customer ID: 70
[16-Jul-2025 15:17:58 UTC] Failed to create tax rate: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Unsupported Operation
                                    [Detail] => Operation Update is not supported.
                                    [code] => 500
                                    [element] => Operation
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-16T08:17:58.203-07:00
        )

)

[16-Jul-2025 15:17:58 UTC] Failed to create tax rate: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Unsupported Operation
                                    [Detail] => Operation Update is not supported.
                                    [code] => 500
                                    [element] => Operation
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-16T08:17:58.958-07:00
        )

)

[16-Jul-2025 15:17:58 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 70
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 165
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 26
                                )

                            [UnitPrice] => 5
                            [Qty] => 33
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-11
    [DueDate] => 2025-08-10
    [TotalAmt] => 183.15
    [PrivateNote] => Stripe Invoice ID: in_1Rjb30CDiOqgoJOUBodxSTyg
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [TxnTaxDetail] => Array
        (
            [TotalTax] => 18.15
            [TaxLine] => Array
                (
                )

        )

)

[16-Jul-2025 15:17:59 UTC] QBO API response: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => A business validation error has occurred while processing your request
                                    [Detail] => Business Validation Error: Make sure all your transactions have a GST rate before you save.
                                    [code] => 6000
                                    [element] => 
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-16T08:17:59.286-07:00
        )

)

[16-Jul-2025 15:17:59 UTC] Invoice creation failed: Failed to create invoice in QuickBooks
[16-Jul-2025 15:17:59 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[16-Jul-2025 17:05:24 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[16-Jul-2025 17:05:24 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[16-Jul-2025 17:05:24 UTC] Starting invoice creation process for event: evt_1Rjb31CDiOqgoJOUTLKYK87p
[16-Jul-2025 17:05:24 UTC] Fetching Stripe invoice: in_1Rjb30CDiOqgoJOUBodxSTyg
[16-Jul-2025 17:05:24 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjb30CDiOqgoJOUBodxSTyg
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 18315
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1752217626
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754809716
    [effective_at] => 1752217716
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzIyNjMyNA0200Xn6JFREg?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzIyNjMyNA0200Xn6JFREg/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjb3UCDiOqgoJOUlOS6H3SV
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjb30CDiOqgoJOUBodxSTyg/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0005
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3Rjb4TCDiOqgoJOU1nmHyolq
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => void
    [status_transitions] => Array
        (
            [finalized_at] => 1752217716
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 1752254441
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752217628
)

[16-Jul-2025 17:05:25 UTC] Detected QBO country: AU
[16-Jul-2025 17:05:26 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 181.5
                                    [BalanceWithJobs] => 181.5
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 70
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-16T05:34:36-07:00
                                            [LastUpdatedTime] => 2025-07-16T07:31:34-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt(test@fsdf.fg)
                                    [DisplayName] => testt(test@fsdf.fg)
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002099faf13f8ad34a4e63aef829e8a9142f8a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-16T10:05:26.174-07:00
        )

)

[16-Jul-2025 17:05:26 UTC] Using QBO customer ID: 70
[16-Jul-2025 17:05:28 UTC] Failed to create tax rate: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Unsupported Operation
                                    [Detail] => Operation Update is not supported.
                                    [code] => 500
                                    [element] => Operation
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-16T10:05:28.500-07:00
        )

)

[16-Jul-2025 17:05:30 UTC] Failed to create tax rate: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Unsupported Operation
                                    [Detail] => Operation Update is not supported.
                                    [code] => 500
                                    [element] => Operation
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-16T10:05:30.233-07:00
        )

)

[16-Jul-2025 17:05:30 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 70
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 165
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 26
                                )

                            [UnitPrice] => 5
                            [Qty] => 33
                        )

                )

        )

    [TxnDate] => 2025-07-11
    [DueDate] => 2025-08-10
    [TotalAmt] => 183.15
    [PrivateNote] => Stripe Invoice ID: in_1Rjb30CDiOqgoJOUBodxSTyg
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [TxnTaxDetail] => Array
        (
            [TotalTax] => 18.15
            [TaxLine] => Array
                (
                )

        )

)

[16-Jul-2025 17:05:31 UTC] QBO API response: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => A business validation error has occurred while processing your request
                                    [Detail] => Business Validation Error: Make sure all your transactions have a GST rate before you save.
                                    [code] => 6000
                                    [element] => 
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-16T10:05:30.564-07:00
        )

)

[16-Jul-2025 17:05:31 UTC] Invoice creation failed: Failed to create invoice in QuickBooks
[16-Jul-2025 17:05:31 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[16-Jul-2025 18:32:21 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[16-Jul-2025 18:32:21 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[16-Jul-2025 18:32:21 UTC] Starting invoice creation process for event: evt_1Rjb31CDiOqgoJOUTLKYK87p
[16-Jul-2025 18:32:21 UTC] Fetching Stripe invoice: in_1Rjb30CDiOqgoJOUBodxSTyg
[16-Jul-2025 18:32:21 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjb30CDiOqgoJOUBodxSTyg
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 18315
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1752217626
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754809716
    [effective_at] => 1752217716
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzIzMTU0MQ0200bq1sPdBR?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzIzMTU0MQ0200bq1sPdBR/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjb3UCDiOqgoJOUlOS6H3SV
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjb30CDiOqgoJOUBodxSTyg/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0005
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3Rjb4TCDiOqgoJOU1nmHyolq
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => void
    [status_transitions] => Array
        (
            [finalized_at] => 1752217716
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 1752254441
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752217628
)

[16-Jul-2025 18:32:22 UTC] Detected QBO country: AU
[16-Jul-2025 18:32:22 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 181.5
                                    [BalanceWithJobs] => 181.5
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 70
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-16T05:34:36-07:00
                                            [LastUpdatedTime] => 2025-07-16T07:31:34-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt(test@fsdf.fg)
                                    [DisplayName] => testt(test@fsdf.fg)
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002099faf13f8ad34a4e63aef829e8a9142f8a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-16T11:32:22.781-07:00
        )

)

[16-Jul-2025 18:32:22 UTC] Using QBO customer ID: 70
[16-Jul-2025 18:32:23 UTC] PHP Warning:  Undefined array key "RateValue" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 234
[16-Jul-2025 18:32:23 UTC] PHP Warning:  Undefined array key "RateValue" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 234
[16-Jul-2025 18:32:23 UTC] PHP Warning:  Undefined array key "RateValue" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 234
[16-Jul-2025 18:32:23 UTC] PHP Warning:  Undefined array key "RateValue" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 234
[16-Jul-2025 18:32:23 UTC] PHP Warning:  Undefined array key "RateValue" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 234
[16-Jul-2025 18:32:23 UTC] PHP Warning:  Undefined array key "RateValue" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 234
[16-Jul-2025 18:32:23 UTC] PHP Warning:  Undefined array key "RateValue" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 234
[16-Jul-2025 18:32:23 UTC] PHP Warning:  Undefined array key "RateValue" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 234
[16-Jul-2025 18:32:23 UTC] PHP Warning:  Undefined array key "RateValue" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 234
[16-Jul-2025 18:32:23 UTC] PHP Warning:  Undefined array key "RateValue" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 234
[16-Jul-2025 18:32:23 UTC] PHP Warning:  Undefined array key "RateValue" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 234
[16-Jul-2025 18:32:23 UTC] Available QBO tax rates: Array
(
    [9] => Array
        (
            [type] => rate
            [id] => 9
            [name] => Wine Tax Refundable
            [rate] => 
            [active] => 1
        )

    [10] => Array
        (
            [type] => rate
            [id] => 10
            [name] => Luxury Car Tax Refundable
            [rate] => 
            [active] => 1
        )

    [5] => Array
        (
            [type] => rate
            [id] => 5
            [name] => Input tax (purchases)
            [rate] => 0
            [active] => 1
        )

    [8] => Array
        (
            [type] => rate
            [id] => 8
            [name] => GST free exports (Sales)
            [rate] => 0
            [active] => 1
        )

    [4] => Array
        (
            [type] => rate
            [id] => 4
            [name] => GST free (sales)
            [rate] => 0
            [active] => 1
        )

    [2] => Array
        (
            [type] => rate
            [id] => 2
            [name] => GST-free non-capital (purchases)
            [rate] => 0
            [active] => 1
        )

    [7] => Array
        (
            [type] => rate
            [id] => 7
            [name] => GST-free capital (purchases)
            [rate] => 0
            [active] => 1
        )

    [3] => Array
        (
            [type] => rate
            [id] => 3
            [name] => GST on capital (purchases)
            [rate] => 10
            [active] => 1
        )

    [6] => Array
        (
            [type] => rate
            [id] => 6
            [name] => Input tax (sales)
            [rate] => 0
            [active] => 1
        )

    [12] => Array
        (
            [type] => rate
            [id] => 12
            [name] => Credit From FBT Instalment
            [rate] => 
            [active] => 1
        )

    [11] => Array
        (
            [type] => rate
            [id] => 11
            [name] => Credit From PAYG Income Tax Instalment
            [rate] => 
            [active] => 1
        )

    [18] => Array
        (
            [type] => rate
            [id] => 18
            [name] => FBT Instalment
            [rate] => 
            [active] => 1
        )

    [19] => Array
        (
            [type] => rate
            [id] => 19
            [name] => Fuel Tax
            [rate] => 
            [active] => 1
        )

    [13] => Array
        (
            [type] => rate
            [id] => 13
            [name] => Fuel Tax Credit
            [rate] => 
            [active] => 1
        )

    [20] => Array
        (
            [type] => rate
            [id] => 20
            [name] => GST (sales)
            [rate] => 10
            [active] => 1
        )

    [1] => Array
        (
            [type] => rate
            [id] => 1
            [name] => GST on non-capital (purchases)
            [rate] => 10
            [active] => 1
        )

    [15] => Array
        (
            [type] => rate
            [id] => 15
            [name] => Luxury Car Tax
            [rate] => 
            [active] => 1
        )

    [17] => Array
        (
            [type] => rate
            [id] => 17
            [name] => PAYG Income Tax Instalment
            [rate] => 
            [active] => 1
        )

    [16] => Array
        (
            [type] => rate
            [id] => 16
            [name] => PAYG Tax Withheld
            [rate] => 
            [active] => 1
        )

    [14] => Array
        (
            [type] => rate
            [id] => 14
            [name] => Wine Equalisation Tax
            [rate] => 
            [active] => 1
        )

)

[16-Jul-2025 18:32:24 UTC] Failed to create tax rate: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Unsupported Operation
                                    [Detail] => Operation Update is not supported.
                                    [code] => 500
                                    [element] => Operation
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-16T11:32:24.485-07:00
        )

)

[16-Jul-2025 18:32:25 UTC] Failed to create tax rate: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Unsupported Operation
                                    [Detail] => Operation Update is not supported.
                                    [code] => 500
                                    [element] => Operation
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-16T11:32:24.996-07:00
        )

)

[16-Jul-2025 18:32:25 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 70
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 165
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 26
                                )

                            [UnitPrice] => 5
                            [Qty] => 33
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-11
    [DueDate] => 2025-08-10
    [TotalAmt] => 183.15
    [PrivateNote] => Stripe Invoice ID: in_1Rjb30CDiOqgoJOUBodxSTyg
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [TxnTaxDetail] => Array
        (
            [TotalTax] => 18.15
            [TaxLine] => Array
                (
                )

        )

)

[16-Jul-2025 18:32:25 UTC] QBO API response: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => A business validation error has occurred while processing your request
                                    [Detail] => Business Validation Error: Make sure all your transactions have a GST rate before you save.
                                    [code] => 6000
                                    [element] => 
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-16T11:32:25.318-07:00
        )

)

[16-Jul-2025 18:32:25 UTC] Invoice creation failed: Failed to create invoice in QuickBooks
[16-Jul-2025 18:32:25 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[16-Jul-2025 18:57:53 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[16-Jul-2025 18:57:53 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[16-Jul-2025 18:57:53 UTC] Starting invoice creation process for event: evt_1Rjb31CDiOqgoJOUTLKYK87p
[16-Jul-2025 18:57:53 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjb30CDiOqgoJOUBodxSTyg
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 18315
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1752217626
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754809716
    [effective_at] => 1752217716
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzIzMzA3Mw0200VRBj8QyR?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzIzMzA3Mw0200VRBj8QyR/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjb3UCDiOqgoJOUlOS6H3SV
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjb30CDiOqgoJOUBodxSTyg/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0005
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3Rjb4TCDiOqgoJOU1nmHyolq
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => void
    [status_transitions] => Array
        (
            [finalized_at] => 1752217716
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 1752254441
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752217628
)

[16-Jul-2025 18:57:54 UTC] Detected QBO country: AU
[16-Jul-2025 18:57:54 UTC] Using QBO customer ID: 70
[16-Jul-2025 18:57:55 UTC] PHP Warning:  Undefined array key "RateValue" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 370
[16-Jul-2025 18:57:55 UTC] PHP Warning:  Undefined array key "RateValue" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 370
[16-Jul-2025 18:57:55 UTC] PHP Warning:  Undefined array key "RateValue" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 370
[16-Jul-2025 18:57:55 UTC] PHP Warning:  Undefined array key "RateValue" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 370
[16-Jul-2025 18:57:55 UTC] PHP Warning:  Undefined array key "RateValue" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 370
[16-Jul-2025 18:57:55 UTC] PHP Warning:  Undefined array key "RateValue" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 370
[16-Jul-2025 18:57:55 UTC] PHP Warning:  Undefined array key "RateValue" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 370
[16-Jul-2025 18:57:55 UTC] PHP Warning:  Undefined array key "RateValue" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 370
[16-Jul-2025 18:57:55 UTC] PHP Warning:  Undefined array key "RateValue" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 370
[16-Jul-2025 18:57:55 UTC] PHP Warning:  Undefined array key "RateValue" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 370
[16-Jul-2025 18:57:55 UTC] PHP Warning:  Undefined array key "RateValue" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 370
[16-Jul-2025 18:57:56 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 70
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 165
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 26
                                )

                            [UnitPrice] => 5
                            [Qty] => 33
                            [TaxCodeRef] => Array
                                (
                                    [value] => NON
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-11
    [DueDate] => 2025-08-10
    [TotalAmt] => 183.15
    [PrivateNote] => Stripe Invoice ID: in_1Rjb30CDiOqgoJOUBodxSTyg
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [TxnTaxDetail] => Array
        (
            [TotalTax] => 18.15
            [TaxLine] => Array
                (
                    [0] => Array
                        (
                            [Amount] => 18.15
                            [DetailType] => TaxLineDetail
                            [TaxLineDetail] => Array
                                (
                                    [TaxRateRef] => Array
                                        (
                                            [value] => 20
                                        )

                                    [NetAmountTaxable] => 165
                                    [PercentBased] => 1
                                    [TaxPercent] => 11
                                )

                        )

                )

        )

)

[16-Jul-2025 18:57:56 UTC] QBO API response: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => A business validation error has occurred while processing your request
                                    [Detail] => Business Validation Error: Make sure all your transactions have a GST rate before you save.
                                    [code] => 6000
                                    [element] => 
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-16T11:57:56.349-07:00
        )

)

[16-Jul-2025 18:57:56 UTC] Invoice creation failed: Failed to create invoice in QuickBooks
[16-Jul-2025 18:57:56 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[17-Jul-2025 05:38:23 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[17-Jul-2025 05:38:23 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[17-Jul-2025 05:38:23 UTC] Starting invoice creation process for event: evt_1Rjb31CDiOqgoJOUTLKYK87p
[17-Jul-2025 05:38:23 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjb30CDiOqgoJOUBodxSTyg
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 18315
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1752217626
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754809716
    [effective_at] => 1752217716
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzI3MTUwMw0200tktwd4tm?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzI3MTUwMw0200tktwd4tm/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjb3UCDiOqgoJOUlOS6H3SV
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjb30CDiOqgoJOUBodxSTyg/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0005
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3Rjb4TCDiOqgoJOU1nmHyolq
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => void
    [status_transitions] => Array
        (
            [finalized_at] => 1752217716
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 1752254441
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752217628
)

[17-Jul-2025 05:38:24 UTC] Detected QBO country: AU
[17-Jul-2025 05:38:25 UTC] Using QBO customer ID: 70
[17-Jul-2025 05:38:26 UTC] PHP Warning:  Undefined array key "RateValue" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 444
[17-Jul-2025 05:38:26 UTC] PHP Warning:  Undefined array key "RateValue" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 444
[17-Jul-2025 05:38:26 UTC] PHP Warning:  Undefined array key "RateValue" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 444
[17-Jul-2025 05:38:26 UTC] PHP Warning:  Undefined array key "RateValue" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 444
[17-Jul-2025 05:38:26 UTC] PHP Warning:  Undefined array key "RateValue" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 444
[17-Jul-2025 05:38:26 UTC] PHP Warning:  Undefined array key "RateValue" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 444
[17-Jul-2025 05:38:26 UTC] PHP Warning:  Undefined array key "RateValue" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 444
[17-Jul-2025 05:38:26 UTC] PHP Warning:  Undefined array key "RateValue" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 444
[17-Jul-2025 05:38:26 UTC] PHP Warning:  Undefined array key "RateValue" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 444
[17-Jul-2025 05:38:26 UTC] PHP Warning:  Undefined array key "RateValue" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 444
[17-Jul-2025 05:38:26 UTC] PHP Warning:  Undefined array key "RateValue" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 444
[17-Jul-2025 05:38:28 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 70
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 18.15
                    [Description] => GST
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 27
                                )

                            [Qty] => 1
                            [UnitPrice] => 18.15
                            [TaxCodeRef] => Array
                                (
                                    [value] => 10
                                )

                        )

                )

            [1] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 165
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 26
                                )

                            [UnitPrice] => 5
                            [Qty] => 33
                            [TaxCodeRef] => Array
                                (
                                    [value] => NON
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-11
    [DueDate] => 2025-08-10
    [PrivateNote] => Stripe Invoice ID: in_1Rjb30CDiOqgoJOUBodxSTyg
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [GlobalTaxCalculation] => TaxInclusive
)

[17-Jul-2025 05:38:29 UTC] QBO API response: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => A business validation error has occurred while processing your request
                                    [Detail] => Business Validation Error: Make sure all your transactions have a GST rate before you save.
                                    [code] => 6000
                                    [element] => 
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-16T22:38:28.881-07:00
        )

)

[17-Jul-2025 05:38:29 UTC] Invoice creation failed: Failed to create invoice in QuickBooks
[17-Jul-2025 05:38:29 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[17-Jul-2025 06:51:23 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[17-Jul-2025 06:51:23 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[17-Jul-2025 06:51:23 UTC] Starting invoice creation process for event: evt_1Rjb31CDiOqgoJOUTLKYK87p
[17-Jul-2025 06:51:23 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjb30CDiOqgoJOUBodxSTyg
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 18315
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1752217626
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754809716
    [effective_at] => 1752217716
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzI3NTg4Mw0200SFoSJb3M?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzI3NTg4Mw0200SFoSJb3M/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjb3UCDiOqgoJOUlOS6H3SV
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjb30CDiOqgoJOUBodxSTyg/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0005
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3Rjb4TCDiOqgoJOU1nmHyolq
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => void
    [status_transitions] => Array
        (
            [finalized_at] => 1752217716
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 1752254441
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752217628
)

[17-Jul-2025 06:51:24 UTC] Detected QBO country: AU
[17-Jul-2025 06:51:25 UTC] Using QBO customer ID: 70
[17-Jul-2025 06:51:26 UTC] PHP Warning:  Undefined array key "RateValue" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 432
[17-Jul-2025 06:51:26 UTC] PHP Warning:  Undefined array key "RateValue" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 432
[17-Jul-2025 06:51:26 UTC] PHP Warning:  Undefined array key "RateValue" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 432
[17-Jul-2025 06:51:26 UTC] PHP Warning:  Undefined array key "RateValue" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 432
[17-Jul-2025 06:51:26 UTC] PHP Warning:  Undefined array key "RateValue" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 432
[17-Jul-2025 06:51:26 UTC] PHP Warning:  Undefined array key "RateValue" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 432
[17-Jul-2025 06:51:26 UTC] PHP Warning:  Undefined array key "RateValue" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 432
[17-Jul-2025 06:51:26 UTC] PHP Warning:  Undefined array key "RateValue" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 432
[17-Jul-2025 06:51:26 UTC] PHP Warning:  Undefined array key "RateValue" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 432
[17-Jul-2025 06:51:26 UTC] PHP Warning:  Undefined array key "RateValue" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 432
[17-Jul-2025 06:51:26 UTC] PHP Warning:  Undefined array key "RateValue" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 432
[17-Jul-2025 06:51:26 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 70
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 165
                    [Description] => product1
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 26
                                )

                            [UnitPrice] => 5
                            [Qty] => 33
                            [TaxCodeRef] => Array
                                (
                                    [value] => NON
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-11
    [DueDate] => 2025-08-10
    [PrivateNote] => Stripe Invoice ID: in_1Rjb30CDiOqgoJOUBodxSTyg
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [GlobalTaxCalculation] => TaxInclusive
    [TotalAmt] => 183.15
)

[17-Jul-2025 06:51:27 UTC] QBO API response: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => A business validation error has occurred while processing your request
                                    [Detail] => Business Validation Error: Make sure all your transactions have a GST rate before you save.
                                    [code] => 6000
                                    [element] => 
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-16T23:51:27.218-07:00
        )

)

[17-Jul-2025 06:51:27 UTC] Invoice creation failed: Failed to create invoice in QuickBooks
[17-Jul-2025 06:51:27 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[17-Jul-2025 15:05:58 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function get_quickbooks_client() in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php:16
Stack trace:
#0 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 16
[17-Jul-2025 15:18:18 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function get_quickbooks_client() in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php:16
Stack trace:
#0 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 16
[17-Jul-2025 15:23:16 UTC] PHP Warning:  require_once(/home/wdsklsxvqb/automationv.com/stripe-app/vendor/autoload.php): Failed to open stream: No such file or directory in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 25
[17-Jul-2025 15:23:16 UTC] PHP Fatal error:  Uncaught Error: Failed opening required '/home/wdsklsxvqb/automationv.com/stripe-app/vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php:25
Stack trace:
#0 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 25
[17-Jul-2025 15:29:05 UTC] PHP Parse error:  syntax error, unexpected token "<", expecting end of file in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 166
[17-Jul-2025 15:29:08 UTC] PHP Parse error:  syntax error, unexpected token "<", expecting end of file in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 166
[17-Jul-2025 15:29:21 UTC] QuickBooks API error: {"warnings":null,"intuitObject":null,"fault":{"error":[{"message":"message=AuthenticationFailed; errorCode=003200; statusCode=401","detail":"Token expired","code":"3200","element":null}],"type":"AUTHENTICATION"},"report":null,"queryResponse":null,"batchItemResponse":[],"attachableResponse":[],"syncErrorResponse":null,"requestId":null,"time":1752766161430,"status":null,"cdcresponse":[]}
[17-Jul-2025 15:35:15 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function get_quickbooks_client() in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php:18
Stack trace:
#0 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 18
[17-Jul-2025 15:39:06 UTC] PHP Fatal error:  Uncaught Error: Call to a member function getTaxRates() on array in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php:19
Stack trace:
#0 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 19
[17-Jul-2025 15:39:11 UTC] PHP Fatal error:  Uncaught Error: Call to a member function getTaxRates() on array in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php:19
Stack trace:
#0 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 19
[17-Jul-2025 15:42:06 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:06 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:06 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:06 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:06 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:06 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:06 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:06 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:06 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:06 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:06 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:06 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:06 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:06 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:06 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:06 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:06 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:06 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:06 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:06 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:06 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:34 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:34 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:34 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:34 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:34 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:34 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:34 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:34 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:34 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:34 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:34 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:34 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:34 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:34 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:34 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:34 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:34 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:34 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:34 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:34 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:34 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:43 UTC] PHP Fatal error:  Uncaught mysqli_sql_exception: Unknown column 'tax_exempt_id' in 'SET' in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php:55
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php(55): mysqli->prepare()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 55
[17-Jul-2025 15:42:52 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:52 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:52 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:52 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:52 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:52 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:52 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:52 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:52 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:52 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:52 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:52 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:52 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:52 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:52 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:52 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:52 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:52 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:52 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:52 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:42:52 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 228
[17-Jul-2025 15:47:03 UTC] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php:23) in /home/wdsklsxvqb/automationv.com/stripe-app/session.php on line 73
[17-Jul-2025 15:47:03 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:47:03 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:47:03 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:47:03 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:47:03 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:47:03 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:47:03 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:47:03 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:47:03 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:47:03 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:47:03 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:47:03 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:47:03 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:47:03 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:47:03 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:47:03 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:47:03 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:47:03 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:47:03 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:47:03 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:47:03 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:49:01 UTC] PHP Warning:  Array to string conversion in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 23
[17-Jul-2025 15:49:01 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:49:01 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:49:01 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:49:01 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:49:01 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:49:01 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:49:01 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:49:01 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:49:01 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:49:01 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:49:01 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:49:01 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:49:01 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:49:01 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:49:01 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:49:01 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:49:01 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:49:01 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:49:01 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:49:01 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:49:01 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:51:37 UTC] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php:23) in /home/wdsklsxvqb/automationv.com/stripe-app/session.php on line 73
[17-Jul-2025 15:51:37 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:51:37 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:51:37 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:51:37 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:51:37 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:51:37 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:51:37 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:51:37 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:51:37 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:51:37 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:51:37 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:51:37 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:51:37 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:51:37 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:51:37 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:51:37 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:51:37 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:51:37 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:51:37 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:51:37 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 15:51:37 UTC] PHP Warning:  Undefined array key "tax_exempt_id" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 229
[17-Jul-2025 18:38:58 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[17-Jul-2025 18:38:58 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[17-Jul-2025 18:38:58 UTC] Starting invoice creation process for event: evt_1Rjb31CDiOqgoJOUTLKYK87p
[17-Jul-2025 18:38:58 UTC] Fetching Stripe invoice: in_1Rjb30CDiOqgoJOUBodxSTyg
[17-Jul-2025 18:38:59 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjb30CDiOqgoJOUBodxSTyg
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 18315
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1752217626
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754809716
    [effective_at] => 1752217716
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzMxODMzOA0200EjHZQfiy?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzMxODMzOA0200EjHZQfiy/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjb3UCDiOqgoJOUlOS6H3SV
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjb30CDiOqgoJOUBodxSTyg/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0005
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3Rjb4TCDiOqgoJOU1nmHyolq
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => void
    [status_transitions] => Array
        (
            [finalized_at] => 1752217716
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 1752254441
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752217628
)

[17-Jul-2025 18:38:59 UTC] Detected QBO country: AU
[17-Jul-2025 18:38:59 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 181.5
                                    [BalanceWithJobs] => 181.5
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 70
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-16T05:34:36-07:00
                                            [LastUpdatedTime] => 2025-07-16T07:31:34-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt(test@fsdf.fg)
                                    [DisplayName] => testt(test@fsdf.fg)
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002099faf13f8ad34a4e63aef829e8a9142f8a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-17T11:38:59.790-07:00
        )

)

[17-Jul-2025 18:38:59 UTC] Using QBO customer ID: 70
[17-Jul-2025 18:39:01 UTC] Failed to create tax rate: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Unsupported Operation
                                    [Detail] => Operation Create is not supported.
                                    [code] => 500
                                    [element] => Operation
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-17T11:39:01.319-07:00
        )

)

[17-Jul-2025 18:39:01 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 70
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 165
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 26
                                )

                            [UnitPrice] => 5
                            [Qty] => 33
                            [TaxCodeRef] => Array
                                (
                                    [value] => 10
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-11
    [DueDate] => 2025-08-10
    [TotalAmt] => 183.15
    [PrivateNote] => Stripe Invoice ID: in_1Rjb30CDiOqgoJOUBodxSTyg
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [TxnTaxDetail] => Array
        (
            [TotalTax] => 18.15
            [TaxLine] => Array
                (
                )

        )

)

[17-Jul-2025 18:39:02 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 197
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-17T11:39:02-07:00
                            [LastModifiedByRef] => Array
                                (
                                    [value] => 9341455021033327
                                )

                            [LastUpdatedTime] => 2025-07-17T11:39:02-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-07-11
                    [CurrencyRef] => Array
                        (
                            [value] => AUD
                            [name] => Australian Dollar
                        )

                    [ExchangeRate] => 1
                    [PrivateNote] => Stripe Invoice ID: in_1Rjb30CDiOqgoJOUBodxSTyg
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 165
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 26
                                                    [name] => product1
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 33
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 81
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => 10
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 165
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 16.5
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 16.5
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 20
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 10
                                                    [NetAmountTaxable] => 165
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 70
                            [name] => testt(test@fsdf.fg)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 59
                            [Line1] => 2500 Garcia Ave
                            [Line2] => Sydney NSW  2050
                        )

                    [DueDate] => 2025-08-10
                    [GlobalTaxCalculation] => TaxExcluded
                    [TotalAmt] => 181.5
                    [HomeTotalAmt] => 181.5
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 181.5
                    [HomeBalance] => 181.5
                )

            [time] => 2025-07-17T11:39:01.630-07:00
        )

)

[17-Jul-2025 18:39:02 UTC] Invoice created successfully in QBO. Invoice ID: 197
[17-Jul-2025 18:39:02 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[17-Jul-2025 18:40:41 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[17-Jul-2025 18:40:41 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[17-Jul-2025 18:40:41 UTC] Starting invoice creation process for event: evt_1Rjb31CDiOqgoJOUTLKYK87p
[17-Jul-2025 18:40:41 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[17-Jul-2025 18:40:41 UTC] Invoice already processed. QBO Invoice ID: 197
[17-Jul-2025 18:41:42 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[17-Jul-2025 18:41:42 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[17-Jul-2025 18:41:42 UTC] Starting invoice creation process for event: evt_1Rjb31CDiOqgoJOUTLKYK87p
[17-Jul-2025 18:41:42 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjb30CDiOqgoJOUBodxSTyg
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 18315
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1752217626
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754809716
    [effective_at] => 1752217716
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzMxODUwMg0200KGtPhUW4?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzMxODUwMg0200KGtPhUW4/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjb3UCDiOqgoJOUlOS6H3SV
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjb30CDiOqgoJOUBodxSTyg/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0005
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3Rjb4TCDiOqgoJOU1nmHyolq
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => void
    [status_transitions] => Array
        (
            [finalized_at] => 1752217716
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 1752254441
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752217628
)

[17-Jul-2025 18:41:43 UTC] Detected QBO country: AU
[17-Jul-2025 18:41:43 UTC] Using QBO customer ID: 70
[17-Jul-2025 18:41:44 UTC] PHP Warning:  Undefined array key "RateValue" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 432
[17-Jul-2025 18:41:44 UTC] PHP Warning:  Undefined array key "RateValue" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 432
[17-Jul-2025 18:41:44 UTC] PHP Warning:  Undefined array key "RateValue" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 432
[17-Jul-2025 18:41:44 UTC] PHP Warning:  Undefined array key "RateValue" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 432
[17-Jul-2025 18:41:44 UTC] PHP Warning:  Undefined array key "RateValue" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 432
[17-Jul-2025 18:41:44 UTC] PHP Warning:  Undefined array key "RateValue" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 432
[17-Jul-2025 18:41:44 UTC] PHP Warning:  Undefined array key "RateValue" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 432
[17-Jul-2025 18:41:44 UTC] PHP Warning:  Undefined array key "RateValue" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 432
[17-Jul-2025 18:41:44 UTC] PHP Warning:  Undefined array key "RateValue" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 432
[17-Jul-2025 18:41:44 UTC] PHP Warning:  Undefined array key "RateValue" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 432
[17-Jul-2025 18:41:44 UTC] PHP Warning:  Undefined array key "RateValue" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 432
[17-Jul-2025 18:41:45 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 70
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 165
                    [Description] => product1
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 26
                                )

                            [UnitPrice] => 5
                            [Qty] => 33
                            [TaxCodeRef] => Array
                                (
                                    [value] => NON
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-11
    [DueDate] => 2025-08-10
    [PrivateNote] => Stripe Invoice ID: in_1Rjb30CDiOqgoJOUBodxSTyg
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [GlobalTaxCalculation] => TaxInclusive
    [TotalAmt] => 183.15
)

[17-Jul-2025 18:41:45 UTC] QBO API response: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => A business validation error has occurred while processing your request
                                    [Detail] => Business Validation Error: Make sure all your transactions have a GST rate before you save.
                                    [code] => 6000
                                    [element] => 
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-17T11:41:45.264-07:00
        )

)

[17-Jul-2025 18:41:45 UTC] Invoice creation failed: Failed to create invoice in QuickBooks
[17-Jul-2025 18:41:45 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[17-Jul-2025 18:44:11 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[17-Jul-2025 18:44:11 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[17-Jul-2025 18:44:11 UTC] Starting invoice creation process for event: evt_1Rjb31CDiOqgoJOUTLKYK87p
[17-Jul-2025 18:44:11 UTC] Fetching Stripe invoice: in_1Rjb30CDiOqgoJOUBodxSTyg
[17-Jul-2025 18:44:11 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjb30CDiOqgoJOUBodxSTyg
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 18315
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1752217626
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754809716
    [effective_at] => 1752217716
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzMxODY1MQ02002Xc6TXyw?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzMxODY1MQ02002Xc6TXyw/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjb3UCDiOqgoJOUlOS6H3SV
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjb30CDiOqgoJOUBodxSTyg/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0005
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3Rjb4TCDiOqgoJOU1nmHyolq
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => void
    [status_transitions] => Array
        (
            [finalized_at] => 1752217716
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 1752254441
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752217628
)

[17-Jul-2025 18:44:12 UTC] Detected QBO country: AU
[17-Jul-2025 18:44:12 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 363
                                    [BalanceWithJobs] => 363
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 70
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-16T05:34:36-07:00
                                            [LastUpdatedTime] => 2025-07-17T11:39:02-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt(test@fsdf.fg)
                                    [DisplayName] => testt(test@fsdf.fg)
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002099faf13f8ad34a4e63aef829e8a9142f8a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-17T11:44:12.485-07:00
        )

)

[17-Jul-2025 18:44:12 UTC] Using QBO customer ID: 70
[17-Jul-2025 18:44:13 UTC] Failed to create tax rate: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Unsupported Operation
                                    [Detail] => Operation Create is not supported.
                                    [code] => 500
                                    [element] => Operation
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-17T11:44:13.895-07:00
        )

)

[17-Jul-2025 18:44:13 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 70
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 165
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 26
                                )

                            [UnitPrice] => 5
                            [Qty] => 33
                            [TaxCodeRef] => Array
                                (
                                    [value] => 10
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-11
    [DueDate] => 2025-08-10
    [TotalAmt] => 183.15
    [PrivateNote] => Stripe Invoice ID: in_1Rjb30CDiOqgoJOUBodxSTyg
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [TxnTaxDetail] => Array
        (
            [TotalTax] => 18.15
            [TaxLine] => Array
                (
                )

        )

)

[17-Jul-2025 18:44:14 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 198
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-17T11:44:15-07:00
                            [LastModifiedByRef] => Array
                                (
                                    [value] => 9341455021033327
                                )

                            [LastUpdatedTime] => 2025-07-17T11:44:15-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-07-11
                    [CurrencyRef] => Array
                        (
                            [value] => AUD
                            [name] => Australian Dollar
                        )

                    [ExchangeRate] => 1
                    [PrivateNote] => Stripe Invoice ID: in_1Rjb30CDiOqgoJOUBodxSTyg
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 165
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 26
                                                    [name] => product1
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 33
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 81
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => 10
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 165
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 16.5
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 16.5
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 20
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 10
                                                    [NetAmountTaxable] => 165
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 70
                            [name] => testt(test@fsdf.fg)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 60
                            [Line1] => 2500 Garcia Ave
                            [Line2] => Sydney NSW  2050
                        )

                    [DueDate] => 2025-08-10
                    [GlobalTaxCalculation] => TaxExcluded
                    [TotalAmt] => 181.5
                    [HomeTotalAmt] => 181.5
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 181.5
                    [HomeBalance] => 181.5
                )

            [time] => 2025-07-17T11:44:14.152-07:00
        )

)

[17-Jul-2025 18:44:14 UTC] Invoice created successfully in QBO. Invoice ID: 198
[17-Jul-2025 18:44:14 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[17-Jul-2025 18:46:40 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[17-Jul-2025 18:46:40 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[17-Jul-2025 18:46:40 UTC] Starting invoice creation process for event: evt_1Rjb31CDiOqgoJOUTLKYK87p
[17-Jul-2025 18:46:40 UTC] Fetching Stripe invoice: in_1Rjb30CDiOqgoJOUBodxSTyg
[17-Jul-2025 18:46:41 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjb30CDiOqgoJOUBodxSTyg
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 18315
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1752217626
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754809716
    [effective_at] => 1752217716
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzMxODgwMQ0200aKDe3OXD?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzMxODgwMQ0200aKDe3OXD/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjb3UCDiOqgoJOUlOS6H3SV
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjb30CDiOqgoJOUBodxSTyg/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0005
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3Rjb4TCDiOqgoJOU1nmHyolq
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => void
    [status_transitions] => Array
        (
            [finalized_at] => 1752217716
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 1752254441
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752217628
)

[17-Jul-2025 18:46:41 UTC] Detected QBO country: AU
[17-Jul-2025 18:46:41 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 544.5
                                    [BalanceWithJobs] => 544.5
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 70
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-16T05:34:36-07:00
                                            [LastUpdatedTime] => 2025-07-17T11:44:15-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt(test@fsdf.fg)
                                    [DisplayName] => testt(test@fsdf.fg)
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002099faf13f8ad34a4e63aef829e8a9142f8a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-17T11:46:41.904-07:00
        )

)

[17-Jul-2025 18:46:41 UTC] Using QBO customer ID: 70
[17-Jul-2025 18:46:43 UTC] Failed to create tax rate: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Unsupported Operation
                                    [Detail] => Operation Create is not supported.
                                    [code] => 500
                                    [element] => Operation
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-17T11:46:43.624-07:00
        )

)

[17-Jul-2025 18:46:43 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 70
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 165
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 26
                                )

                            [UnitPrice] => 5
                            [Qty] => 33
                            [TaxCodeRef] => Array
                                (
                                    [value] => 10
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-11
    [DueDate] => 2025-08-10
    [TotalAmt] => 183.15
    [PrivateNote] => Stripe Invoice ID: in_1Rjb30CDiOqgoJOUBodxSTyg
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [TxnTaxDetail] => Array
        (
            [TotalTax] => 18.15
            [TaxLine] => Array
                (
                )

        )

)

[17-Jul-2025 18:46:44 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 199
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-17T11:46:44-07:00
                            [LastModifiedByRef] => Array
                                (
                                    [value] => 9341455021033327
                                )

                            [LastUpdatedTime] => 2025-07-17T11:46:44-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-07-11
                    [CurrencyRef] => Array
                        (
                            [value] => AUD
                            [name] => Australian Dollar
                        )

                    [ExchangeRate] => 1
                    [PrivateNote] => Stripe Invoice ID: in_1Rjb30CDiOqgoJOUBodxSTyg
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 165
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 26
                                                    [name] => product1
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 33
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 81
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => 10
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 165
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 16.5
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 16.5
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 20
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 10
                                                    [NetAmountTaxable] => 165
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 70
                            [name] => testt(test@fsdf.fg)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 61
                            [Line1] => 2500 Garcia Ave
                            [Line2] => Sydney NSW  2050
                        )

                    [DueDate] => 2025-08-10
                    [GlobalTaxCalculation] => TaxExcluded
                    [TotalAmt] => 181.5
                    [HomeTotalAmt] => 181.5
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 181.5
                    [HomeBalance] => 181.5
                )

            [time] => 2025-07-17T11:46:43.936-07:00
        )

)

[17-Jul-2025 18:46:44 UTC] Invoice created successfully in QBO. Invoice ID: 199
[17-Jul-2025 18:46:44 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[17-Jul-2025 18:56:13 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[17-Jul-2025 18:56:13 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[17-Jul-2025 18:56:13 UTC] Starting invoice creation process for event: evt_1Rjb31CDiOqgoJOUTLKYK87p
[17-Jul-2025 18:56:13 UTC] Fetching Stripe invoice: in_1Rjb30CDiOqgoJOUBodxSTyg
[17-Jul-2025 18:56:14 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjb30CDiOqgoJOUBodxSTyg
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 18315
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1752217626
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754809716
    [effective_at] => 1752217716
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzMxOTM3NA0200xnoyOMzs?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzMxOTM3NA0200xnoyOMzs/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjb3UCDiOqgoJOUlOS6H3SV
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjb30CDiOqgoJOUBodxSTyg/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0005
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3Rjb4TCDiOqgoJOU1nmHyolq
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => void
    [status_transitions] => Array
        (
            [finalized_at] => 1752217716
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 1752254441
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752217628
)

[17-Jul-2025 18:56:15 UTC] Detected QBO country: AU
[17-Jul-2025 18:56:15 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 726
                                    [BalanceWithJobs] => 726
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 70
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-16T05:34:36-07:00
                                            [LastUpdatedTime] => 2025-07-17T11:46:44-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt(test@fsdf.fg)
                                    [DisplayName] => testt(test@fsdf.fg)
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002099faf13f8ad34a4e63aef829e8a9142f8a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-17T11:56:15.605-07:00
        )

)

[17-Jul-2025 18:56:15 UTC] Using QBO customer ID: 70
[17-Jul-2025 18:56:16 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 70
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 165
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 26
                                )

                            [UnitPrice] => 5
                            [Qty] => 33
                            [TaxCodeRef] => Array
                                (
                                    [value] => 21
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-11
    [DueDate] => 2025-08-10
    [TotalAmt] => 183.15
    [PrivateNote] => Stripe Invoice ID: in_1Rjb30CDiOqgoJOUBodxSTyg
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [TxnTaxDetail] => Array
        (
            [TotalTax] => 18.15
            [TaxLine] => Array
                (
                    [0] => Array
                        (
                            [Amount] => 18.15
                            [DetailType] => TaxLineDetail
                            [TaxLineDetail] => Array
                                (
                                    [TaxRateRef] => Array
                                        (
                                            [value] => 21
                                        )

                                    [NetAmountTaxable] => 165
                                    [PercentBased] => 1
                                    [TaxPercent] => 11
                                )

                        )

                )

        )

)

[17-Jul-2025 18:56:17 UTC] QBO API response: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => A business validation error has occurred while processing your request
                                    [Detail] => Business Validation Error: Were sorry, QuickBooks encountered an error while calculating tax. Try reselecting the tax rate or reentering the product/service item and saving the form again.
                                    [code] => 6000
                                    [element] => 
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-17T11:56:16.422-07:00
        )

)

[17-Jul-2025 18:56:17 UTC] Invoice creation failed: Failed to create invoice in QuickBooks
[17-Jul-2025 18:56:17 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[18-Jul-2025 08:53:25 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[18-Jul-2025 08:53:25 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[18-Jul-2025 08:53:25 UTC] Starting invoice creation process for event: evt_1Rjb31CDiOqgoJOUTLKYK87p
[18-Jul-2025 08:53:25 UTC] Fetching Stripe invoice: in_1Rjb30CDiOqgoJOUBodxSTyg
[18-Jul-2025 08:53:26 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjb30CDiOqgoJOUBodxSTyg
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 18315
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1752217626
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754809716
    [effective_at] => 1752217716
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzM2OTYwNg0200qfilGcfd?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzM2OTYwNg0200qfilGcfd/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjb3UCDiOqgoJOUlOS6H3SV
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjb30CDiOqgoJOUBodxSTyg/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0005
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3Rjb4TCDiOqgoJOU1nmHyolq
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => void
    [status_transitions] => Array
        (
            [finalized_at] => 1752217716
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 1752254441
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752217628
)

[18-Jul-2025 08:53:26 UTC] PHP Warning:  Undefined array key "TaxForm" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 61
[18-Jul-2025 08:53:26 UTC] PHP Warning:  Undefined array key "TaxForm" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 61
[18-Jul-2025 08:53:27 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 1277.1
                                    [BalanceWithJobs] => 1277.1
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 70
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-16T05:34:36-07:00
                                            [LastUpdatedTime] => 2025-07-17T23:39:12-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt(test@fsdf.fg)
                                    [DisplayName] => testt(test@fsdf.fg)
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002099faf13f8ad34a4e63aef829e8a9142f8a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-18T01:53:27.022-07:00
        )

)

[18-Jul-2025 08:53:27 UTC] Using QBO customer ID: 70
[18-Jul-2025 08:53:28 UTC] Failed to create tax rate: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Unsupported Operation
                                    [Detail] => Operation Create is not supported.
                                    [code] => 500
                                    [element] => Operation
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-18T01:53:28.257-07:00
        )

)

[18-Jul-2025 08:53:28 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 70
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 165
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 26
                                )

                            [UnitPrice] => 5
                            [Qty] => 33
                            [TaxCodeRef] => Array
                                (
                                    [value] => NON
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-11
    [DueDate] => 2025-08-10
    [TotalAmt] => 183.15
    [PrivateNote] => Stripe Invoice ID: in_1Rjb30CDiOqgoJOUBodxSTyg
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [ExchangeRate] => 1
    [GlobalTaxCalculation] => TaxExcluded
    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 18.15
        )

)

[18-Jul-2025 08:53:29 UTC] QBO API response: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => A business validation error has occurred while processing your request
                                    [Detail] => Business Validation Error: You can only use one foreign currency per transaction.
                                    [code] => 6000
                                    [element] => 
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-18T01:53:28.550-07:00
        )

)

[18-Jul-2025 08:53:29 UTC] Invoice creation failed: Failed to create invoice in QuickBooks
[18-Jul-2025 08:53:29 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[18-Jul-2025 08:59:20 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[18-Jul-2025 08:59:20 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[18-Jul-2025 08:59:20 UTC] Starting invoice creation process for event: evt_1Rjb31CDiOqgoJOUTLKYK87p
[18-Jul-2025 08:59:20 UTC] Fetching Stripe invoice: in_1Rjb30CDiOqgoJOUBodxSTyg
[18-Jul-2025 08:59:20 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjb30CDiOqgoJOUBodxSTyg
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 18315
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1752217626
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754809716
    [effective_at] => 1752217716
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzM2OTk2MA02005UgeiO1w?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzM2OTk2MA02005UgeiO1w/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjb3UCDiOqgoJOUlOS6H3SV
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjb30CDiOqgoJOUBodxSTyg/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0005
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3Rjb4TCDiOqgoJOU1nmHyolq
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => void
    [status_transitions] => Array
        (
            [finalized_at] => 1752217716
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 1752254441
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752217628
)

[18-Jul-2025 08:59:20 UTC] PHP Warning:  Undefined array key "TaxForm" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 60
[18-Jul-2025 08:59:20 UTC] PHP Warning:  Undefined array key "TaxForm" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 60
[18-Jul-2025 08:59:21 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 1277.1
                                    [BalanceWithJobs] => 1277.1
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 70
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-16T05:34:36-07:00
                                            [LastUpdatedTime] => 2025-07-17T23:39:12-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt(test@fsdf.fg)
                                    [DisplayName] => testt(test@fsdf.fg)
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002099faf13f8ad34a4e63aef829e8a9142f8a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-18T01:59:21.222-07:00
        )

)

[18-Jul-2025 08:59:21 UTC] Using QBO customer ID: 70
[18-Jul-2025 08:59:22 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 70
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 165
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 26
                                )

                            [UnitPrice] => 5
                            [Qty] => 33
                            [TaxCodeRef] => Array
                                (
                                    [value] => NON
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-11
    [DueDate] => 2025-08-10
    [TotalAmt] => 183.15
    [PrivateNote] => Stripe Invoice ID: in_1Rjb30CDiOqgoJOUBodxSTyg
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 18.15
        )

)

[18-Jul-2025 08:59:22 UTC] QBO API response: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => A business validation error has occurred while processing your request
                                    [Detail] => Business Validation Error: Make sure all your transactions have a GST rate before you save.
                                    [code] => 6000
                                    [element] => 
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-18T01:59:22.457-07:00
        )

)

[18-Jul-2025 08:59:22 UTC] Invoice creation failed: Failed to create invoice in QuickBooks
[18-Jul-2025 08:59:22 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[18-Jul-2025 09:03:46 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[18-Jul-2025 09:03:46 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[18-Jul-2025 09:03:46 UTC] Starting invoice creation process for event: evt_1Rjb31CDiOqgoJOUTLKYK87p
[18-Jul-2025 09:03:46 UTC] Fetching Stripe invoice: in_1Rjb30CDiOqgoJOUBodxSTyg
[18-Jul-2025 09:03:47 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjb30CDiOqgoJOUBodxSTyg
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 18315
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1752217626
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754809716
    [effective_at] => 1752217716
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzM3MDIyNw02005ri3jB92?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzM3MDIyNw02005ri3jB92/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjb3UCDiOqgoJOUlOS6H3SV
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjb30CDiOqgoJOUBodxSTyg/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0005
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3Rjb4TCDiOqgoJOU1nmHyolq
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => void
    [status_transitions] => Array
        (
            [finalized_at] => 1752217716
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 1752254441
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752217628
)

[18-Jul-2025 09:03:47 UTC] PHP Warning:  Undefined array key "TaxForm" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 60
[18-Jul-2025 09:03:47 UTC] PHP Warning:  Undefined array key "TaxForm" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 60
[18-Jul-2025 09:03:48 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 1277.1
                                    [BalanceWithJobs] => 1277.1
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 70
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-16T05:34:36-07:00
                                            [LastUpdatedTime] => 2025-07-17T23:39:12-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt(test@fsdf.fg)
                                    [DisplayName] => testt(test@fsdf.fg)
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002099faf13f8ad34a4e63aef829e8a9142f8a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-18T02:03:48.060-07:00
        )

)

[18-Jul-2025 09:03:48 UTC] Using QBO customer ID: 70
[18-Jul-2025 09:03:49 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 70
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 165
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 26
                                )

                            [UnitPrice] => 5
                            [Qty] => 33
                            [TaxCodeRef] => Array
                                (
                                    [value] => NON
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-11
    [DueDate] => 2025-08-10
    [TotalAmt] => 183.15
    [PrivateNote] => Stripe Invoice ID: in_1Rjb30CDiOqgoJOUBodxSTyg
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 18.15
        )

)

[18-Jul-2025 09:03:49 UTC] QBO API response: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => A business validation error has occurred while processing your request
                                    [Detail] => Business Validation Error: Make sure all your transactions have a GST rate before you save.
                                    [code] => 6000
                                    [element] => 
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-18T02:03:49.289-07:00
        )

)

[18-Jul-2025 09:03:49 UTC] Invoice creation failed: Failed to create invoice in QuickBooks
[18-Jul-2025 09:03:49 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[18-Jul-2025 09:25:08 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[18-Jul-2025 09:25:08 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[18-Jul-2025 09:25:08 UTC] Starting invoice creation process for event: evt_1Rjb31CDiOqgoJOUTLKYK87p
[18-Jul-2025 09:25:08 UTC] Fetching Stripe invoice: in_1Rjb30CDiOqgoJOUBodxSTyg
[18-Jul-2025 09:25:09 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjb30CDiOqgoJOUBodxSTyg
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 18315
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1752217626
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754809716
    [effective_at] => 1752217716
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzM3MTUwOQ0200kWcC7ira?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzM3MTUwOQ0200kWcC7ira/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjb3UCDiOqgoJOUlOS6H3SV
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjb30CDiOqgoJOUBodxSTyg/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0005
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3Rjb4TCDiOqgoJOU1nmHyolq
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => void
    [status_transitions] => Array
        (
            [finalized_at] => 1752217716
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 1752254441
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752217628
)

[18-Jul-2025 09:25:10 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 1277.1
                                    [BalanceWithJobs] => 1277.1
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 70
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-16T05:34:36-07:00
                                            [LastUpdatedTime] => 2025-07-17T23:39:12-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt(test@fsdf.fg)
                                    [DisplayName] => testt(test@fsdf.fg)
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002099faf13f8ad34a4e63aef829e8a9142f8a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-18T02:25:09.934-07:00
        )

)

[18-Jul-2025 09:25:10 UTC] Using QBO customer ID: 70
[18-Jul-2025 09:25:11 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 70
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 165
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 26
                                )

                            [UnitPrice] => 5
                            [Qty] => 33
                            [TaxCodeRef] => Array
                                (
                                    [value] => NON
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-11
    [DueDate] => 2025-08-10
    [TotalAmt] => 183.15
    [PrivateNote] => Stripe Invoice ID: in_1Rjb30CDiOqgoJOUBodxSTyg
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 18.15
        )

)

[18-Jul-2025 09:25:11 UTC] QBO API response: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => A business validation error has occurred while processing your request
                                    [Detail] => Business Validation Error: Make sure all your transactions have a GST rate before you save.
                                    [code] => 6000
                                    [element] => 
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-18T02:25:11.298-07:00
        )

)

[18-Jul-2025 09:25:11 UTC] Invoice creation failed: Failed to create invoice in QuickBooks
[18-Jul-2025 09:25:11 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[18-Jul-2025 09:30:08 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[18-Jul-2025 09:30:08 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[18-Jul-2025 09:30:08 UTC] Starting invoice creation process for event: evt_1Rjb31CDiOqgoJOUTLKYK87p
[18-Jul-2025 09:30:08 UTC] Fetching Stripe invoice: in_1Rjb30CDiOqgoJOUBodxSTyg
[18-Jul-2025 09:30:09 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjb30CDiOqgoJOUBodxSTyg
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 18315
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1752217626
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754809716
    [effective_at] => 1752217716
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzM3MTgwOQ020026SoKAru?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzM3MTgwOQ020026SoKAru/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjb3UCDiOqgoJOUlOS6H3SV
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjb30CDiOqgoJOUBodxSTyg/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0005
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3Rjb4TCDiOqgoJOU1nmHyolq
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => void
    [status_transitions] => Array
        (
            [finalized_at] => 1752217716
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 1752254441
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752217628
)

[18-Jul-2025 09:30:09 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 1277.1
                                    [BalanceWithJobs] => 1277.1
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 70
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-16T05:34:36-07:00
                                            [LastUpdatedTime] => 2025-07-17T23:39:12-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt(test@fsdf.fg)
                                    [DisplayName] => testt(test@fsdf.fg)
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002099faf13f8ad34a4e63aef829e8a9142f8a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-18T02:30:09.758-07:00
        )

)

[18-Jul-2025 09:30:09 UTC] Using QBO customer ID: 70
[18-Jul-2025 09:30:10 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 70
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 165
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 26
                                )

                            [UnitPrice] => 5
                            [Qty] => 33
                            [TaxCodeRef] => 20
                        )

                )

        )

    [TxnDate] => 2025-07-11
    [DueDate] => 2025-08-10
    [TotalAmt] => 183.15
    [PrivateNote] => Stripe Invoice ID: in_1Rjb30CDiOqgoJOUBodxSTyg
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 18.15
        )

)

[18-Jul-2025 09:30:11 UTC] QBO API response: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Request has invalid or unsupported property
                                    [Detail] => Property Name:failed to parse json object; a property specified is unsupported or invalid
                                    [code] => 2010
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-18T02:30:11.092-07:00
        )

)

[18-Jul-2025 09:30:11 UTC] Invoice creation failed: Failed to create invoice in QuickBooks
[18-Jul-2025 09:30:11 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[18-Jul-2025 09:30:56 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[18-Jul-2025 09:30:56 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[18-Jul-2025 09:30:56 UTC] Starting invoice creation process for event: evt_1Rjb31CDiOqgoJOUTLKYK87p
[18-Jul-2025 09:30:56 UTC] Fetching Stripe invoice: in_1Rjb30CDiOqgoJOUBodxSTyg
[18-Jul-2025 09:30:56 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjb30CDiOqgoJOUBodxSTyg
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 18315
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1752217626
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754809716
    [effective_at] => 1752217716
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzM3MTg1Ng02002ngTXl7b?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzM3MTg1Ng02002ngTXl7b/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjb3UCDiOqgoJOUlOS6H3SV
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjb30CDiOqgoJOUBodxSTyg/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0005
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3Rjb4TCDiOqgoJOU1nmHyolq
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => void
    [status_transitions] => Array
        (
            [finalized_at] => 1752217716
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 1752254441
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752217628
)

[18-Jul-2025 09:30:57 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 1277.1
                                    [BalanceWithJobs] => 1277.1
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 70
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-16T05:34:36-07:00
                                            [LastUpdatedTime] => 2025-07-17T23:39:12-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt(test@fsdf.fg)
                                    [DisplayName] => testt(test@fsdf.fg)
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002099faf13f8ad34a4e63aef829e8a9142f8a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-18T02:30:56.993-07:00
        )

)

[18-Jul-2025 09:30:57 UTC] Using QBO customer ID: 70
[18-Jul-2025 09:30:57 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 70
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 165
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 26
                                )

                            [UnitPrice] => 5
                            [Qty] => 33
                            [TaxCodeRef] => 20
                        )

                )

        )

    [TxnDate] => 2025-07-11
    [DueDate] => 2025-08-10
    [TotalAmt] => 183.15
    [PrivateNote] => Stripe Invoice ID: in_1Rjb30CDiOqgoJOUBodxSTyg
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 18.15
        )

)

[18-Jul-2025 09:30:58 UTC] QBO API response: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Request has invalid or unsupported property
                                    [Detail] => Property Name:failed to parse json object; a property specified is unsupported or invalid
                                    [code] => 2010
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-18T02:30:58.105-07:00
        )

)

[18-Jul-2025 09:30:58 UTC] Invoice creation failed: Failed to create invoice in QuickBooks
[18-Jul-2025 09:30:58 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[18-Jul-2025 09:31:50 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[18-Jul-2025 09:31:50 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[18-Jul-2025 09:31:50 UTC] Starting invoice creation process for event: evt_1Rjb31CDiOqgoJOUTLKYK87p
[18-Jul-2025 09:31:50 UTC] Fetching Stripe invoice: in_1Rjb30CDiOqgoJOUBodxSTyg
[18-Jul-2025 09:31:50 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjb30CDiOqgoJOUBodxSTyg
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 18315
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1752217626
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754809716
    [effective_at] => 1752217716
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzM3MTkxMA0200hHaD956F?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzM3MTkxMA0200hHaD956F/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjb3UCDiOqgoJOUlOS6H3SV
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjb30CDiOqgoJOUBodxSTyg/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0005
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3Rjb4TCDiOqgoJOU1nmHyolq
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => void
    [status_transitions] => Array
        (
            [finalized_at] => 1752217716
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 1752254441
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752217628
)

[18-Jul-2025 09:31:51 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 1277.1
                                    [BalanceWithJobs] => 1277.1
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 70
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-16T05:34:36-07:00
                                            [LastUpdatedTime] => 2025-07-17T23:39:12-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt(test@fsdf.fg)
                                    [DisplayName] => testt(test@fsdf.fg)
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002099faf13f8ad34a4e63aef829e8a9142f8a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-18T02:31:51.340-07:00
        )

)

[18-Jul-2025 09:31:51 UTC] Using QBO customer ID: 70
[18-Jul-2025 09:31:52 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 70
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 165
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 26
                                )

                            [UnitPrice] => 5
                            [Qty] => 33
                            [TaxCodeRef] => Array
                                (
                                    [value] => 20
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-11
    [DueDate] => 2025-08-10
    [TotalAmt] => 183.15
    [PrivateNote] => Stripe Invoice ID: in_1Rjb30CDiOqgoJOUBodxSTyg
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 18.15
        )

)

[18-Jul-2025 09:31:52 UTC] QBO API response: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => A business validation error has occurred while processing your request
                                    [Detail] => Business Validation Error: Were sorry, QuickBooks encountered an error while calculating tax. Try reselecting the tax rate or reentering the product/service item and saving the form again.
                                    [code] => 6000
                                    [element] => 
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-18T02:31:52.496-07:00
        )

)

[18-Jul-2025 09:31:52 UTC] Invoice creation failed: Failed to create invoice in QuickBooks
[18-Jul-2025 09:31:52 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[18-Jul-2025 09:33:39 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[18-Jul-2025 09:33:39 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[18-Jul-2025 09:33:39 UTC] Starting invoice creation process for event: evt_1Rjb31CDiOqgoJOUTLKYK87p
[18-Jul-2025 09:33:39 UTC] Fetching Stripe invoice: in_1Rjb30CDiOqgoJOUBodxSTyg
[18-Jul-2025 09:33:40 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjb30CDiOqgoJOUBodxSTyg
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 18315
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1752217626
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754809716
    [effective_at] => 1752217716
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzM3MjAyMA0200xZMe5voB?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzM3MjAyMA0200xZMe5voB/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjb3UCDiOqgoJOUlOS6H3SV
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjb30CDiOqgoJOUBodxSTyg/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0005
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3Rjb4TCDiOqgoJOU1nmHyolq
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => void
    [status_transitions] => Array
        (
            [finalized_at] => 1752217716
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 1752254441
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752217628
)

[18-Jul-2025 09:33:41 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 1277.1
                                    [BalanceWithJobs] => 1277.1
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 70
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-16T05:34:36-07:00
                                            [LastUpdatedTime] => 2025-07-17T23:39:12-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt(test@fsdf.fg)
                                    [DisplayName] => testt(test@fsdf.fg)
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002099faf13f8ad34a4e63aef829e8a9142f8a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-18T02:33:40.943-07:00
        )

)

[18-Jul-2025 09:33:41 UTC] Using QBO customer ID: 70
[18-Jul-2025 09:33:41 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 70
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 165
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 26
                                )

                            [UnitPrice] => 5
                            [Qty] => 33
                            [TaxCodeRef] => Array
                                (
                                    [value] => 11
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-11
    [DueDate] => 2025-08-10
    [TotalAmt] => 183.15
    [PrivateNote] => Stripe Invoice ID: in_1Rjb30CDiOqgoJOUBodxSTyg
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 18.15
        )

)

[18-Jul-2025 09:33:42 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 203
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-18T02:33:43-07:00
                            [LastModifiedByRef] => Array
                                (
                                    [value] => 9341455021033327
                                )

                            [LastUpdatedTime] => 2025-07-18T02:33:43-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-07-11
                    [CurrencyRef] => Array
                        (
                            [value] => AUD
                            [name] => Australian Dollar
                        )

                    [ExchangeRate] => 1
                    [PrivateNote] => Stripe Invoice ID: in_1Rjb30CDiOqgoJOUBodxSTyg
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 165
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 26
                                                    [name] => product1
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 33
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 81
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => 11
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 165
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 18.15
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 18.15
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 21
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 11
                                                    [NetAmountTaxable] => 165
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 70
                            [name] => testt(test@fsdf.fg)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 65
                            [Line1] => 2500 Garcia Ave
                            [Line2] => Sydney NSW  2050
                        )

                    [DueDate] => 2025-08-10
                    [GlobalTaxCalculation] => TaxExcluded
                    [TotalAmt] => 183.15
                    [HomeTotalAmt] => 183.15
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 183.15
                    [HomeBalance] => 183.15
                )

            [time] => 2025-07-18T02:33:42.161-07:00
        )

)

[18-Jul-2025 09:33:42 UTC] Invoice created successfully in QBO. Invoice ID: 203
[18-Jul-2025 09:33:42 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[18-Jul-2025 09:35:59 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[18-Jul-2025 09:35:59 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[18-Jul-2025 09:35:59 UTC] Starting invoice creation process for event: evt_1Rjb31CDiOqgoJOUTLKYK87p
[18-Jul-2025 09:35:59 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[18-Jul-2025 09:35:59 UTC] Invoice already processed. QBO Invoice ID: 203
[18-Jul-2025 09:37:29 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[18-Jul-2025 09:37:29 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[18-Jul-2025 09:37:29 UTC] Starting invoice creation process for event: evt_1Rjb31CDiOqgoJOUTLKYK87p
[18-Jul-2025 09:37:29 UTC] Fetching Stripe invoice: in_1Rjb30CDiOqgoJOUBodxSTyg
[18-Jul-2025 09:37:29 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjb30CDiOqgoJOUBodxSTyg
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 18315
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1752217626
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754809716
    [effective_at] => 1752217716
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzM3MjI0OQ0200XlOnfcVv?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzM3MjI0OQ0200XlOnfcVv/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjb3UCDiOqgoJOUlOS6H3SV
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjb30CDiOqgoJOUBodxSTyg/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0005
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3Rjb4TCDiOqgoJOU1nmHyolq
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => void
    [status_transitions] => Array
        (
            [finalized_at] => 1752217716
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 1752254441
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752217628
)

[18-Jul-2025 09:37:30 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 70
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-16T05:34:36-07:00
                                            [LastUpdatedTime] => 2025-07-18T02:35:52-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt(test@fsdf.fg)
                                    [DisplayName] => testt(test@fsdf.fg)
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002099faf13f8ad34a4e63aef829e8a9142f8a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-18T02:37:30.368-07:00
        )

)

[18-Jul-2025 09:37:30 UTC] Using QBO customer ID: 70
[18-Jul-2025 09:37:31 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 70
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 165
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 26
                                )

                            [UnitPrice] => 5
                            [Qty] => 33
                            [TaxCodeRef] => Array
                                (
                                    [value] => 11
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-11
    [DueDate] => 2025-08-10
    [TotalAmt] => 183.15
    [PrivateNote] => Stripe Invoice ID: in_1Rjb30CDiOqgoJOUBodxSTyg
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 18.15
        )

)

[18-Jul-2025 09:37:32 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 204
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-18T02:37:32-07:00
                            [LastModifiedByRef] => Array
                                (
                                    [value] => 9341455021033327
                                )

                            [LastUpdatedTime] => 2025-07-18T02:37:32-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-07-11
                    [CurrencyRef] => Array
                        (
                            [value] => AUD
                            [name] => Australian Dollar
                        )

                    [ExchangeRate] => 1
                    [PrivateNote] => Stripe Invoice ID: in_1Rjb30CDiOqgoJOUBodxSTyg
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 165
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 26
                                                    [name] => product1
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 33
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 81
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => 11
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 165
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 18.15
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 18.15
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 21
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 11
                                                    [NetAmountTaxable] => 165
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 70
                            [name] => testt(test@fsdf.fg)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 66
                            [Line1] => 2500 Garcia Ave
                            [Line2] => Sydney NSW  2050
                        )

                    [DueDate] => 2025-08-10
                    [GlobalTaxCalculation] => TaxExcluded
                    [TotalAmt] => 183.15
                    [HomeTotalAmt] => 183.15
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 183.15
                    [HomeBalance] => 183.15
                )

            [time] => 2025-07-18T02:37:31.576-07:00
        )

)

[18-Jul-2025 09:37:32 UTC] Invoice created successfully in QBO. Invoice ID: 204
[18-Jul-2025 09:37:32 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[18-Jul-2025 10:02:05 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[18-Jul-2025 10:02:05 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[18-Jul-2025 10:02:05 UTC] Starting invoice creation process for event: evt_1Rjb31CDiOqgoJOUTLKYK87p
[18-Jul-2025 10:02:05 UTC] Fetching Stripe invoice: in_1Rjb30CDiOqgoJOUBodxSTyg
[18-Jul-2025 10:02:05 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjb30CDiOqgoJOUBodxSTyg
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 18315
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1752217626
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754809716
    [effective_at] => 1752217716
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzM3MzcyNQ0200Tal48cxl?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzM3MzcyNQ0200Tal48cxl/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjb3UCDiOqgoJOUlOS6H3SV
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjb30CDiOqgoJOUBodxSTyg/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0005
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3Rjb4TCDiOqgoJOU1nmHyolq
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => void
    [status_transitions] => Array
        (
            [finalized_at] => 1752217716
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 1752254441
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752217628
)

[18-Jul-2025 10:02:06 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 183.15
                                    [BalanceWithJobs] => 183.15
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 70
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-16T05:34:36-07:00
                                            [LastUpdatedTime] => 2025-07-18T02:37:32-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt(test@fsdf.fg)
                                    [DisplayName] => testt(test@fsdf.fg)
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002099faf13f8ad34a4e63aef829e8a9142f8a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-18T03:02:06.368-07:00
        )

)

[18-Jul-2025 10:02:06 UTC] Using QBO customer ID: 70
[18-Jul-2025 10:02:07 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 70
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 165
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 26
                                )

                            [UnitPrice] => 5
                            [Qty] => 33
                            [TaxCodeRef] => Array
                                (
                                    [value] => 11
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-11
    [DueDate] => 2025-08-10
    [TotalAmt] => 183.15
    [PrivateNote] => Stripe Invoice ID: in_1Rjb30CDiOqgoJOUBodxSTyg
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 18.15
        )

)

[18-Jul-2025 10:02:08 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 205
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-18T03:02:08-07:00
                            [LastModifiedByRef] => Array
                                (
                                    [value] => 9341455021033327
                                )

                            [LastUpdatedTime] => 2025-07-18T03:02:08-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-07-11
                    [CurrencyRef] => Array
                        (
                            [value] => AUD
                            [name] => Australian Dollar
                        )

                    [ExchangeRate] => 1
                    [PrivateNote] => Stripe Invoice ID: in_1Rjb30CDiOqgoJOUBodxSTyg
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 165
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 26
                                                    [name] => product1
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 33
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 81
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => 11
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 165
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 18.15
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 18.15
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 21
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 11
                                                    [NetAmountTaxable] => 165
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 70
                            [name] => testt(test@fsdf.fg)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 67
                            [Line1] => 2500 Garcia Ave
                            [Line2] => Sydney NSW  2050
                        )

                    [DueDate] => 2025-08-10
                    [GlobalTaxCalculation] => TaxExcluded
                    [TotalAmt] => 183.15
                    [HomeTotalAmt] => 183.15
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 183.15
                    [HomeBalance] => 183.15
                )

            [time] => 2025-07-18T03:02:07.650-07:00
        )

)

[18-Jul-2025 10:02:08 UTC] Invoice created successfully in QBO. Invoice ID: 205
[18-Jul-2025 10:02:08 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[18-Jul-2025 10:23:09 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[18-Jul-2025 10:23:09 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[18-Jul-2025 10:23:09 UTC] Starting invoice creation process for event: evt_1Rjb31CDiOqgoJOUTLKYK87p
[18-Jul-2025 10:23:09 UTC] Fetching Stripe invoice: in_1Rjb30CDiOqgoJOUBodxSTyg
[18-Jul-2025 10:23:09 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjb30CDiOqgoJOUBodxSTyg
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 18315
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1752217626
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754809716
    [effective_at] => 1752217716
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzM3NDk4OQ0200pRkGNhbG?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzM3NDk4OQ0200pRkGNhbG/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjb3UCDiOqgoJOUlOS6H3SV
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjb30CDiOqgoJOUBodxSTyg/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0005
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3Rjb4TCDiOqgoJOU1nmHyolq
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => void
    [status_transitions] => Array
        (
            [finalized_at] => 1752217716
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 1752254441
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752217628
)

[18-Jul-2025 10:23:10 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 366.3
                                    [BalanceWithJobs] => 366.3
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 70
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-16T05:34:36-07:00
                                            [LastUpdatedTime] => 2025-07-18T03:02:08-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt(test@fsdf.fg)
                                    [DisplayName] => testt(test@fsdf.fg)
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002099faf13f8ad34a4e63aef829e8a9142f8a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-18T03:23:10.372-07:00
        )

)

[18-Jul-2025 10:23:10 UTC] Using QBO customer ID: 70
[18-Jul-2025 10:23:11 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 70
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 165
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 26
                                )

                            [UnitPrice] => 5
                            [Qty] => 33
                            [TaxCodeRef] => Array
                                (
                                    [value] => NON
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-11
    [DueDate] => 2025-08-10
    [TotalAmt] => 183.15
    [PrivateNote] => Stripe Invoice ID: in_1Rjb30CDiOqgoJOUBodxSTyg
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 18.15
        )

)

[18-Jul-2025 10:23:12 UTC] QBO API response: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => A business validation error has occurred while processing your request
                                    [Detail] => Business Validation Error: Make sure all your transactions have a GST rate before you save.
                                    [code] => 6000
                                    [element] => 
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-18T03:23:11.823-07:00
        )

)

[18-Jul-2025 10:23:12 UTC] Invoice creation failed: Failed to create invoice in QuickBooks
[18-Jul-2025 10:23:12 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[18-Jul-2025 10:25:33 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[18-Jul-2025 10:25:33 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[18-Jul-2025 10:25:33 UTC] Starting invoice creation process for event: evt_1Rjb31CDiOqgoJOUTLKYK87p
[18-Jul-2025 10:25:33 UTC] Fetching Stripe invoice: in_1Rjb30CDiOqgoJOUBodxSTyg
[18-Jul-2025 10:25:33 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjb30CDiOqgoJOUBodxSTyg
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 18315
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1752217626
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754809716
    [effective_at] => 1752217716
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzM3NTEzMw0200914nYk9x?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzM3NTEzMw0200914nYk9x/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjb3UCDiOqgoJOUlOS6H3SV
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjb30CDiOqgoJOUBodxSTyg/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0005
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3Rjb4TCDiOqgoJOU1nmHyolq
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => void
    [status_transitions] => Array
        (
            [finalized_at] => 1752217716
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 1752254441
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752217628
)

[18-Jul-2025 10:25:34 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 366.3
                                    [BalanceWithJobs] => 366.3
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 70
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-16T05:34:36-07:00
                                            [LastUpdatedTime] => 2025-07-18T03:02:08-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt(test@fsdf.fg)
                                    [DisplayName] => testt(test@fsdf.fg)
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002099faf13f8ad34a4e63aef829e8a9142f8a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-18T03:25:34.128-07:00
        )

)

[18-Jul-2025 10:25:34 UTC] Using QBO customer ID: 70
[18-Jul-2025 10:25:34 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 70
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 165
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 26
                                )

                            [UnitPrice] => 5
                            [Qty] => 33
                            [TaxCodeRef] => Array
                                (
                                    [value] => 20
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-11
    [DueDate] => 2025-08-10
    [TotalAmt] => 183.15
    [PrivateNote] => Stripe Invoice ID: in_1Rjb30CDiOqgoJOUBodxSTyg
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 18.15
        )

)

[18-Jul-2025 10:25:35 UTC] QBO API response: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => A business validation error has occurred while processing your request
                                    [Detail] => Business Validation Error: Were sorry, QuickBooks encountered an error while calculating tax. Try reselecting the tax rate or reentering the product/service item and saving the form again.
                                    [code] => 6000
                                    [element] => 
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-18T03:25:35.232-07:00
        )

)

[18-Jul-2025 10:25:35 UTC] Invoice creation failed: Failed to create invoice in QuickBooks
[18-Jul-2025 10:25:35 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[18-Jul-2025 10:27:13 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[18-Jul-2025 10:27:13 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[18-Jul-2025 10:27:13 UTC] Starting invoice creation process for event: evt_1Rjb31CDiOqgoJOUTLKYK87p
[18-Jul-2025 10:27:13 UTC] Fetching Stripe invoice: in_1Rjb30CDiOqgoJOUBodxSTyg
[18-Jul-2025 10:27:14 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjb30CDiOqgoJOUBodxSTyg
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 18315
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1752217626
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754809716
    [effective_at] => 1752217716
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzM3NTIzNA0200SDQlHov9?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzM3NTIzNA0200SDQlHov9/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjb3UCDiOqgoJOUlOS6H3SV
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjb30CDiOqgoJOUBodxSTyg/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0005
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3Rjb4TCDiOqgoJOU1nmHyolq
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => void
    [status_transitions] => Array
        (
            [finalized_at] => 1752217716
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 1752254441
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752217628
)

[18-Jul-2025 10:27:15 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 366.3
                                    [BalanceWithJobs] => 366.3
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 70
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-16T05:34:36-07:00
                                            [LastUpdatedTime] => 2025-07-18T03:02:08-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt(test@fsdf.fg)
                                    [DisplayName] => testt(test@fsdf.fg)
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002099faf13f8ad34a4e63aef829e8a9142f8a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-18T03:27:14.995-07:00
        )

)

[18-Jul-2025 10:27:15 UTC] Using QBO customer ID: 70
[18-Jul-2025 10:27:15 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 70
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 165
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 26
                                )

                            [UnitPrice] => 5
                            [Qty] => 33
                            [TaxCodeRef] => Array
                                (
                                    [value] => 21
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-11
    [DueDate] => 2025-08-10
    [TotalAmt] => 183.15
    [PrivateNote] => Stripe Invoice ID: in_1Rjb30CDiOqgoJOUBodxSTyg
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 18.15
        )

)

[18-Jul-2025 10:27:16 UTC] QBO API response: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => A business validation error has occurred while processing your request
                                    [Detail] => Business Validation Error: Were sorry, QuickBooks encountered an error while calculating tax. Try reselecting the tax rate or reentering the product/service item and saving the form again.
                                    [code] => 6000
                                    [element] => 
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-18T03:27:16.105-07:00
        )

)

[18-Jul-2025 10:27:16 UTC] Invoice creation failed: Failed to create invoice in QuickBooks
[18-Jul-2025 10:27:16 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[18-Jul-2025 10:27:50 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[18-Jul-2025 10:27:50 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[18-Jul-2025 10:27:50 UTC] Starting invoice creation process for event: evt_1Rjb31CDiOqgoJOUTLKYK87p
[18-Jul-2025 10:27:50 UTC] Fetching Stripe invoice: in_1Rjb30CDiOqgoJOUBodxSTyg
[18-Jul-2025 10:27:50 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjb30CDiOqgoJOUBodxSTyg
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 18315
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1752217626
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754809716
    [effective_at] => 1752217716
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzM3NTI3MA0200x0DDePmR?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzM3NTI3MA0200x0DDePmR/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjb3UCDiOqgoJOUlOS6H3SV
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjb30CDiOqgoJOUBodxSTyg/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0005
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3Rjb4TCDiOqgoJOU1nmHyolq
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => void
    [status_transitions] => Array
        (
            [finalized_at] => 1752217716
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 1752254441
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752217628
)

[18-Jul-2025 10:27:51 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 366.3
                                    [BalanceWithJobs] => 366.3
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 70
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-16T05:34:36-07:00
                                            [LastUpdatedTime] => 2025-07-18T03:02:08-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt(test@fsdf.fg)
                                    [DisplayName] => testt(test@fsdf.fg)
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002099faf13f8ad34a4e63aef829e8a9142f8a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-18T03:27:51.027-07:00
        )

)

[18-Jul-2025 10:27:51 UTC] Using QBO customer ID: 70
[18-Jul-2025 10:27:51 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 70
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 165
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 26
                                )

                            [UnitPrice] => 5
                            [Qty] => 33
                            [TaxCodeRef] => Array
                                (
                                    [value] => 10
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-11
    [DueDate] => 2025-08-10
    [TotalAmt] => 183.15
    [PrivateNote] => Stripe Invoice ID: in_1Rjb30CDiOqgoJOUBodxSTyg
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 18.15
        )

)

[18-Jul-2025 10:27:52 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 206
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-18T03:27:53-07:00
                            [LastModifiedByRef] => Array
                                (
                                    [value] => 9341455021033327
                                )

                            [LastUpdatedTime] => 2025-07-18T03:27:53-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-07-11
                    [CurrencyRef] => Array
                        (
                            [value] => AUD
                            [name] => Australian Dollar
                        )

                    [ExchangeRate] => 1
                    [PrivateNote] => Stripe Invoice ID: in_1Rjb30CDiOqgoJOUBodxSTyg
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 165
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 26
                                                    [name] => product1
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 33
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 81
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => 10
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 165
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 16.5
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 16.5
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 20
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 10
                                                    [NetAmountTaxable] => 165
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 70
                            [name] => testt(test@fsdf.fg)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 68
                            [Line1] => 2500 Garcia Ave
                            [Line2] => Sydney NSW  2050
                        )

                    [DueDate] => 2025-08-10
                    [GlobalTaxCalculation] => TaxExcluded
                    [TotalAmt] => 181.5
                    [HomeTotalAmt] => 181.5
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 181.5
                    [HomeBalance] => 181.5
                )

            [time] => 2025-07-18T03:27:52.147-07:00
        )

)

[18-Jul-2025 10:27:52 UTC] Invoice created successfully in QBO. Invoice ID: 206
[18-Jul-2025 10:27:52 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[18-Jul-2025 13:49:08 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[18-Jul-2025 13:49:08 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[18-Jul-2025 13:49:08 UTC] Starting invoice creation process for event: evt_1Rjb31CDiOqgoJOUTLKYK87p
[18-Jul-2025 13:49:08 UTC] Fetching Stripe invoice: 909009
[18-Jul-2025 13:49:08 UTC] Failed to fetch Stripe invoice. HTTP code: 404
[18-Jul-2025 13:49:08 UTC] Invoice creation failed: Failed to fetch Stripe invoice details
[18-Jul-2025 13:49:08 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php:211
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(43): process_stripe_invoice_created_to_qbo_invoice()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 211
[18-Jul-2025 13:50:33 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[18-Jul-2025 13:50:33 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[18-Jul-2025 13:50:33 UTC] Starting invoice creation process for event: evt_1Rjb31CDiOqgoJOUTLKYK87p
[18-Jul-2025 13:50:33 UTC] Fetching Stripe invoice: 909009
[18-Jul-2025 13:50:34 UTC] Failed to fetch Stripe invoice. HTTP code: 404
[18-Jul-2025 13:50:34 UTC] Invoice creation failed: Failed to fetch Stripe invoice details
[18-Jul-2025 13:50:34 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php:210
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(43): process_stripe_invoice_created_to_qbo_invoice()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 210
[18-Jul-2025 13:52:47 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[18-Jul-2025 13:52:47 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[18-Jul-2025 13:52:47 UTC] Starting invoice creation process for event: evt_1Rjb31CDiOqgoJOUTLKYK87p
[18-Jul-2025 13:52:47 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[18-Jul-2025 13:52:47 UTC] Invoice already processed. QBO Invoice ID: 206
[18-Jul-2025 13:59:06 UTC] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php:23) in /home/wdsklsxvqb/automationv.com/stripe-app/session.php on line 73
[18-Jul-2025 13:59:07 UTC] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php:23) in /home/wdsklsxvqb/automationv.com/stripe-app/session.php on line 73
[18-Jul-2025 14:12:48 UTC] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php:23) in /home/wdsklsxvqb/automationv.com/stripe-app/session.php on line 73
[18-Jul-2025 14:35:45 UTC] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php:23) in /home/wdsklsxvqb/automationv.com/stripe-app/session.php on line 73
[18-Jul-2025 14:45:12 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[18-Jul-2025 14:45:12 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[18-Jul-2025 14:45:12 UTC] Starting invoice creation process for event: evt_1Rjb31CDiOqgoJOUTLKYK87p
[18-Jul-2025 14:45:12 UTC] Fetching Stripe invoice: in_1Rjb30CDiOqgoJOUBodxSTyg
[18-Jul-2025 14:45:13 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjb30CDiOqgoJOUBodxSTyg
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 18315
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1752217626
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754809716
    [effective_at] => 1752217716
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzM5MDcxMg0200qTvHXFYV?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzM5MDcxMw0200B4XzXbbX/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjb3UCDiOqgoJOUlOS6H3SV
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjb30CDiOqgoJOUBodxSTyg/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0005
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3Rjb4TCDiOqgoJOU1nmHyolq
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => void
    [status_transitions] => Array
        (
            [finalized_at] => 1752217716
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 1752254441
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752217628
)

[18-Jul-2025 14:45:13 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 70
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-16T05:34:36-07:00
                                            [LastUpdatedTime] => 2025-07-18T07:44:52-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt(test@fsdf.fg)
                                    [DisplayName] => testt(test@fsdf.fg)
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002099faf13f8ad34a4e63aef829e8a9142f8a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-18T07:45:13.845-07:00
        )

)

[18-Jul-2025 14:45:13 UTC] Using QBO customer ID: 70
[18-Jul-2025 14:45:14 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 70
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 165
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 26
                                )

                            [UnitPrice] => 5
                            [Qty] => 33
                            [TaxCodeRef] => Array
                                (
                                    [value] => 11
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-11
    [DueDate] => 2025-08-10
    [TotalAmt] => 183.15
    [PrivateNote] => Stripe Invoice ID: in_1Rjb30CDiOqgoJOUBodxSTyg
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 18.15
        )

)

[18-Jul-2025 14:45:15 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 209
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-18T07:45:16-07:00
                            [LastModifiedByRef] => Array
                                (
                                    [value] => 9341455021033327
                                )

                            [LastUpdatedTime] => 2025-07-18T07:45:16-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-07-11
                    [CurrencyRef] => Array
                        (
                            [value] => AUD
                            [name] => Australian Dollar
                        )

                    [ExchangeRate] => 1
                    [PrivateNote] => Stripe Invoice ID: in_1Rjb30CDiOqgoJOUBodxSTyg
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 165
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 26
                                                    [name] => product1
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 33
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 81
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => 11
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 165
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 18.15
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 18.15
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 21
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 11
                                                    [NetAmountTaxable] => 165
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 70
                            [name] => testt(test@fsdf.fg)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 71
                            [Line1] => 2500 Garcia Ave
                            [Line2] => Sydney NSW  2050
                        )

                    [DueDate] => 2025-08-10
                    [GlobalTaxCalculation] => TaxExcluded
                    [TotalAmt] => 183.15
                    [HomeTotalAmt] => 183.15
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 183.15
                    [HomeBalance] => 183.15
                )

            [time] => 2025-07-18T07:45:15.170-07:00
        )

)

[18-Jul-2025 14:45:15 UTC] Invoice created successfully in QBO. Invoice ID: 209
[18-Jul-2025 14:45:15 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[18-Jul-2025 15:19:53 UTC] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php:23) in /home/wdsklsxvqb/automationv.com/stripe-app/session.php on line 73
[18-Jul-2025 15:21:27 UTC] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php:23) in /home/wdsklsxvqb/automationv.com/stripe-app/session.php on line 73
[18-Jul-2025 16:00:19 UTC] PHP Fatal error:  Uncaught mysqli_sql_exception: Table 'wdsklsxvqb_stripe_qbo_integration.qb_tax_rates' doesn't exist in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php:106
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php(106): mysqli->query()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 106
[18-Jul-2025 16:01:44 UTC] PHP Fatal error:  Uncaught Error: mysqli_stmt::bind_param(): Argument #4 cannot be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php:61
Stack trace:
#0 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 61
[18-Jul-2025 16:33:36 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[18-Jul-2025 16:33:36 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[18-Jul-2025 16:33:36 UTC] Starting invoice creation process for event: evt_1Rjb31CDiOqgoJOUTLKYK87p
[18-Jul-2025 16:33:36 UTC] Fetching Stripe invoice: in_1Rjb30CDiOqgoJOUBodxSTyg
[18-Jul-2025 16:33:36 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjb30CDiOqgoJOUBodxSTyg
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 18315
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1752217626
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754809716
    [effective_at] => 1752217716
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzM5NzIxNg0200MImNUVxq?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzM5NzIxNg0200MImNUVxq/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjb3UCDiOqgoJOUlOS6H3SV
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjb30CDiOqgoJOUBodxSTyg/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0005
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3Rjb4TCDiOqgoJOU1nmHyolq
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => void
    [status_transitions] => Array
        (
            [finalized_at] => 1752217716
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 1752254441
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752217628
)

[18-Jul-2025 16:33:37 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 183.15
                                    [BalanceWithJobs] => 183.15
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 70
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-16T05:34:36-07:00
                                            [LastUpdatedTime] => 2025-07-18T07:45:16-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt(test@fsdf.fg)
                                    [DisplayName] => testt(test@fsdf.fg)
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002099faf13f8ad34a4e63aef829e8a9142f8a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-18T09:33:37.690-07:00
        )

)

[18-Jul-2025 16:33:37 UTC] Using QBO customer ID: 70
[18-Jul-2025 16:33:38 UTC] Fetching Stripe tax rate: txr_1Rjb4DCDiOqgoJOUCMRe2PFL
[18-Jul-2025 16:33:38 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 70
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 165
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 26
                                )

                            [UnitPrice] => 5
                            [Qty] => 33
                            [TaxCodeRef] => Array
                                (
                                    [value] => 11
                                )

                            [TaxRateRef] => Array
                                (
                                    [value] => 21
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-11
    [DueDate] => 2025-08-10
    [TotalAmt] => 183.15
    [PrivateNote] => Stripe Invoice ID: in_1Rjb30CDiOqgoJOUBodxSTyg
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 18.15
        )

)

[18-Jul-2025 16:33:38 UTC] QBO API response: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Request has invalid or unsupported property
                                    [Detail] => Property Name:failed to parse json object; a property specified is unsupported or invalid
                                    [code] => 2010
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-18T09:33:38.755-07:00
        )

)

[18-Jul-2025 16:33:38 UTC] Invoice creation failed: Failed to create invoice in QuickBooks
[18-Jul-2025 16:33:38 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[18-Jul-2025 16:38:37 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[18-Jul-2025 16:38:37 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[18-Jul-2025 16:38:37 UTC] Starting invoice creation process for event: evt_1Rjb31CDiOqgoJOUTLKYK87p
[18-Jul-2025 16:38:37 UTC] Fetching Stripe invoice: in_1Rjb30CDiOqgoJOUBodxSTyg
[18-Jul-2025 16:38:37 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjb30CDiOqgoJOUBodxSTyg
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 18315
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1752217626
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754809716
    [effective_at] => 1752217716
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzM5NzUxNw02004MeFUpCH?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzM5NzUxNw02004MeFUpCH/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjb3UCDiOqgoJOUlOS6H3SV
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjb30CDiOqgoJOUBodxSTyg/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0005
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3Rjb4TCDiOqgoJOU1nmHyolq
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => void
    [status_transitions] => Array
        (
            [finalized_at] => 1752217716
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 1752254441
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752217628
)

[18-Jul-2025 16:38:38 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 225.05
                                    [BalanceWithJobs] => 225.05
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 101
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-10T06:03:19-07:00
                                            [LastUpdatedTime] => 2025-07-14T06:10:34-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt
                                    [DisplayName] => testt
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098e066dfbe82b54d139d83565e5f664ced
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                )

                            [1] => Array
                                (
                                    [Taxable] => 1
                                    [BillAddr] => Array
                                        (
                                            [Id] => 141
                                        )

                                    [ShipAddr] => Array
                                        (
                                            [Id] => 141
                                        )

                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 99
                                    [SyncToken] => 1
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-10T01:36:59-07:00
                                            [LastUpdatedTime] => 2025-07-10T06:02:55-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testtqq
                                    [DisplayName] => testtqq
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020981d6681610c5f4203ac7c35187bf645d0
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                    [DefaultTaxCodeRef] => Array
                                        (
                                            [value] => 2
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 2
                )

            [time] => 2025-07-18T09:38:38.280-07:00
        )

)

[18-Jul-2025 16:38:38 UTC] Using QBO customer ID: 101
[18-Jul-2025 16:38:38 UTC] Fetching Stripe tax rate: txr_1Rjb4DCDiOqgoJOUCMRe2PFL
[18-Jul-2025 16:38:39 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 101
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 165
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 25
                                )

                            [UnitPrice] => 5
                            [Qty] => 33
                            [TaxCodeRef] => Array
                                (
                                    [value] => 11
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-11
    [DueDate] => 2025-08-10
    [TotalAmt] => 183.15
    [PrivateNote] => Stripe Invoice ID: in_1Rjb30CDiOqgoJOUBodxSTyg
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 18.15
        )

)

[18-Jul-2025 16:38:39 UTC] QBO API response: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Invalid Line TaxCode in the request
                                    [Detail] => Valid line TaxCodes for US should be TAX or NON. Supplied value: 11
                                    [code] => 6100
                                    [element] => Line.SalesItemLineDetail.TaxCodeRef
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-18T09:38:39.357-07:00
        )

)

[18-Jul-2025 16:38:39 UTC] Invoice creation failed: Failed to create invoice in QuickBooks
[18-Jul-2025 16:38:39 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[18-Jul-2025 16:59:34 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[18-Jul-2025 16:59:34 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[18-Jul-2025 16:59:34 UTC] Starting invoice creation process for event: evt_1Rjb31CDiOqgoJOUTLKYK87p
[18-Jul-2025 16:59:34 UTC] Fetching Stripe invoice: in_1Rjb30CDiOqgoJOUBodxSTyg
[18-Jul-2025 16:59:34 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjb30CDiOqgoJOUBodxSTyg
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 18315
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1752217626
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754809716
    [effective_at] => 1752217716
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzM5ODc3NA0200CIoQmEv3?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzM5ODc3NA0200CIoQmEv3/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjb3UCDiOqgoJOUlOS6H3SV
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjb30CDiOqgoJOUBodxSTyg/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0005
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3Rjb4TCDiOqgoJOU1nmHyolq
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => void
    [status_transitions] => Array
        (
            [finalized_at] => 1752217716
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 1752254441
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752217628
)

[18-Jul-2025 16:59:35 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 225.05
                                    [BalanceWithJobs] => 225.05
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 101
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-10T06:03:19-07:00
                                            [LastUpdatedTime] => 2025-07-14T06:10:34-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt
                                    [DisplayName] => testt
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098e066dfbe82b54d139d83565e5f664ced
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                )

                            [1] => Array
                                (
                                    [Taxable] => 1
                                    [BillAddr] => Array
                                        (
                                            [Id] => 141
                                        )

                                    [ShipAddr] => Array
                                        (
                                            [Id] => 141
                                        )

                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 99
                                    [SyncToken] => 1
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-10T01:36:59-07:00
                                            [LastUpdatedTime] => 2025-07-10T06:02:55-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testtqq
                                    [DisplayName] => testtqq
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020981d6681610c5f4203ac7c35187bf645d0
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                    [DefaultTaxCodeRef] => Array
                                        (
                                            [value] => 2
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 2
                )

            [time] => 2025-07-18T09:59:35.462-07:00
        )

)

[18-Jul-2025 16:59:35 UTC] Using QBO customer ID: 101
[18-Jul-2025 16:59:35 UTC] PHP Fatal error:  Uncaught TypeError: Cannot access offset of type string on string in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php:98
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(43): process_stripe_invoice_created_to_qbo_invoice()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 98
[18-Jul-2025 17:08:34 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[18-Jul-2025 17:08:34 UTC] PHP Fatal error:  Cannot redeclare get_sync_settings() (previously declared in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php:570) in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 398
[18-Jul-2025 17:09:57 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[18-Jul-2025 17:09:57 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[18-Jul-2025 17:09:57 UTC] Starting invoice creation process for event: evt_1Rjb31CDiOqgoJOUTLKYK87p
[18-Jul-2025 17:09:57 UTC] Fetching Stripe invoice: in_1Rjb30CDiOqgoJOUBodxSTyg
[18-Jul-2025 17:09:57 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjb30CDiOqgoJOUBodxSTyg
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 18315
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1752217626
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754809716
    [effective_at] => 1752217716
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzM5OTM5Nw0200yRiCVmRH?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzM5OTM5Nw0200yRiCVmRH/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjb3UCDiOqgoJOUlOS6H3SV
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjb30CDiOqgoJOUBodxSTyg/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0005
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3Rjb4TCDiOqgoJOU1nmHyolq
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => void
    [status_transitions] => Array
        (
            [finalized_at] => 1752217716
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 1752254441
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752217628
)

[18-Jul-2025 17:09:58 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 225.05
                                    [BalanceWithJobs] => 225.05
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 101
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-10T06:03:19-07:00
                                            [LastUpdatedTime] => 2025-07-14T06:10:34-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt
                                    [DisplayName] => testt
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098e066dfbe82b54d139d83565e5f664ced
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                )

                            [1] => Array
                                (
                                    [Taxable] => 1
                                    [BillAddr] => Array
                                        (
                                            [Id] => 141
                                        )

                                    [ShipAddr] => Array
                                        (
                                            [Id] => 141
                                        )

                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 99
                                    [SyncToken] => 1
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-10T01:36:59-07:00
                                            [LastUpdatedTime] => 2025-07-10T06:02:55-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testtqq
                                    [DisplayName] => testtqq
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020981d6681610c5f4203ac7c35187bf645d0
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                    [DefaultTaxCodeRef] => Array
                                        (
                                            [value] => 2
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 2
                )

            [time] => 2025-07-18T10:09:58.363-07:00
        )

)

[18-Jul-2025 17:09:58 UTC] Using QBO customer ID: 101
[18-Jul-2025 17:09:59 UTC] No matching tax code found for rate: 11%
[18-Jul-2025 17:09:59 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 101
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 165
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 25
                                )

                            [UnitPrice] => 5
                            [Qty] => 33
                        )

                )

        )

    [TxnDate] => 2025-07-11
    [DueDate] => 2025-08-10
    [TotalAmt] => 183.15
    [PrivateNote] => Stripe Invoice ID: in_1Rjb30CDiOqgoJOUBodxSTyg
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 18.15
        )

)

[18-Jul-2025 17:10:01 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 667
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-18T10:10:01-07:00
                            [LastModifiedByRef] => Array
                                (
                                    [value] => 123145870265994
                                )

                            [LastUpdatedTime] => 2025-07-18T10:10:01-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1262
                    [TxnDate] => 2025-07-11
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Invoice ID: in_1Rjb30CDiOqgoJOUBodxSTyg
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 165
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 25
                                                    [name] => product1
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 33
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 1
                                                    [name] => Services
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => NON
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 165
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 101
                            [name] => testt
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 181
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [DueDate] => 2025-08-10
                    [TotalAmt] => 165
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 165
                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-18T10:10:00.114-07:00
        )

)

[18-Jul-2025 17:10:01 UTC] Invoice created successfully in QBO. Invoice ID: 667
[18-Jul-2025 17:10:01 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[18-Jul-2025 17:16:06 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[18-Jul-2025 17:16:06 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[18-Jul-2025 17:16:06 UTC] Starting invoice creation process for event: evt_1Rjb31CDiOqgoJOUTLKYK87p
[18-Jul-2025 17:16:06 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[18-Jul-2025 17:16:06 UTC] Invoice already processed. QBO Invoice ID: 667
[18-Jul-2025 17:16:32 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[18-Jul-2025 17:16:32 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[18-Jul-2025 17:16:32 UTC] Starting invoice creation process for event: evt_1Rjb31CDiOqgoJOUTLKYK87p
[18-Jul-2025 17:16:32 UTC] Fetching Stripe invoice: in_1Rjb30CDiOqgoJOUBodxSTyg
[18-Jul-2025 17:16:33 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjb30CDiOqgoJOUBodxSTyg
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 18315
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1752217626
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754809716
    [effective_at] => 1752217716
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzM5OTc5Mw02007ipXma3y?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzM5OTc5Mw02007ipXma3y/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjb3UCDiOqgoJOUlOS6H3SV
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjb30CDiOqgoJOUBodxSTyg/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0005
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3Rjb4TCDiOqgoJOU1nmHyolq
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => void
    [status_transitions] => Array
        (
            [finalized_at] => 1752217716
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 1752254441
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752217628
)

[18-Jul-2025 17:16:33 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 390.05
                                    [BalanceWithJobs] => 390.05
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 101
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-10T06:03:19-07:00
                                            [LastUpdatedTime] => 2025-07-18T10:10:01-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt
                                    [DisplayName] => testt
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098e066dfbe82b54d139d83565e5f664ced
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                )

                            [1] => Array
                                (
                                    [Taxable] => 1
                                    [BillAddr] => Array
                                        (
                                            [Id] => 141
                                        )

                                    [ShipAddr] => Array
                                        (
                                            [Id] => 141
                                        )

                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 99
                                    [SyncToken] => 1
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-10T01:36:59-07:00
                                            [LastUpdatedTime] => 2025-07-10T06:02:55-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testtqq
                                    [DisplayName] => testtqq
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020981d6681610c5f4203ac7c35187bf645d0
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                    [DefaultTaxCodeRef] => Array
                                        (
                                            [value] => 2
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 2
                )

            [time] => 2025-07-18T10:16:33.763-07:00
        )

)

[18-Jul-2025 17:16:33 UTC] Using QBO customer ID: 101
[18-Jul-2025 17:16:34 UTC] Found matching tax code: 8 for rate: 11%
[18-Jul-2025 17:16:34 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 101
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 165
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 25
                                )

                            [UnitPrice] => 5
                            [Qty] => 33
                            [TaxCodeRef] => Array
                                (
                                    [value] => 8
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-11
    [DueDate] => 2025-08-10
    [TotalAmt] => 183.15
    [PrivateNote] => Stripe Invoice ID: in_1Rjb30CDiOqgoJOUBodxSTyg
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 18.15
        )

)

[18-Jul-2025 17:16:35 UTC] QBO API response: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Invalid Line TaxCode in the request
                                    [Detail] => Valid line TaxCodes for US should be TAX or NON. Supplied value: 8
                                    [code] => 6100
                                    [element] => Line.SalesItemLineDetail.TaxCodeRef
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-18T10:16:35.227-07:00
        )

)

[18-Jul-2025 17:16:35 UTC] Invoice creation failed: Failed to create invoice in QuickBooks
[18-Jul-2025 17:16:35 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[18-Jul-2025 17:51:52 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[18-Jul-2025 17:51:52 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[18-Jul-2025 17:51:52 UTC] Starting invoice creation process for event: evt_1Rjb31CDiOqgoJOUTLKYK87p
[18-Jul-2025 17:51:52 UTC] Fetching Stripe invoice: in_1Rjb30CDiOqgoJOUBodxSTyg
[18-Jul-2025 17:51:53 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjb30CDiOqgoJOUBodxSTyg
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 18315
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1752217626
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754809716
    [effective_at] => 1752217716
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzQwMTkxMw02005EGnA5wa?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzQwMTkxMw02005EGnA5wa/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjb3UCDiOqgoJOUlOS6H3SV
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjb30CDiOqgoJOUBodxSTyg/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0005
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3Rjb4TCDiOqgoJOU1nmHyolq
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => void
    [status_transitions] => Array
        (
            [finalized_at] => 1752217716
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 1752254441
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752217628
)

[18-Jul-2025 17:51:55 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 390.05
                                    [BalanceWithJobs] => 390.05
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 101
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-10T06:03:19-07:00
                                            [LastUpdatedTime] => 2025-07-18T10:10:01-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt
                                    [DisplayName] => testt
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098e066dfbe82b54d139d83565e5f664ced
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                )

                            [1] => Array
                                (
                                    [Taxable] => 1
                                    [BillAddr] => Array
                                        (
                                            [Id] => 141
                                        )

                                    [ShipAddr] => Array
                                        (
                                            [Id] => 141
                                        )

                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 99
                                    [SyncToken] => 1
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-10T01:36:59-07:00
                                            [LastUpdatedTime] => 2025-07-10T06:02:55-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testtqq
                                    [DisplayName] => testtqq
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020981d6681610c5f4203ac7c35187bf645d0
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                    [DefaultTaxCodeRef] => Array
                                        (
                                            [value] => 2
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 2
                )

            [time] => 2025-07-18T10:51:54.908-07:00
        )

)

[18-Jul-2025 17:51:55 UTC] Using QBO customer ID: 101
[18-Jul-2025 17:51:55 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 101
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 165
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 25
                                )

                            [UnitPrice] => 5
                            [Qty] => 33
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-11
    [DueDate] => 2025-08-10
    [TotalAmt] => 183.15
    [PrivateNote] => Stripe Invoice ID: in_1Rjb30CDiOqgoJOUBodxSTyg
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 18.15
        )

)

[18-Jul-2025 17:51:56 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 668
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-18T10:51:56-07:00
                            [LastModifiedByRef] => Array
                                (
                                    [value] => 123145870265994
                                )

                            [LastUpdatedTime] => 2025-07-18T10:51:56-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1263
                    [TxnDate] => 2025-07-11
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Invoice ID: in_1Rjb30CDiOqgoJOUBodxSTyg
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 165
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 25
                                                    [name] => product1
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 33
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 1
                                                    [name] => Services
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-99990201-V1-00020000
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 165
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 18.15
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 1.43
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 11.94
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 2.87
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 1.91
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 101
                            [name] => testt
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 182
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [DueDate] => 2025-08-10
                    [TotalAmt] => 183.15
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 183.15
                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-18T10:51:55.682-07:00
        )

)

[18-Jul-2025 17:51:56 UTC] Invoice created successfully in QBO. Invoice ID: 668
[18-Jul-2025 17:51:56 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[18-Jul-2025 17:54:48 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[18-Jul-2025 17:54:48 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[18-Jul-2025 17:54:48 UTC] Starting invoice creation process for event: evt_1Rjb31CDiOqgoJOUTLKYK87p
[18-Jul-2025 17:54:48 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[18-Jul-2025 17:54:48 UTC] Invoice already processed. QBO Invoice ID: 668
[18-Jul-2025 17:55:18 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[18-Jul-2025 17:55:18 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[18-Jul-2025 17:55:18 UTC] Starting invoice creation process for event: evt_1Rjb31CDiOqgoJOUTLKYK87p
[18-Jul-2025 17:55:18 UTC] Fetching Stripe invoice: in_1Rjb30CDiOqgoJOUBodxSTyg
[18-Jul-2025 17:55:18 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjb30CDiOqgoJOUBodxSTyg
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 18315
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1752217626
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754809716
    [effective_at] => 1752217716
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzQwMjExOA0200o9Z3FKmm?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzQwMjExOA0200o9Z3FKmm/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjb3UCDiOqgoJOUlOS6H3SV
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjb30CDiOqgoJOUBodxSTyg/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0005
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3Rjb4TCDiOqgoJOU1nmHyolq
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => void
    [status_transitions] => Array
        (
            [finalized_at] => 1752217716
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 1752254441
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752217628
)

[18-Jul-2025 17:55:19 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 183.15
                                    [BalanceWithJobs] => 183.15
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 70
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-16T05:34:36-07:00
                                            [LastUpdatedTime] => 2025-07-18T07:45:16-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt(test@fsdf.fg)
                                    [DisplayName] => testt(test@fsdf.fg)
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002099faf13f8ad34a4e63aef829e8a9142f8a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-18T10:55:19.465-07:00
        )

)

[18-Jul-2025 17:55:19 UTC] Using QBO customer ID: 70
[18-Jul-2025 17:55:20 UTC] Found matching tax code: 11 for rate: 11%
[18-Jul-2025 17:55:20 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 70
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 165
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 26
                                )

                            [UnitPrice] => 5
                            [Qty] => 33
                            [TaxCodeRef] => Array
                                (
                                    [value] => 11
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-11
    [DueDate] => 2025-08-10
    [TotalAmt] => 183.15
    [PrivateNote] => Stripe Invoice ID: in_1Rjb30CDiOqgoJOUBodxSTyg
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [GlobalTaxCalculation] => TaxExcluded
    [TxnTaxDetail] => Array
        (
            [TotalTax] => 18.15
        )

)

[18-Jul-2025 17:55:21 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 210
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-18T10:55:21-07:00
                            [LastModifiedByRef] => Array
                                (
                                    [value] => 9341455021033327
                                )

                            [LastUpdatedTime] => 2025-07-18T10:55:21-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-07-11
                    [CurrencyRef] => Array
                        (
                            [value] => AUD
                            [name] => Australian Dollar
                        )

                    [ExchangeRate] => 1
                    [PrivateNote] => Stripe Invoice ID: in_1Rjb30CDiOqgoJOUBodxSTyg
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 165
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 26
                                                    [name] => product1
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 33
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 81
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => 11
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 165
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 18.15
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 18.15
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 21
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 11
                                                    [NetAmountTaxable] => 165
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 70
                            [name] => testt(test@fsdf.fg)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 72
                            [Line1] => 2500 Garcia Ave
                            [Line2] => Sydney NSW  2050
                        )

                    [DueDate] => 2025-08-10
                    [GlobalTaxCalculation] => TaxExcluded
                    [TotalAmt] => 183.15
                    [HomeTotalAmt] => 183.15
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 183.15
                    [HomeBalance] => 183.15
                )

            [time] => 2025-07-18T10:55:20.380-07:00
        )

)

[18-Jul-2025 17:55:21 UTC] Invoice created successfully in QBO. Invoice ID: 210
[18-Jul-2025 17:55:21 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[19-Jul-2025 05:33:31 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[19-Jul-2025 05:33:31 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[19-Jul-2025 05:33:31 UTC] Starting invoice creation process for event: evt_1Rjb31CDiOqgoJOUTLKYK87p
[19-Jul-2025 05:33:31 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[19-Jul-2025 05:33:31 UTC] Invoice already processed. QBO Invoice ID: 210
[19-Jul-2025 05:34:57 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[19-Jul-2025 05:34:57 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[19-Jul-2025 05:34:57 UTC] Starting invoice creation process for event: evt_1Rjb31CDiOqgoJOUTLKYK87p
[19-Jul-2025 05:34:57 UTC] Fetching Stripe invoice: in_1Rjb30CDiOqgoJOUBodxSTyg
[19-Jul-2025 05:34:57 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjb30CDiOqgoJOUBodxSTyg
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 18315
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1752217626
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754809716
    [effective_at] => 1752217716
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzQ0NDA5Nw0200Oho9lNYe?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzQ0NDA5Nw0200Oho9lNYe/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjb3UCDiOqgoJOUlOS6H3SV
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjb30CDiOqgoJOUBodxSTyg/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0005
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3Rjb4TCDiOqgoJOU1nmHyolq
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => void
    [status_transitions] => Array
        (
            [finalized_at] => 1752217716
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 1752254441
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752217628
)

[19-Jul-2025 05:34:59 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                )

            [time] => 2025-07-18T22:34:58.899-07:00
        )

)

[19-Jul-2025 05:34:59 UTC] Using QBO customer ID: 68
[19-Jul-2025 05:35:01 UTC] Found matching tax code: 13 for rate: 11%
[19-Jul-2025 05:35:01 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 68
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 165
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 27
                                )

                            [UnitPrice] => 5
                            [Qty] => 33
                            [TaxCodeRef] => Array
                                (
                                    [value] => 13
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-11
    [DueDate] => 2025-08-10
    [TotalAmt] => 183.15
    [PrivateNote] => Stripe Invoice ID: in_1Rjb30CDiOqgoJOUBodxSTyg
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [GlobalTaxCalculation] => TaxExcluded
    [TxnTaxDetail] => Array
        (
            [TotalTax] => 18.15
        )

)

[19-Jul-2025 05:35:02 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 183
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-18T22:35:02-07:00
                            [LastModifiedByRef] => Array
                                (
                                    [value] => 9341455039383168
                                )

                            [LastUpdatedTime] => 2025-07-18T22:35:02-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-07-11
                    [CurrencyRef] => Array
                        (
                            [value] => GBP
                            [name] => British Pound Sterling
                        )

                    [ExchangeRate] => 1
                    [PrivateNote] => Stripe Invoice ID: in_1Rjb30CDiOqgoJOUBodxSTyg
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 165
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 27
                                                    [name] => product1
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 33
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 66
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => 13
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 165
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 18.15
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 18.15
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 22
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 11
                                                    [NetAmountTaxable] => 165
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 68
                            [name] => testt(test@fsdf.fg)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 69
                            [Line1] => 2500 Garcia Ave
                            [Line2] => SomeCity
                            [Line3] => LO
                            [Line4] => CR2 6XH
                        )

                    [DueDate] => 2025-08-10
                    [GlobalTaxCalculation] => TaxExcluded
                    [TotalAmt] => 183.15
                    [HomeTotalAmt] => 183.15
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 183.15
                    [HomeBalance] => 183.15
                )

            [time] => 2025-07-18T22:35:01.329-07:00
        )

)

[19-Jul-2025 05:35:02 UTC] Invoice created successfully in QBO. Invoice ID: 183
[19-Jul-2025 05:35:02 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[19-Jul-2025 05:51:19 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[19-Jul-2025 05:51:19 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[19-Jul-2025 05:51:19 UTC] Starting invoice creation process for event: evt_1Rjb31CDiOqgoJOUTLKYK87p
[19-Jul-2025 05:51:19 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[19-Jul-2025 05:51:19 UTC] Invoice already processed. QBO Invoice ID: 183
[19-Jul-2025 05:52:43 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[19-Jul-2025 05:52:43 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[19-Jul-2025 05:52:43 UTC] Starting invoice creation process for event: evt_1Rjb31CDiOqgoJOUTLKYK87p
[19-Jul-2025 05:52:43 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[19-Jul-2025 05:52:43 UTC] Invoice already processed. QBO Invoice ID: 183
[19-Jul-2025 05:55:21 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[19-Jul-2025 05:55:21 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[19-Jul-2025 05:55:21 UTC] Starting invoice creation process for event: evt_1Rjb31CDiOqgoJOUTLKYK87p
[19-Jul-2025 05:55:21 UTC] Fetching Stripe invoice: in_1Rjb30CDiOqgoJOUBodxSTyg
[19-Jul-2025 05:55:21 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjb30CDiOqgoJOUBodxSTyg
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 18315
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1752217626
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754809716
    [effective_at] => 1752217716
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzQ0NTMyMQ02008t12fmce?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZXVzdWRGZEE5dlRsM2I0cVJyaHZKbGh4T0hDcTIyLDE0MzQ0NTMyMQ02008t12fmce/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjb3UCDiOqgoJOUlOS6H3SV
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjb3UCDiOqgoJOUnRQcpPTl
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjb30CDiOqgoJOUBodxSTyg/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0005
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3Rjb4TCDiOqgoJOU1nmHyolq
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => void
    [status_transitions] => Array
        (
            [finalized_at] => 1752217716
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 1752254441
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752217628
)

[19-Jul-2025 05:55:22 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                )

            [time] => 2025-07-18T22:55:22.706-07:00
        )

)

[19-Jul-2025 05:55:23 UTC] Using QBO customer ID: 67
[19-Jul-2025 05:55:24 UTC] Found matching tax code: 7 for rate: 11%
[19-Jul-2025 05:55:24 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 67
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 165
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 28
                                )

                            [UnitPrice] => 5
                            [Qty] => 33
                            [TaxCodeRef] => Array
                                (
                                    [value] => 7
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-11
    [DueDate] => 2025-08-10
    [TotalAmt] => 183.15
    [PrivateNote] => Stripe Invoice ID: in_1Rjb30CDiOqgoJOUBodxSTyg
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [GlobalTaxCalculation] => TaxExcluded
    [TxnTaxDetail] => Array
        (
            [TotalTax] => 18.15
        )

)

[19-Jul-2025 05:55:25 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 182
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-18T22:55:25-07:00
                            [LastModifiedByRef] => Array
                                (
                                    [value] => 9341455039369066
                                )

                            [LastUpdatedTime] => 2025-07-18T22:55:25-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-07-11
                    [CurrencyRef] => Array
                        (
                            [value] => CAD
                            [name] => Canadian Dollar
                        )

                    [ExchangeRate] => 1
                    [PrivateNote] => Stripe Invoice ID: in_1Rjb30CDiOqgoJOUBodxSTyg
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 165
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 28
                                                    [name] => product1
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 33
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 67
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => 7
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 165
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 18.15
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 18.15
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 17
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 11
                                                    [NetAmountTaxable] => 165
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 67
                            [name] => testt(test@fsdf.fg)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 63
                            [Line1] => 5100 Spectrum Way
                            [Line2] => Cooksville ON  L4W 5S2
                        )

                    [DueDate] => 2025-08-10
                    [GlobalTaxCalculation] => TaxExcluded
                    [TotalAmt] => 183.15
                    [HomeTotalAmt] => 183.15
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 183.15
                    [HomeBalance] => 183.15
                )

            [time] => 2025-07-18T22:55:24.978-07:00
        )

)

[19-Jul-2025 05:55:25 UTC] Invoice created successfully in QBO. Invoice ID: 182
[19-Jul-2025 05:55:25 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[19-Jul-2025 06:41:51 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1RjkcqCDiOqgoJOU6bFarlzm)
[19-Jul-2025 06:41:51 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[19-Jul-2025 06:41:51 UTC] Starting payment process for Stripe invoice: evt_1RjkcqCDiOqgoJOU6bFarlzm
[19-Jul-2025 06:41:51 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[19-Jul-2025 06:41:51 UTC] Payment already processed. QBO Payment ID: 630
[19-Jul-2025 06:42:12 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1RjkcqCDiOqgoJOU6bFarlzm)
[19-Jul-2025 06:42:12 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[19-Jul-2025 06:42:12 UTC] Starting payment process for Stripe invoice: evt_1RjkcqCDiOqgoJOU6bFarlzm
[19-Jul-2025 06:42:12 UTC] Fetching Stripe invoice: in_1Rjka2CDiOqgoJOUHTKqZegC
[19-Jul-2025 06:42:13 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 18315
    [amount_remaining] => 0
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 1
    [attempted] => 1
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => ch_3RjkcnCDiOqgoJOU0KxD8HfP
    [collection_method] => send_invoice
    [created] => 1752254270
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754846441
    [effective_at] => 1752254441
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => Array
        (
            [action] => revision
            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
        )

    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZjRqdXJFRTN1cUFKRXEzUXRFc1BFakJlSDRMUlQ0LDE0MzQ0ODEzMg0200biLKBG7O?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZjRqdXJFRTN1cUFKRXEzUXRFc1BFakJlSDRMUlQ0LDE0MzQ0ODEzMg0200biLKBG7O/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjka2CDiOqgoJOUb2xoQRXy
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjka2CDiOqgoJOUHTKqZegC
                            [invoice_item] => ii_1Rjka2CDiOqgoJOU4AZwXlnQ
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjka2CDiOqgoJOU4AZwXlnQ
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjka2CDiOqgoJOUHTKqZegC/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0006
    [on_behalf_of] => 
    [paid] => 1
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RjkcnCDiOqgoJOU04KzaIsc
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => 
            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => paid
    [status_transitions] => Array
        (
            [finalized_at] => 1752254441
            [marked_uncollectible_at] => 
            [paid_at] => 1752254441
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752254270
)

[19-Jul-2025 06:42:13 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function get_sync_settings1() in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-paid-to-qbo-payment.php:50
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(36): process_stripe_invoice_paid_to_qbo_payment()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-paid-to-qbo-payment.php on line 50
[19-Jul-2025 06:46:38 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1RjkcqCDiOqgoJOU6bFarlzm)
[19-Jul-2025 06:46:38 UTC] PHP Fatal error:  Cannot redeclare get_sync_settings() (previously declared in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php:570) in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-paid-to-qbo-payment.php on line 411
[19-Jul-2025 06:47:27 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1RjkcqCDiOqgoJOU6bFarlzm)
[19-Jul-2025 06:47:27 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[19-Jul-2025 06:47:27 UTC] Starting payment process for Stripe invoice: evt_1RjkcqCDiOqgoJOU6bFarlzm
[19-Jul-2025 06:47:27 UTC] Fetching Stripe invoice: in_1Rjka2CDiOqgoJOUHTKqZegC
[19-Jul-2025 06:47:27 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 18315
    [amount_remaining] => 0
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 1
    [attempted] => 1
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => ch_3RjkcnCDiOqgoJOU0KxD8HfP
    [collection_method] => send_invoice
    [created] => 1752254270
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754846441
    [effective_at] => 1752254441
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => Array
        (
            [action] => revision
            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
        )

    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZjRqdXJFRTN1cUFKRXEzUXRFc1BFakJlSDRMUlQ0LDE0MzQ0ODQ0Nw0200ZwoQHxwZ?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZjRqdXJFRTN1cUFKRXEzUXRFc1BFakJlSDRMUlQ0LDE0MzQ0ODQ0Nw0200ZwoQHxwZ/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjka2CDiOqgoJOUb2xoQRXy
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjka2CDiOqgoJOUHTKqZegC
                            [invoice_item] => ii_1Rjka2CDiOqgoJOU4AZwXlnQ
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjka2CDiOqgoJOU4AZwXlnQ
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjka2CDiOqgoJOUHTKqZegC/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0006
    [on_behalf_of] => 
    [paid] => 1
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RjkcnCDiOqgoJOU04KzaIsc
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => 
            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => paid
    [status_transitions] => Array
        (
            [finalized_at] => 1752254441
            [marked_uncollectible_at] => 
            [paid_at] => 1752254441
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752254270
)

[19-Jul-2025 06:47:28 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function find_or_create_qbo_customer() in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-paid-to-qbo-payment.php:65
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(36): process_stripe_invoice_paid_to_qbo_payment()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-paid-to-qbo-payment.php on line 65
[19-Jul-2025 06:59:25 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1RjkcqCDiOqgoJOU6bFarlzm)
[19-Jul-2025 06:59:25 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[19-Jul-2025 06:59:25 UTC] Starting payment process for Stripe invoice: evt_1RjkcqCDiOqgoJOU6bFarlzm
[19-Jul-2025 06:59:25 UTC] Fetching Stripe invoice: in_1Rjka2CDiOqgoJOUHTKqZegC
[19-Jul-2025 06:59:25 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 18315
    [amount_remaining] => 0
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 1
    [attempted] => 1
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => ch_3RjkcnCDiOqgoJOU0KxD8HfP
    [collection_method] => send_invoice
    [created] => 1752254270
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754846441
    [effective_at] => 1752254441
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => Array
        (
            [action] => revision
            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
        )

    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZjRqdXJFRTN1cUFKRXEzUXRFc1BFakJlSDRMUlQ0LDE0MzQ0OTE2NQ0200I0OqYO0I?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZjRqdXJFRTN1cUFKRXEzUXRFc1BFakJlSDRMUlQ0LDE0MzQ0OTE2NQ0200I0OqYO0I/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjka2CDiOqgoJOUb2xoQRXy
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjka2CDiOqgoJOUHTKqZegC
                            [invoice_item] => ii_1Rjka2CDiOqgoJOU4AZwXlnQ
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjka2CDiOqgoJOU4AZwXlnQ
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjka2CDiOqgoJOUHTKqZegC/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0006
    [on_behalf_of] => 
    [paid] => 1
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RjkcnCDiOqgoJOU04KzaIsc
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => 
            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => paid
    [status_transitions] => Array
        (
            [finalized_at] => 1752254441
            [marked_uncollectible_at] => 
            [paid_at] => 1752254441
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752254270
)

[19-Jul-2025 06:59:26 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1752908366125
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[19-Jul-2025 06:59:26 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1752908366323
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[19-Jul-2025 06:59:26 UTC] Payment creation failed: Failed to find or create customer in QuickBooks
[19-Jul-2025 06:59:26 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[19-Jul-2025 06:59:48 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1RjkcqCDiOqgoJOU6bFarlzm)
[19-Jul-2025 06:59:48 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[19-Jul-2025 06:59:48 UTC] Starting payment process for Stripe invoice: evt_1RjkcqCDiOqgoJOU6bFarlzm
[19-Jul-2025 06:59:48 UTC] Fetching Stripe invoice: in_1Rjka2CDiOqgoJOUHTKqZegC
[19-Jul-2025 06:59:48 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 18315
    [amount_remaining] => 0
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 1
    [attempted] => 1
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => ch_3RjkcnCDiOqgoJOU0KxD8HfP
    [collection_method] => send_invoice
    [created] => 1752254270
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754846441
    [effective_at] => 1752254441
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => Array
        (
            [action] => revision
            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
        )

    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZjRqdXJFRTN1cUFKRXEzUXRFc1BFakJlSDRMUlQ0LDE0MzQ0OTE4OA0200SXUDgHPj?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZjRqdXJFRTN1cUFKRXEzUXRFc1BFakJlSDRMUlQ0LDE0MzQ0OTE4OA0200SXUDgHPj/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjka2CDiOqgoJOUb2xoQRXy
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjka2CDiOqgoJOUHTKqZegC
                            [invoice_item] => ii_1Rjka2CDiOqgoJOU4AZwXlnQ
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjka2CDiOqgoJOU4AZwXlnQ
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjka2CDiOqgoJOUHTKqZegC/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0006
    [on_behalf_of] => 
    [paid] => 1
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RjkcnCDiOqgoJOU04KzaIsc
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => 
            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => paid
    [status_transitions] => Array
        (
            [finalized_at] => 1752254441
            [marked_uncollectible_at] => 
            [paid_at] => 1752254441
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752254270
)

[19-Jul-2025 06:59:49 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1752908389273
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[19-Jul-2025 06:59:49 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1752908389445
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[19-Jul-2025 06:59:49 UTC] Payment creation failed: Failed to find or create customer in QuickBooks
[19-Jul-2025 06:59:49 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[19-Jul-2025 07:01:05 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1RjkcqCDiOqgoJOU6bFarlzm)
[19-Jul-2025 07:01:05 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[19-Jul-2025 07:01:05 UTC] Starting payment process for Stripe invoice: evt_1RjkcqCDiOqgoJOU6bFarlzm
[19-Jul-2025 07:01:05 UTC] Fetching Stripe invoice: in_1Rjka2CDiOqgoJOUHTKqZegC
[19-Jul-2025 07:01:05 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 18315
    [amount_remaining] => 0
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 1
    [attempted] => 1
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => ch_3RjkcnCDiOqgoJOU0KxD8HfP
    [collection_method] => send_invoice
    [created] => 1752254270
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754846441
    [effective_at] => 1752254441
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => Array
        (
            [action] => revision
            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
        )

    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZjRqdXJFRTN1cUFKRXEzUXRFc1BFakJlSDRMUlQ0LDE0MzQ0OTI2NQ0200HYvZ4KmX?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZjRqdXJFRTN1cUFKRXEzUXRFc1BFakJlSDRMUlQ0LDE0MzQ0OTI2NQ0200HYvZ4KmX/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjka2CDiOqgoJOUb2xoQRXy
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjka2CDiOqgoJOUHTKqZegC
                            [invoice_item] => ii_1Rjka2CDiOqgoJOU4AZwXlnQ
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjka2CDiOqgoJOU4AZwXlnQ
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjka2CDiOqgoJOUHTKqZegC/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0006
    [on_behalf_of] => 
    [paid] => 1
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RjkcnCDiOqgoJOU04KzaIsc
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => 
            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => paid
    [status_transitions] => Array
        (
            [finalized_at] => 1752254441
            [marked_uncollectible_at] => 
            [paid_at] => 1752254441
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752254270
)

[19-Jul-2025 07:01:06 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 183.15
                                    [BalanceWithJobs] => 183.15
                                    [CurrencyRef] => Array
                                        (
                                            [value] => GBP
                                            [name] => British Pound Sterling
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 68
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-18T22:34:59-07:00
                                            [LastUpdatedTime] => 2025-07-18T22:35:02-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt(test@fsdf.fg)
                                    [DisplayName] => testt(test@fsdf.fg)
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020992cd9a85c4e8748038f277712ed02d71b
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-19T00:01:06.535-07:00
        )

)

[19-Jul-2025 07:01:06 UTC] Using QBO customer ID: 68
[19-Jul-2025 07:01:06 UTC] No existing QBO invoice found, creating new one
[19-Jul-2025 07:01:07 UTC] Found matching tax code: 7 for rate: 11%
[19-Jul-2025 07:01:07 UTC] Creating new QBO invoice with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 68
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 165
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 27
                                )

                            [UnitPrice] => 5
                            [Qty] => 33
                            [TaxCodeRef] => Array
                                (
                                    [value] => 7
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-11
    [DueDate] => 2025-08-10
    [TotalAmt] => 183.15
    [PrivateNote] => Stripe Invoice ID: in_1Rjka2CDiOqgoJOUHTKqZegC
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [GlobalTaxCalculation] => TaxExcluded
    [TxnTaxDetail] => Array
        (
            [TotalTax] => 18.15
        )

)

[19-Jul-2025 07:01:07 UTC] QBO API response: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => A business validation error has occurred while processing your request
                                    [Detail] => Business Validation Error: Were sorry, QuickBooks encountered an error while calculating tax. Try reselecting the tax rate or reentering the product/service item and saving the form again.
                                    [code] => 6000
                                    [element] => 
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-19T00:01:07.346-07:00
        )

)

[19-Jul-2025 07:01:07 UTC] Payment creation failed: Failed to create invoice in QuickBooks
[19-Jul-2025 07:01:07 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[19-Jul-2025 07:02:59 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1RjkcqCDiOqgoJOU6bFarlzm)
[19-Jul-2025 07:02:59 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[19-Jul-2025 07:02:59 UTC] Starting payment process for Stripe invoice: evt_1RjkcqCDiOqgoJOU6bFarlzm
[19-Jul-2025 07:02:59 UTC] Fetching Stripe invoice: in_1Rjka2CDiOqgoJOUHTKqZegC
[19-Jul-2025 07:02:59 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 18315
    [amount_remaining] => 0
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 1
    [attempted] => 1
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => ch_3RjkcnCDiOqgoJOU0KxD8HfP
    [collection_method] => send_invoice
    [created] => 1752254270
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754846441
    [effective_at] => 1752254441
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => Array
        (
            [action] => revision
            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
        )

    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZjRqdXJFRTN1cUFKRXEzUXRFc1BFakJlSDRMUlQ0LDE0MzQ0OTM3OQ0200n7lGxzrl?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZjRqdXJFRTN1cUFKRXEzUXRFc1BFakJlSDRMUlQ0LDE0MzQ0OTM3OQ0200n7lGxzrl/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjka2CDiOqgoJOUb2xoQRXy
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjka2CDiOqgoJOUHTKqZegC
                            [invoice_item] => ii_1Rjka2CDiOqgoJOU4AZwXlnQ
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjka2CDiOqgoJOU4AZwXlnQ
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjka2CDiOqgoJOUHTKqZegC/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0006
    [on_behalf_of] => 
    [paid] => 1
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RjkcnCDiOqgoJOU04KzaIsc
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => 
            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => paid
    [status_transitions] => Array
        (
            [finalized_at] => 1752254441
            [marked_uncollectible_at] => 
            [paid_at] => 1752254441
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752254270
)

[19-Jul-2025 07:03:00 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 183.15
                                    [BalanceWithJobs] => 183.15
                                    [CurrencyRef] => Array
                                        (
                                            [value] => GBP
                                            [name] => British Pound Sterling
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 68
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-18T22:34:59-07:00
                                            [LastUpdatedTime] => 2025-07-18T22:35:02-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt(test@fsdf.fg)
                                    [DisplayName] => testt(test@fsdf.fg)
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020992cd9a85c4e8748038f277712ed02d71b
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-19T00:03:00.339-07:00
        )

)

[19-Jul-2025 07:03:00 UTC] Using QBO customer ID: 68
[19-Jul-2025 07:03:00 UTC] No existing QBO invoice found, creating new one
[19-Jul-2025 07:03:00 UTC] Found matching tax code: 13 for rate: 11%
[19-Jul-2025 07:03:00 UTC] Creating new QBO invoice with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 68
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 165
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 27
                                )

                            [UnitPrice] => 5
                            [Qty] => 33
                            [TaxCodeRef] => Array
                                (
                                    [value] => 13
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-11
    [DueDate] => 2025-08-10
    [TotalAmt] => 183.15
    [PrivateNote] => Stripe Invoice ID: in_1Rjka2CDiOqgoJOUHTKqZegC
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [GlobalTaxCalculation] => TaxExcluded
    [TxnTaxDetail] => Array
        (
            [TotalTax] => 18.15
        )

)

[19-Jul-2025 07:03:01 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 184
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-19T00:03:01-07:00
                            [LastModifiedByRef] => Array
                                (
                                    [value] => 9341455039383168
                                )

                            [LastUpdatedTime] => 2025-07-19T00:03:01-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-07-11
                    [CurrencyRef] => Array
                        (
                            [value] => GBP
                            [name] => British Pound Sterling
                        )

                    [ExchangeRate] => 1
                    [PrivateNote] => Stripe Invoice ID: in_1Rjka2CDiOqgoJOUHTKqZegC
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 165
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 27
                                                    [name] => product1
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 33
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 66
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => 13
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 165
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 18.15
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 18.15
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 22
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 11
                                                    [NetAmountTaxable] => 165
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 68
                            [name] => testt(test@fsdf.fg)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 70
                            [Line1] => 2500 Garcia Ave
                            [Line2] => SomeCity
                            [Line3] => LO
                            [Line4] => CR2 6XH
                        )

                    [DueDate] => 2025-08-10
                    [GlobalTaxCalculation] => TaxExcluded
                    [TotalAmt] => 183.15
                    [HomeTotalAmt] => 183.15
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 183.15
                    [HomeBalance] => 183.15
                )

            [time] => 2025-07-19T00:03:01.005-07:00
        )

)

[19-Jul-2025 07:03:01 UTC] Created new QBO invoice ID: 184
[19-Jul-2025 07:03:02 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function get_qbo_payment_method_id() in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-paid-to-qbo-payment.php:285
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-paid-to-qbo-payment.php(220): create_qbo_payment()
#1 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(36): process_stripe_invoice_paid_to_qbo_payment()
#2 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-paid-to-qbo-payment.php on line 285
[19-Jul-2025 07:07:09 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1RjkcqCDiOqgoJOU6bFarlzm)
[19-Jul-2025 07:07:09 UTC] PHP Fatal error:  Cannot redeclare get_sync_settings() (previously declared in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php:570) in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-paid-to-qbo-payment.php on line 461
[19-Jul-2025 07:08:53 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1RjkcqCDiOqgoJOU6bFarlzm)
[19-Jul-2025 07:08:53 UTC] PHP Fatal error:  Cannot redeclare get_sync_settings() (previously declared in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php:570) in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-paid-to-qbo-payment.php on line 462
[19-Jul-2025 07:25:21 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1RjkcqCDiOqgoJOU6bFarlzm)
[19-Jul-2025 07:25:21 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[19-Jul-2025 07:25:21 UTC] Starting payment process for Stripe invoice: evt_1RjkcqCDiOqgoJOU6bFarlzm
[19-Jul-2025 07:25:21 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function fetch_stripe_invoice() in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-paid-to-qbo-payment.php:36
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(36): process_stripe_invoice_paid_to_qbo_payment()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-paid-to-qbo-payment.php on line 36
[19-Jul-2025 07:29:30 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1RjkcqCDiOqgoJOU6bFarlzm)
[19-Jul-2025 07:29:30 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[19-Jul-2025 07:29:30 UTC] Starting payment process for Stripe invoice: evt_1RjkcqCDiOqgoJOU6bFarlzm
[19-Jul-2025 07:29:30 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function fetch_stripe_invoice() in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-paid-to-qbo-payment.php:36
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(36): process_stripe_invoice_paid_to_qbo_payment()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-paid-to-qbo-payment.php on line 36
[19-Jul-2025 08:37:21 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1RjkcqCDiOqgoJOU6bFarlzm)
[19-Jul-2025 08:37:21 UTC] PHP Parse error:  syntax error, unexpected token "private", expecting end of file in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-paid-to-qbo-payment.php on line 137
[19-Jul-2025 08:38:24 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1RjkcqCDiOqgoJOU6bFarlzm)
[19-Jul-2025 08:38:24 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[19-Jul-2025 08:38:24 UTC] Starting payment process for Stripe invoice: evt_1RjkcqCDiOqgoJOU6bFarlzm
[19-Jul-2025 08:38:24 UTC] PHP Fatal error:  Uncaught Error: Using $this when not in object context in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-paid-to-qbo-payment.php:36
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(36): process_stripe_invoice_paid_to_qbo_payment()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-paid-to-qbo-payment.php on line 36
[19-Jul-2025 08:42:34 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1RjkcqCDiOqgoJOU6bFarlzm)
[19-Jul-2025 08:42:34 UTC] PHP Fatal error:  Cannot redeclare get_sync_settings() (previously declared in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php:570) in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-paid-to-qbo-payment.php on line 462
[19-Jul-2025 08:43:17 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1RjkcqCDiOqgoJOU6bFarlzm)
[19-Jul-2025 08:43:17 UTC] PHP Fatal error:  Cannot redeclare find_matching_tax_code() (previously declared in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-paid-to-qbo-payment.php:370) in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 245
[19-Jul-2025 08:45:11 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1RjkcqCDiOqgoJOU6bFarlzm)
[19-Jul-2025 08:45:11 UTC] PHP Fatal error:  Cannot redeclare is_global_quickbooks_account() (previously declared in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-paid-to-qbo-payment.php:399) in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 270
[19-Jul-2025 08:45:56 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1RjkcqCDiOqgoJOU6bFarlzm)
[19-Jul-2025 08:45:56 UTC] PHP Fatal error:  Cannot redeclare fetch_stripe_invoice() (previously declared in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-paid-to-qbo-payment.php:424) in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 296
[19-Jul-2025 08:46:33 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1RjkcqCDiOqgoJOU6bFarlzm)
[19-Jul-2025 08:46:33 UTC] PHP Fatal error:  Cannot redeclare get_qbo_account_id() (previously declared in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-paid-to-qbo-payment.php:348) in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 387
[19-Jul-2025 08:48:17 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1RjkcqCDiOqgoJOU6bFarlzm)
[19-Jul-2025 08:48:17 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[19-Jul-2025 08:48:17 UTC] Starting payment process for Stripe invoice: evt_1RjkcqCDiOqgoJOU6bFarlzm
[19-Jul-2025 08:48:17 UTC] Fetching Stripe invoice: in_1Rjka2CDiOqgoJOUHTKqZegC
[19-Jul-2025 08:48:17 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 18315
    [amount_remaining] => 0
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 1
    [attempted] => 1
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => ch_3RjkcnCDiOqgoJOU0KxD8HfP
    [collection_method] => send_invoice
    [created] => 1752254270
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754846441
    [effective_at] => 1752254441
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => Array
        (
            [action] => revision
            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
        )

    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZjRqdXJFRTN1cUFKRXEzUXRFc1BFakJlSDRMUlQ0LDE0MzQ1NTY5Nw0200QTTqOBxl?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZjRqdXJFRTN1cUFKRXEzUXRFc1BFakJlSDRMUlQ0LDE0MzQ1NTY5Nw0200QTTqOBxl/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjka2CDiOqgoJOUb2xoQRXy
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjka2CDiOqgoJOUHTKqZegC
                            [invoice_item] => ii_1Rjka2CDiOqgoJOU4AZwXlnQ
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjka2CDiOqgoJOU4AZwXlnQ
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjka2CDiOqgoJOUHTKqZegC/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0006
    [on_behalf_of] => 
    [paid] => 1
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RjkcnCDiOqgoJOU04KzaIsc
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => 
            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => paid
    [status_transitions] => Array
        (
            [finalized_at] => 1752254441
            [marked_uncollectible_at] => 
            [paid_at] => 1752254441
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752254270
)

[19-Jul-2025 08:48:19 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 366.3
                                    [BalanceWithJobs] => 366.3
                                    [CurrencyRef] => Array
                                        (
                                            [value] => GBP
                                            [name] => British Pound Sterling
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 68
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-18T22:34:59-07:00
                                            [LastUpdatedTime] => 2025-07-19T00:03:02-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt(test@fsdf.fg)
                                    [DisplayName] => testt(test@fsdf.fg)
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020992cd9a85c4e8748038f277712ed02d71b
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-19T01:48:18.993-07:00
        )

)

[19-Jul-2025 08:48:19 UTC] Using QBO customer ID: 68
[19-Jul-2025 08:48:19 UTC] Found existing QBO invoice ID: 184
[19-Jul-2025 08:48:20 UTC] Failed to create payment method: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Invalid Enumeration
                                    [Detail] => Invalid Enumeration : OTHER
                                    [code] => 2170
                                    [element] => Type
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-19T01:48:20.084-07:00
        )

)

[19-Jul-2025 08:48:20 UTC] Creating QBO payment with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 68
        )

    [TotalAmt] => 183.15
    [TxnDate] => 2025-07-11
    [PaymentRefNum] => pi_3RjkcnCDiOqgoJOU04
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [DepositToAccountRef] => Array
        (
            [value] => 83
        )

    [PrivateNote] => Stripe Invoice ID: in_1Rjka2CDiOqgoJOUHTKqZegC
    [Line] => Array
        (
            [0] => Array
                (
                    [Amount] => 183.15
                    [LinkedTxn] => Array
                        (
                            [0] => Array
                                (
                                    [TxnId] => 184
                                    [TxnType] => Invoice
                                )

                        )

                )

        )

)

[19-Jul-2025 08:48:21 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Payment] => Array
                (
                    [CustomerRef] => Array
                        (
                            [value] => 68
                            [name] => testt(test@fsdf.fg)
                        )

                    [DepositToAccountRef] => Array
                        (
                            [value] => 83
                        )

                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                        )

                    [PaymentRefNum] => pi_3RjkcnCDiOqgoJOU04
                    [TotalAmt] => 183.15
                    [UnappliedAmt] => 0
                    [ProcessPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 185
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-19T01:48:21-07:00
                            [LastUpdatedTime] => 2025-07-19T01:48:21-07:00
                        )

                    [TxnDate] => 2025-07-11
                    [CurrencyRef] => Array
                        (
                            [value] => GBP
                            [name] => British Pound Sterling
                        )

                    [ExchangeRate] => 1
                    [PrivateNote] => Stripe Invoice ID: in_1Rjka2CDiOqgoJOUHTKqZegC
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Amount] => 183.15
                                    [LinkedTxn] => Array
                                        (
                                            [0] => Array
                                                (
                                                    [TxnId] => 184
                                                    [TxnType] => Invoice
                                                )

                                        )

                                    [LineEx] => Array
                                        (
                                            [any] => Array
                                                (
                                                    [0] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnId
                                                                    [Value] => 184
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                    [1] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnOpenBalance
                                                                    [Value] => 183.15
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                    [2] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnReferenceNumber
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                )

                                        )

                                )

                        )

                )

            [time] => 2025-07-19T01:48:20.689-07:00
        )

)

[19-Jul-2025 08:48:21 UTC] Payment created successfully in QBO. Payment ID: 185
[19-Jul-2025 08:48:21 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[19-Jul-2025 09:03:25 UTC] Stripe Webhook Received: invoice.created (ID: evt_1Rjb31CDiOqgoJOUTLKYK87p)
[19-Jul-2025 09:03:25 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[19-Jul-2025 09:03:25 UTC] Starting invoice creation process for event: evt_1Rjb31CDiOqgoJOUTLKYK87p
[19-Jul-2025 09:03:25 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[19-Jul-2025 09:03:25 UTC] Invoice already processed. QBO Invoice ID: 182
[19-Jul-2025 09:07:43 UTC] Stripe Webhook Received: invoice.created (ID: evt_1RmWk7CDiOqgoJOUNwgVvtq0)
[19-Jul-2025 09:07:43 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[19-Jul-2025 09:07:43 UTC] Starting invoice creation process for event: evt_1RmWk7CDiOqgoJOUNwgVvtq0
[19-Jul-2025 09:07:43 UTC] Fetching Stripe invoice: in_1RmWk6CDiOqgoJOUHpW9woLm
[19-Jul-2025 09:07:44 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RmWk6CDiOqgoJOUHpW9woLm
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 0
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 0
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 1
            [liability] => Array
                (
                    [type] => self
                )

            [provider] => stripe
            [status] => complete
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1752916062
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => Array
        (
            [city] => testt
            [country] => US
            [line1] => rwrwr
            [line2] => fsf
            [postal_code] => 95014
            [state] => CO
        )

    [customer_email] => ratulbinhasan.integration@gmail.com
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => Array
        (
            [address] => Array
                (
                    [city] => testt
                    [country] => US
                    [line1] => rwrwr
                    [line2] => fsf
                    [postal_code] => 95014
                    [state] => CO
                )

            [name] => testt
            [phone] => 
        )

    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 
    [effective_at] => 
    [ending_balance] => 
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => 
    [invoice_pdf] => 
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                )

            [has_more] => 
            [total_count] => 0
            [url] => /v1/invoices/in_1RmWk6CDiOqgoJOUHpW9woLm/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => 
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => 
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752916062
    [period_start] => 1752916062
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => auto
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => draft
    [status_transitions] => Array
        (
            [finalized_at] => 
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 0
    [subtotal_excluding_tax] => 0
    [tax] => 
    [test_clock] => 
    [total] => 0
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 0
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
        )

    [total_taxes] => Array
        (
        )

    [transfer_data] => 
    [webhooks_delivered_at] => 
)

[19-Jul-2025 09:07:44 UTC] Invoice creation failed: No line items in the invoice, nothing to process.
[19-Jul-2025 09:07:44 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php:214
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(43): process_stripe_invoice_created_to_qbo_invoice()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 214
[19-Jul-2025 09:10:54 UTC] Stripe Webhook Received: invoice.created (ID: evt_1RmWk7CDiOqgoJOUNwgVvtq0)
[19-Jul-2025 09:10:54 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[19-Jul-2025 09:10:54 UTC] Starting invoice creation process for event: evt_1RmWk7CDiOqgoJOUNwgVvtq0
[19-Jul-2025 09:10:54 UTC] Fetching Stripe invoice: in_1RmWk6CDiOqgoJOUHpW9woLm
[19-Jul-2025 09:10:54 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RmWk6CDiOqgoJOUHpW9woLm
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 145200
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 145200
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 1
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1752916062
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => Array
        (
            [city] => testt
            [country] => US
            [line1] => rwrwr
            [line2] => fsf
            [postal_code] => 95014
            [state] => CO
        )

    [customer_email] => ratulbinhasan.integration@gmail.com
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => Array
        (
            [address] => Array
                (
                    [city] => testt
                    [country] => US
                    [line1] => rwrwr
                    [line2] => fsf
                    [postal_code] => 95014
                    [state] => CO
                )

            [name] => testt
            [phone] => 
        )

    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1755508153
    [effective_at] => 1752916153
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TaHdkdWpTT1VQQUFibHlsRmNQcklHRDB2RERDaUFlLDE0MzQ1NzA1NA0200P3eQG1J0?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TaHdkdWpTT1VQQUFibHlsRmNQcklHRDB2RERDaUFlLDE0MzQ1NzA1NA0200P3eQG1J0/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RmWkfCDiOqgoJOU223PxVdC
                            [object] => line_item
                            [amount] => 96800
                            [amount_excluding_tax] => 96800
                            [currency] => usd
                            [description] => this is test
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RmWk6CDiOqgoJOUHpW9woLm
                            [invoice_item] => ii_1RmWkfCDiOqgoJOUGNH6bdxr
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1RmWkfCDiOqgoJOUGNH6bdxr
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752916097
                                    [start] => 1752916097
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RmWkeCDiOqgoJOU3kt6yZYW
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1752916096
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_Sgn38fTX1x5ky6
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 4400
                                    [unit_amount_decimal] => 4400
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RmWkeCDiOqgoJOU3kt6yZYW
                                            [product] => prod_Sgn38fTX1x5ky6
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 4400
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 22
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 4400
                        )

                    [1] => Array
                        (
                            [id] => il_1RmWkTCDiOqgoJOUegXtbjyX
                            [object] => line_item
                            [amount] => 48400
                            [amount_excluding_tax] => 48400
                            [currency] => usd
                            [description] => losttt
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RmWk6CDiOqgoJOUHpW9woLm
                            [invoice_item] => ii_1RmWkTCDiOqgoJOUokHNa9Ox
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1RmWkTCDiOqgoJOUokHNa9Ox
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752916085
                                    [start] => 1752916085
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RmWkSCDiOqgoJOUw6sHdaOT
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1752916084
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SgnORpg4HJjM59
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 4400
                                    [unit_amount_decimal] => 4400
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RmWkSCDiOqgoJOUw6sHdaOT
                                            [product] => prod_SgnORpg4HJjM59
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 4400
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 11
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 4400
                        )

                )

            [has_more] => 
            [total_count] => 2
            [url] => /v1/invoices/in_1RmWk6CDiOqgoJOUHpW9woLm/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0009
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RmWlZCDiOqgoJOU0XAwjeU8
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752916062
    [period_start] => 1752916062
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => open
    [status_transitions] => Array
        (
            [finalized_at] => 1752916153
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 145200
    [subtotal_excluding_tax] => 145200
    [tax] => 
    [test_clock] => 
    [total] => 145200
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 145200
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
        )

    [total_taxes] => Array
        (
        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752916064
)

[19-Jul-2025 09:10:55 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                )

            [time] => 2025-07-19T02:10:55.642-07:00
        )

)

[19-Jul-2025 09:10:56 UTC] Using QBO customer ID: 69
[19-Jul-2025 09:10:58 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 69
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 968
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 28
                                )

                            [UnitPrice] => 44
                            [Qty] => 22
                            [TaxCodeRef] => Array
                                (
                                    [value] => 1
                                )

                        )

                )

            [1] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 484
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 29
                                )

                            [UnitPrice] => 44
                            [Qty] => 11
                            [TaxCodeRef] => Array
                                (
                                    [value] => 1
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-19
    [DueDate] => 2025-08-18
    [TotalAmt] => 1452
    [PrivateNote] => Stripe Invoice ID: in_1RmWk6CDiOqgoJOUHpW9woLm
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [GlobalTaxCalculation] => TaxExcluded
)

[19-Jul-2025 09:10:59 UTC] QBO API response: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => A business validation error has occurred while processing your request
                                    [Detail] => Business Validation Error: Were sorry, QuickBooks encountered an error while calculating tax. Try reselecting the tax rate or reentering the product/service item and saving the form again.
                                    [code] => 6000
                                    [element] => 
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-19T02:10:58.793-07:00
        )

)

[19-Jul-2025 09:10:59 UTC] Invoice creation failed: Failed to create invoice in QuickBooks
[19-Jul-2025 09:10:59 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[19-Jul-2025 09:43:12 UTC] PHP Fatal error:  Uncaught mysqli_sql_exception: Table 'wdsklsxvqb_stripe_qbo_integration.qb_tax_codes' doesn't exist in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php:130
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php(130): mysqli->query()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 130
[19-Jul-2025 09:54:32 UTC] Stripe Webhook Received: invoice.created (ID: evt_1RmWk7CDiOqgoJOUNwgVvtq0)
[19-Jul-2025 09:54:32 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[19-Jul-2025 09:54:32 UTC] Starting invoice creation process for event: evt_1RmWk7CDiOqgoJOUNwgVvtq0
[19-Jul-2025 09:54:32 UTC] Fetching Stripe invoice: in_1RmWk6CDiOqgoJOUHpW9woLm
[19-Jul-2025 09:54:32 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RmWk6CDiOqgoJOUHpW9woLm
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 145200
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 145200
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 1
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1752916062
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => Array
        (
            [city] => testt
            [country] => US
            [line1] => rwrwr
            [line2] => fsf
            [postal_code] => 95014
            [state] => CO
        )

    [customer_email] => ratulbinhasan.integration@gmail.com
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => Array
        (
            [address] => Array
                (
                    [city] => testt
                    [country] => US
                    [line1] => rwrwr
                    [line2] => fsf
                    [postal_code] => 95014
                    [state] => CO
                )

            [name] => testt
            [phone] => 
        )

    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1755508153
    [effective_at] => 1752916153
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TaHdkdWpTT1VQQUFibHlsRmNQcklHRDB2RERDaUFlLDE0MzQ1OTY3Mg0200CpXDr2qj?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TaHdkdWpTT1VQQUFibHlsRmNQcklHRDB2RERDaUFlLDE0MzQ1OTY3Mg0200CpXDr2qj/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RmWkfCDiOqgoJOU223PxVdC
                            [object] => line_item
                            [amount] => 96800
                            [amount_excluding_tax] => 96800
                            [currency] => usd
                            [description] => this is test
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RmWk6CDiOqgoJOUHpW9woLm
                            [invoice_item] => ii_1RmWkfCDiOqgoJOUGNH6bdxr
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1RmWkfCDiOqgoJOUGNH6bdxr
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752916097
                                    [start] => 1752916097
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RmWkeCDiOqgoJOU3kt6yZYW
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1752916096
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_Sgn38fTX1x5ky6
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 4400
                                    [unit_amount_decimal] => 4400
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RmWkeCDiOqgoJOU3kt6yZYW
                                            [product] => prod_Sgn38fTX1x5ky6
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 4400
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 22
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 4400
                        )

                    [1] => Array
                        (
                            [id] => il_1RmWkTCDiOqgoJOUegXtbjyX
                            [object] => line_item
                            [amount] => 48400
                            [amount_excluding_tax] => 48400
                            [currency] => usd
                            [description] => losttt
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RmWk6CDiOqgoJOUHpW9woLm
                            [invoice_item] => ii_1RmWkTCDiOqgoJOUokHNa9Ox
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1RmWkTCDiOqgoJOUokHNa9Ox
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752916085
                                    [start] => 1752916085
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RmWkSCDiOqgoJOUw6sHdaOT
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1752916084
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SgnORpg4HJjM59
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 4400
                                    [unit_amount_decimal] => 4400
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RmWkSCDiOqgoJOUw6sHdaOT
                                            [product] => prod_SgnORpg4HJjM59
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 4400
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 11
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 4400
                        )

                )

            [has_more] => 
            [total_count] => 2
            [url] => /v1/invoices/in_1RmWk6CDiOqgoJOUHpW9woLm/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0009
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RmWlZCDiOqgoJOU0XAwjeU8
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752916062
    [period_start] => 1752916062
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => open
    [status_transitions] => Array
        (
            [finalized_at] => 1752916153
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 145200
    [subtotal_excluding_tax] => 145200
    [tax] => 
    [test_clock] => 
    [total] => 145200
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 145200
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
        )

    [total_taxes] => Array
        (
        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752916064
)

[19-Jul-2025 09:54:33 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => GBP
                                            [name] => British Pound Sterling
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 69
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-19T02:10:56-07:00
                                            [LastUpdatedTime] => 2025-07-19T02:10:56-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt(ratulbinhasan.integration@gmail.com)
                                    [DisplayName] => testt(ratulbinhasan.integration@gmail.com)
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002099efc94a2c4ff8483aa50d2908062c79ac
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratulbinhasan.integration@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-19T02:54:33.596-07:00
        )

)

[19-Jul-2025 09:54:33 UTC] Using QBO customer ID: 69
[19-Jul-2025 09:54:34 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 69
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 968
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 28
                                )

                            [UnitPrice] => 44
                            [Qty] => 22
                            [TaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                        )

                )

            [1] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 484
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 29
                                )

                            [UnitPrice] => 44
                            [Qty] => 11
                            [TaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-19
    [DueDate] => 2025-08-18
    [TotalAmt] => 1452
    [PrivateNote] => Stripe Invoice ID: in_1RmWk6CDiOqgoJOUHpW9woLm
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [GlobalTaxCalculation] => TaxExcluded
)

[19-Jul-2025 09:54:35 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 186
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-19T02:54:35-07:00
                            [LastModifiedByRef] => Array
                                (
                                    [value] => 9341455039383168
                                )

                            [LastUpdatedTime] => 2025-07-19T02:54:35-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-07-19
                    [CurrencyRef] => Array
                        (
                            [value] => GBP
                            [name] => British Pound Sterling
                        )

                    [ExchangeRate] => 1
                    [PrivateNote] => Stripe Invoice ID: in_1RmWk6CDiOqgoJOUHpW9woLm
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 968
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 28
                                                    [name] => this is test
                                                )

                                            [UnitPrice] => 44
                                            [Qty] => 22
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 66
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => 5
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Id] => 2
                                    [LineNum] => 2
                                    [Amount] => 484
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 29
                                                    [name] => losttt
                                                )

                                            [UnitPrice] => 44
                                            [Qty] => 11
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 66
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => 5
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [2] => Array
                                (
                                    [Amount] => 1452
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0
                                                    [NetAmountTaxable] => 1452
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 10
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0
                                                    [NetAmountTaxable] => 1452
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 69
                            [name] => testt(ratulbinhasan.integration@gmail.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 71
                            [Line1] => 2500 Garcia Ave
                            [Line2] => SomeCity
                            [Line3] => LO
                            [Line4] => CR2 6XH
                        )

                    [DueDate] => 2025-08-18
                    [GlobalTaxCalculation] => TaxExcluded
                    [TotalAmt] => 1452
                    [HomeTotalAmt] => 1452
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 1452
                    [HomeBalance] => 1452
                )

            [time] => 2025-07-19T02:54:34.745-07:00
        )

)

[19-Jul-2025 09:54:35 UTC] Invoice created successfully in QBO. Invoice ID: 186
[19-Jul-2025 09:54:35 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[19-Jul-2025 11:38:57 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1RjkcqCDiOqgoJOU6bFarlzm)
[19-Jul-2025 11:38:57 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[19-Jul-2025 11:38:57 UTC] Starting payment process for Stripe invoice: evt_1RjkcqCDiOqgoJOU6bFarlzm
[19-Jul-2025 11:38:57 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[19-Jul-2025 11:38:57 UTC] Payment already processed. QBO Payment ID: 185
[19-Jul-2025 11:41:21 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1RjkcqCDiOqgoJOU6bFarlzm)
[19-Jul-2025 11:41:21 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[19-Jul-2025 11:41:21 UTC] Starting payment process for Stripe invoice: evt_1RjkcqCDiOqgoJOU6bFarlzm
[19-Jul-2025 11:41:21 UTC] Fetching Stripe invoice: in_1Rjka2CDiOqgoJOUHTKqZegC
[19-Jul-2025 11:41:21 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 18315
    [amount_remaining] => 0
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 1
    [attempted] => 1
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => ch_3RjkcnCDiOqgoJOU0KxD8HfP
    [collection_method] => send_invoice
    [created] => 1752254270
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754846441
    [effective_at] => 1752254441
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => Array
        (
            [action] => revision
            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
        )

    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZjRqdXJFRTN1cUFKRXEzUXRFc1BFakJlSDRMUlQ0LDE0MzQ2NjA4MQ0200kH1IQmhm?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZjRqdXJFRTN1cUFKRXEzUXRFc1BFakJlSDRMUlQ0LDE0MzQ2NjA4MQ0200kH1IQmhm/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjka2CDiOqgoJOUb2xoQRXy
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjka2CDiOqgoJOUHTKqZegC
                            [invoice_item] => ii_1Rjka2CDiOqgoJOU4AZwXlnQ
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjka2CDiOqgoJOU4AZwXlnQ
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjka2CDiOqgoJOUHTKqZegC/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0006
    [on_behalf_of] => 
    [paid] => 1
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RjkcnCDiOqgoJOU04KzaIsc
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => 
            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => paid
    [status_transitions] => Array
        (
            [finalized_at] => 1752254441
            [marked_uncollectible_at] => 
            [paid_at] => 1752254441
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752254270
)

[19-Jul-2025 11:41:23 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 183.15
                                    [BalanceWithJobs] => 183.15
                                    [CurrencyRef] => Array
                                        (
                                            [value] => GBP
                                            [name] => British Pound Sterling
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 68
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-18T22:34:59-07:00
                                            [LastUpdatedTime] => 2025-07-19T01:48:21-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt(test@fsdf.fg)
                                    [DisplayName] => testt(test@fsdf.fg)
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020992cd9a85c4e8748038f277712ed02d71b
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-19T04:41:22.919-07:00
        )

)

[19-Jul-2025 11:41:23 UTC] Using QBO customer ID: 68
[19-Jul-2025 11:41:23 UTC] No existing QBO invoice found, creating new one
[19-Jul-2025 11:41:23 UTC] Found matching tax code: 13 for rate: 11%
[19-Jul-2025 11:41:23 UTC] Creating new QBO invoice with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 68
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 165
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 27
                                )

                            [UnitPrice] => 5
                            [Qty] => 33
                            [TaxCodeRef] => Array
                                (
                                    [value] => 13
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-11
    [DueDate] => 2025-08-10
    [TotalAmt] => 183.15
    [PrivateNote] => Stripe Invoice ID: in_1Rjka2CDiOqgoJOUHTKqZegC
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [GlobalTaxCalculation] => TaxExcluded
    [TxnTaxDetail] => Array
        (
            [TotalTax] => 18.15
        )

)

[19-Jul-2025 11:41:24 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 187
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-19T04:41:24-07:00
                            [LastModifiedByRef] => Array
                                (
                                    [value] => 9341455039383168
                                )

                            [LastUpdatedTime] => 2025-07-19T04:41:24-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-07-11
                    [CurrencyRef] => Array
                        (
                            [value] => GBP
                            [name] => British Pound Sterling
                        )

                    [ExchangeRate] => 1
                    [PrivateNote] => Stripe Invoice ID: in_1Rjka2CDiOqgoJOUHTKqZegC
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 165
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 27
                                                    [name] => product1
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 33
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 66
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => 13
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 165
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 18.15
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 18.15
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 22
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 11
                                                    [NetAmountTaxable] => 165
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 68
                            [name] => testt(test@fsdf.fg)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 72
                            [Line1] => 2500 Garcia Ave
                            [Line2] => SomeCity
                            [Line3] => LO
                            [Line4] => CR2 6XH
                        )

                    [DueDate] => 2025-08-10
                    [GlobalTaxCalculation] => TaxExcluded
                    [TotalAmt] => 183.15
                    [HomeTotalAmt] => 183.15
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 183.15
                    [HomeBalance] => 183.15
                )

            [time] => 2025-07-19T04:41:23.658-07:00
        )

)

[19-Jul-2025 11:41:24 UTC] Created new QBO invoice ID: 187
[19-Jul-2025 11:41:25 UTC] Failed to create payment method: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Invalid Enumeration
                                    [Detail] => Invalid Enumeration : OTHER
                                    [code] => 2170
                                    [element] => Type
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-19T04:41:25.459-07:00
        )

)

[19-Jul-2025 11:41:25 UTC] Creating QBO payment with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 68
        )

    [TotalAmt] => 183.15
    [TxnDate] => 2025-07-11
    [PaymentRefNum] => pi_3RjkcnCDiOqgoJOU04
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [DepositToAccountRef] => Array
        (
            [value] => 83
        )

    [PrivateNote] => Stripe Invoice ID: in_1Rjka2CDiOqgoJOUHTKqZegC
    [Line] => Array
        (
            [0] => Array
                (
                    [Amount] => 183.15
                    [LinkedTxn] => Array
                        (
                            [0] => Array
                                (
                                    [TxnId] => 187
                                    [TxnType] => Invoice
                                )

                        )

                )

        )

)

[19-Jul-2025 11:41:26 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Payment] => Array
                (
                    [CustomerRef] => Array
                        (
                            [value] => 68
                            [name] => testt(test@fsdf.fg)
                        )

                    [DepositToAccountRef] => Array
                        (
                            [value] => 83
                        )

                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                        )

                    [PaymentRefNum] => pi_3RjkcnCDiOqgoJOU04
                    [TotalAmt] => 183.15
                    [UnappliedAmt] => 0
                    [ProcessPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 188
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-19T04:41:26-07:00
                            [LastUpdatedTime] => 2025-07-19T04:41:26-07:00
                        )

                    [TxnDate] => 2025-07-11
                    [CurrencyRef] => Array
                        (
                            [value] => GBP
                            [name] => British Pound Sterling
                        )

                    [ExchangeRate] => 1
                    [PrivateNote] => Stripe Invoice ID: in_1Rjka2CDiOqgoJOUHTKqZegC
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Amount] => 183.15
                                    [LinkedTxn] => Array
                                        (
                                            [0] => Array
                                                (
                                                    [TxnId] => 187
                                                    [TxnType] => Invoice
                                                )

                                        )

                                    [LineEx] => Array
                                        (
                                            [any] => Array
                                                (
                                                    [0] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnId
                                                                    [Value] => 187
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                    [1] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnOpenBalance
                                                                    [Value] => 183.15
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                    [2] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnReferenceNumber
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                )

                                        )

                                )

                        )

                )

            [time] => 2025-07-19T04:41:26.068-07:00
        )

)

[19-Jul-2025 11:41:26 UTC] Payment created successfully in QBO. Payment ID: 188
[19-Jul-2025 11:41:26 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[19-Jul-2025 11:48:30 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1RjkcqCDiOqgoJOU6bFarlzm)
[19-Jul-2025 11:48:30 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[19-Jul-2025 11:48:30 UTC] Starting payment process for Stripe invoice: evt_1RjkcqCDiOqgoJOU6bFarlzm
[19-Jul-2025 11:48:30 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[19-Jul-2025 11:48:30 UTC] Payment already processed. QBO Payment ID: 188
[19-Jul-2025 11:49:02 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1RjkcqCDiOqgoJOU6bFarlzm)
[19-Jul-2025 11:49:02 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[19-Jul-2025 11:49:02 UTC] Starting payment process for Stripe invoice: evt_1RjkcqCDiOqgoJOU6bFarlzm
[19-Jul-2025 11:49:02 UTC] Fetching Stripe invoice: in_1Rjka2CDiOqgoJOUHTKqZegC
[19-Jul-2025 11:49:02 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 18315
    [amount_remaining] => 0
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 1
    [attempted] => 1
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => ch_3RjkcnCDiOqgoJOU0KxD8HfP
    [collection_method] => send_invoice
    [created] => 1752254270
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754846441
    [effective_at] => 1752254441
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => Array
        (
            [action] => revision
            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
        )

    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZjRqdXJFRTN1cUFKRXEzUXRFc1BFakJlSDRMUlQ0LDE0MzQ2NjU0Mg0200qSu5zwEu?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZjRqdXJFRTN1cUFKRXEzUXRFc1BFakJlSDRMUlQ0LDE0MzQ2NjU0Mg0200qSu5zwEu/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjka2CDiOqgoJOUb2xoQRXy
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjka2CDiOqgoJOUHTKqZegC
                            [invoice_item] => ii_1Rjka2CDiOqgoJOU4AZwXlnQ
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjka2CDiOqgoJOU4AZwXlnQ
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjka2CDiOqgoJOUHTKqZegC/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0006
    [on_behalf_of] => 
    [paid] => 1
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RjkcnCDiOqgoJOU04KzaIsc
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => 
            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => paid
    [status_transitions] => Array
        (
            [finalized_at] => 1752254441
            [marked_uncollectible_at] => 
            [paid_at] => 1752254441
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752254270
)

[19-Jul-2025 11:49:04 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 573.2
                                    [BalanceWithJobs] => 573.2
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 101
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-10T06:03:19-07:00
                                            [LastUpdatedTime] => 2025-07-18T10:51:56-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt
                                    [DisplayName] => testt
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098e066dfbe82b54d139d83565e5f664ced
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                )

                            [1] => Array
                                (
                                    [Taxable] => 1
                                    [BillAddr] => Array
                                        (
                                            [Id] => 141
                                        )

                                    [ShipAddr] => Array
                                        (
                                            [Id] => 141
                                        )

                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 99
                                    [SyncToken] => 1
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-10T01:36:59-07:00
                                            [LastUpdatedTime] => 2025-07-10T06:02:55-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testtqq
                                    [DisplayName] => testtqq
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020981d6681610c5f4203ac7c35187bf645d0
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                    [DefaultTaxCodeRef] => Array
                                        (
                                            [value] => 2
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 2
                )

            [time] => 2025-07-19T04:49:04.412-07:00
        )

)

[19-Jul-2025 11:49:04 UTC] Using QBO customer ID: 101
[19-Jul-2025 11:49:04 UTC] Found existing QBO invoice ID: 187
[19-Jul-2025 11:49:04 UTC] Payment creation failed: Failed to fetch QuickBooks invoice: 187
[19-Jul-2025 11:49:04 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[19-Jul-2025 11:51:58 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1RjkcqCDiOqgoJOU6bFarlzm)
[19-Jul-2025 11:51:58 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[19-Jul-2025 11:51:58 UTC] Starting payment process for Stripe invoice: evt_1RjkcqCDiOqgoJOU6bFarlzm
[19-Jul-2025 11:51:58 UTC] Fetching Stripe invoice: in_1Rjka2CDiOqgoJOUHTKqZegC
[19-Jul-2025 11:51:59 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 18315
    [amount_remaining] => 0
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 1
    [attempted] => 1
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => ch_3RjkcnCDiOqgoJOU0KxD8HfP
    [collection_method] => send_invoice
    [created] => 1752254270
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754846441
    [effective_at] => 1752254441
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => Array
        (
            [action] => revision
            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
        )

    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZjRqdXJFRTN1cUFKRXEzUXRFc1BFakJlSDRMUlQ0LDE0MzQ2NjcxOQ02001tdRopIF?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZjRqdXJFRTN1cUFKRXEzUXRFc1BFakJlSDRMUlQ0LDE0MzQ2NjcxOQ02001tdRopIF/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjka2CDiOqgoJOUb2xoQRXy
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjka2CDiOqgoJOUHTKqZegC
                            [invoice_item] => ii_1Rjka2CDiOqgoJOU4AZwXlnQ
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjka2CDiOqgoJOU4AZwXlnQ
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjka2CDiOqgoJOUHTKqZegC/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0006
    [on_behalf_of] => 
    [paid] => 1
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RjkcnCDiOqgoJOU04KzaIsc
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => 
            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => paid
    [status_transitions] => Array
        (
            [finalized_at] => 1752254441
            [marked_uncollectible_at] => 
            [paid_at] => 1752254441
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752254270
)

[19-Jul-2025 11:52:01 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 573.2
                                    [BalanceWithJobs] => 573.2
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 101
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-10T06:03:19-07:00
                                            [LastUpdatedTime] => 2025-07-18T10:51:56-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt
                                    [DisplayName] => testt
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098e066dfbe82b54d139d83565e5f664ced
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                )

                            [1] => Array
                                (
                                    [Taxable] => 1
                                    [BillAddr] => Array
                                        (
                                            [Id] => 141
                                        )

                                    [ShipAddr] => Array
                                        (
                                            [Id] => 141
                                        )

                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 99
                                    [SyncToken] => 1
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-10T01:36:59-07:00
                                            [LastUpdatedTime] => 2025-07-10T06:02:55-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testtqq
                                    [DisplayName] => testtqq
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020981d6681610c5f4203ac7c35187bf645d0
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                    [DefaultTaxCodeRef] => Array
                                        (
                                            [value] => 2
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 2
                )

            [time] => 2025-07-19T04:52:00.985-07:00
        )

)

[19-Jul-2025 11:52:01 UTC] Using QBO customer ID: 101
[19-Jul-2025 11:52:01 UTC] No existing QBO invoice found, creating new one
[19-Jul-2025 11:52:01 UTC] Creating new QBO invoice with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 101
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 165
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 25
                                )

                            [UnitPrice] => 5
                            [Qty] => 33
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-11
    [DueDate] => 2025-08-10
    [TotalAmt] => 183.15
    [PrivateNote] => Stripe Invoice ID: in_1Rjka2CDiOqgoJOUHTKqZegC
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 18.15
        )

)

[19-Jul-2025 11:52:02 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 669
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-19T04:52:02-07:00
                            [LastModifiedByRef] => Array
                                (
                                    [value] => 123145870265994
                                )

                            [LastUpdatedTime] => 2025-07-19T04:52:02-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1264
                    [TxnDate] => 2025-07-11
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Invoice ID: in_1Rjka2CDiOqgoJOUHTKqZegC
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 165
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 25
                                                    [name] => product1
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 33
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 1
                                                    [name] => Services
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-99990201-V1-00020000
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 165
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 18.15
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 1.43
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 11.94
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 2.87
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 1.91
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 101
                            [name] => testt
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 183
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [DueDate] => 2025-08-10
                    [TotalAmt] => 183.15
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 183.15
                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-19T04:52:01.528-07:00
        )

)

[19-Jul-2025 11:52:02 UTC] Created new QBO invoice ID: 669
[19-Jul-2025 11:52:04 UTC] Failed to create payment method: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Invalid Enumeration
                                    [Detail] => Invalid Enumeration : OTHER
                                    [code] => 2170
                                    [element] => Type
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-19T04:52:03.759-07:00
        )

)

[19-Jul-2025 11:52:04 UTC] Creating QBO payment with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 101
        )

    [TotalAmt] => 183.15
    [TxnDate] => 2025-07-11
    [PaymentRefNum] => pi_3RjkcnCDiOqgoJOU04
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

    [PrivateNote] => Stripe Invoice ID: in_1Rjka2CDiOqgoJOUHTKqZegC
    [Line] => Array
        (
            [0] => Array
                (
                    [Amount] => 183.15
                    [LinkedTxn] => Array
                        (
                            [0] => Array
                                (
                                    [TxnId] => 669
                                    [TxnType] => Invoice
                                )

                        )

                )

        )

)

[19-Jul-2025 11:52:05 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Payment] => Array
                (
                    [CustomerRef] => Array
                        (
                            [value] => 101
                            [name] => testt
                        )

                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                        )

                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                        )

                    [PaymentRefNum] => pi_3RjkcnCDiOqgoJOU04
                    [TotalAmt] => 183.15
                    [UnappliedAmt] => 0
                    [ProcessPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 670
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-19T04:52:05-07:00
                            [LastUpdatedTime] => 2025-07-19T04:52:05-07:00
                        )

                    [TxnDate] => 2025-07-11
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Invoice ID: in_1Rjka2CDiOqgoJOUHTKqZegC
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Amount] => 183.15
                                    [LinkedTxn] => Array
                                        (
                                            [0] => Array
                                                (
                                                    [TxnId] => 669
                                                    [TxnType] => Invoice
                                                )

                                        )

                                    [LineEx] => Array
                                        (
                                            [any] => Array
                                                (
                                                    [0] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnId
                                                                    [Value] => 669
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                    [1] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnOpenBalance
                                                                    [Value] => 183.15
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                    [2] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnReferenceNumber
                                                                    [Value] => 1264
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                )

                                        )

                                )

                        )

                )

            [time] => 2025-07-19T04:52:04.632-07:00
        )

)

[19-Jul-2025 11:52:05 UTC] Payment created successfully in QBO. Payment ID: 670
[19-Jul-2025 11:52:05 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[19-Jul-2025 12:02:37 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1RjkcqCDiOqgoJOU6bFarlzm)
[19-Jul-2025 12:02:37 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[19-Jul-2025 12:02:37 UTC] Starting payment process for Stripe invoice: evt_1RjkcqCDiOqgoJOU6bFarlzm
[19-Jul-2025 12:02:37 UTC] Fetching Stripe invoice: in_1Rjka2CDiOqgoJOUHTKqZegC
[19-Jul-2025 12:02:37 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 18315
    [amount_remaining] => 0
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 1
    [attempted] => 1
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => ch_3RjkcnCDiOqgoJOU0KxD8HfP
    [collection_method] => send_invoice
    [created] => 1752254270
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754846441
    [effective_at] => 1752254441
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => Array
        (
            [action] => revision
            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
        )

    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZjRqdXJFRTN1cUFKRXEzUXRFc1BFakJlSDRMUlQ0LDE0MzQ2NzM1Nw0200NrwNDeja?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZjRqdXJFRTN1cUFKRXEzUXRFc1BFakJlSDRMUlQ0LDE0MzQ2NzM1Nw0200NrwNDeja/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjka2CDiOqgoJOUb2xoQRXy
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjka2CDiOqgoJOUHTKqZegC
                            [invoice_item] => ii_1Rjka2CDiOqgoJOU4AZwXlnQ
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjka2CDiOqgoJOU4AZwXlnQ
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjka2CDiOqgoJOUHTKqZegC/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0006
    [on_behalf_of] => 
    [paid] => 1
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RjkcnCDiOqgoJOU04KzaIsc
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => 
            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => paid
    [status_transitions] => Array
        (
            [finalized_at] => 1752254441
            [marked_uncollectible_at] => 
            [paid_at] => 1752254441
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752254270
)

[19-Jul-2025 12:02:39 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 366.3
                                    [BalanceWithJobs] => 366.3
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 70
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-16T05:34:36-07:00
                                            [LastUpdatedTime] => 2025-07-18T10:55:21-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt(test@fsdf.fg)
                                    [DisplayName] => testt(test@fsdf.fg)
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002099faf13f8ad34a4e63aef829e8a9142f8a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-19T05:02:39.385-07:00
        )

)

[19-Jul-2025 12:02:39 UTC] Using QBO customer ID: 70
[19-Jul-2025 12:02:39 UTC] No existing QBO invoice found, creating new one
[19-Jul-2025 12:02:39 UTC] Found matching tax code: 8 for rate: 11%
[19-Jul-2025 12:02:39 UTC] Creating new QBO invoice with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 70
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 165
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 26
                                )

                            [UnitPrice] => 5
                            [Qty] => 33
                            [TaxCodeRef] => Array
                                (
                                    [value] => 8
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-11
    [DueDate] => 2025-08-10
    [TotalAmt] => 183.15
    [PrivateNote] => Stripe Invoice ID: in_1Rjka2CDiOqgoJOUHTKqZegC
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [GlobalTaxCalculation] => TaxExcluded
    [TxnTaxDetail] => Array
        (
            [TotalTax] => 18.15
        )

)

[19-Jul-2025 12:02:40 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 211
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-19T05:02:41-07:00
                            [LastModifiedByRef] => Array
                                (
                                    [value] => 9341455021033327
                                )

                            [LastUpdatedTime] => 2025-07-19T05:02:41-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-07-11
                    [CurrencyRef] => Array
                        (
                            [value] => AUD
                            [name] => Australian Dollar
                        )

                    [ExchangeRate] => 1
                    [PrivateNote] => Stripe Invoice ID: in_1Rjka2CDiOqgoJOUHTKqZegC
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 165
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 26
                                                    [name] => product1
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 33
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 81
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => 8
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 165
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0
                                                    [NetAmountTaxable] => 165
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 70
                            [name] => testt(test@fsdf.fg)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 73
                            [Line1] => 2500 Garcia Ave
                            [Line2] => Sydney NSW  2050
                        )

                    [DueDate] => 2025-08-10
                    [GlobalTaxCalculation] => TaxExcluded
                    [TotalAmt] => 165
                    [HomeTotalAmt] => 165
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 165
                    [HomeBalance] => 165
                )

            [time] => 2025-07-19T05:02:40.182-07:00
        )

)

[19-Jul-2025 12:02:40 UTC] Created new QBO invoice ID: 211
[19-Jul-2025 12:02:41 UTC] Failed to create payment method: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Invalid Enumeration
                                    [Detail] => Invalid Enumeration : OTHER
                                    [code] => 2170
                                    [element] => Type
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-19T05:02:41.899-07:00
        )

)

[19-Jul-2025 12:02:42 UTC] Creating QBO payment with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 70
        )

    [TotalAmt] => 183.15
    [TxnDate] => 2025-07-11
    [PaymentRefNum] => pi_3RjkcnCDiOqgoJOU04
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [DepositToAccountRef] => Array
        (
            [value] => 108
        )

    [PrivateNote] => Stripe Invoice ID: in_1Rjka2CDiOqgoJOUHTKqZegC
    [Line] => Array
        (
            [0] => Array
                (
                    [Amount] => 183.15
                    [LinkedTxn] => Array
                        (
                            [0] => Array
                                (
                                    [TxnId] => 211
                                    [TxnType] => Invoice
                                )

                        )

                )

        )

)

[19-Jul-2025 12:02:42 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Payment] => Array
                (
                    [CustomerRef] => Array
                        (
                            [value] => 70
                            [name] => testt(test@fsdf.fg)
                        )

                    [DepositToAccountRef] => Array
                        (
                            [value] => 108
                        )

                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                        )

                    [PaymentRefNum] => pi_3RjkcnCDiOqgoJOU04
                    [TotalAmt] => 183.15
                    [UnappliedAmt] => 18.15
                    [ProcessPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 212
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-19T05:02:43-07:00
                            [LastUpdatedTime] => 2025-07-19T05:02:43-07:00
                        )

                    [TxnDate] => 2025-07-11
                    [CurrencyRef] => Array
                        (
                            [value] => AUD
                            [name] => Australian Dollar
                        )

                    [ExchangeRate] => 1
                    [PrivateNote] => Stripe Invoice ID: in_1Rjka2CDiOqgoJOUHTKqZegC
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Amount] => 165
                                    [LinkedTxn] => Array
                                        (
                                            [0] => Array
                                                (
                                                    [TxnId] => 211
                                                    [TxnType] => Invoice
                                                )

                                        )

                                    [LineEx] => Array
                                        (
                                            [any] => Array
                                                (
                                                    [0] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnId
                                                                    [Value] => 211
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                    [1] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnOpenBalance
                                                                    [Value] => 165.00
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                    [2] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnReferenceNumber
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                )

                                        )

                                )

                        )

                )

            [time] => 2025-07-19T05:02:42.512-07:00
        )

)

[19-Jul-2025 12:02:42 UTC] Payment created successfully in QBO. Payment ID: 212
[19-Jul-2025 12:02:42 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[19-Jul-2025 12:09:56 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1RjkcqCDiOqgoJOU6bFarlzm)
[19-Jul-2025 12:09:56 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[19-Jul-2025 12:09:56 UTC] Starting payment process for Stripe invoice: evt_1RjkcqCDiOqgoJOU6bFarlzm
[19-Jul-2025 12:09:56 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[19-Jul-2025 12:09:56 UTC] Payment already processed. QBO Payment ID: 212
[19-Jul-2025 12:11:24 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1RjkcqCDiOqgoJOU6bFarlzm)
[19-Jul-2025 12:11:24 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[19-Jul-2025 12:11:24 UTC] Starting payment process for Stripe invoice: evt_1RjkcqCDiOqgoJOU6bFarlzm
[19-Jul-2025 12:11:24 UTC] Fetching Stripe invoice: in_1Rjka2CDiOqgoJOUHTKqZegC
[19-Jul-2025 12:11:25 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rjka2CDiOqgoJOUHTKqZegC
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 18315
    [amount_overpaid] => 0
    [amount_paid] => 18315
    [amount_remaining] => 0
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 1
    [attempted] => 1
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => ch_3RjkcnCDiOqgoJOU0KxD8HfP
    [collection_method] => send_invoice
    [created] => 1752254270
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => 
    [customer_email] => test@fsdf.fg
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1754846441
    [effective_at] => 1752254441
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => Array
        (
            [action] => revision
            [invoice] => in_1Rjb30CDiOqgoJOUBodxSTyg
        )

    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZjRqdXJFRTN1cUFKRXEzUXRFc1BFakJlSDRMUlQ0LDE0MzQ2Nzg4NQ0200fC6LwpXZ?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TZjRqdXJFRTN1cUFKRXEzUXRFc1BFakJlSDRMUlQ0LDE0MzQ2Nzg4NQ0200fC6LwpXZ/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rjka2CDiOqgoJOUb2xoQRXy
                            [object] => line_item
                            [amount] => 16500
                            [amount_excluding_tax] => 16500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rjka2CDiOqgoJOUHTKqZegC
                            [invoice_item] => ii_1Rjka2CDiOqgoJOU4AZwXlnQ
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rjka2CDiOqgoJOU4AZwXlnQ
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1752217656
                                    [start] => 1752217656
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 33
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 16500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1815
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 16500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rjka2CDiOqgoJOUHTKqZegC/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0006
    [on_behalf_of] => 
    [paid] => 1
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RjkcnCDiOqgoJOU04KzaIsc
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1752217626
    [period_start] => 1752217626
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => 
            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => paid
    [status_transitions] => Array
        (
            [finalized_at] => 1752254441
            [marked_uncollectible_at] => 
            [paid_at] => 1752254441
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 16500
    [subtotal_excluding_tax] => 16500
    [tax] => 1815
    [test_clock] => 
    [total] => 18315
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 16500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 16500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1815
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 16500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1752254270
)

[19-Jul-2025 12:11:26 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 348.15
                                    [BalanceWithJobs] => 348.15
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 70
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-16T05:34:36-07:00
                                            [LastUpdatedTime] => 2025-07-19T05:02:43-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt(test@fsdf.fg)
                                    [DisplayName] => testt(test@fsdf.fg)
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002099faf13f8ad34a4e63aef829e8a9142f8a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => test@fsdf.fg
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-19T05:11:26.185-07:00
        )

)

[19-Jul-2025 12:11:26 UTC] Using QBO customer ID: 70
[19-Jul-2025 12:11:26 UTC] No existing QBO invoice found, creating new one
[19-Jul-2025 12:11:26 UTC] Found matching tax code: 11 for rate: 11%
[19-Jul-2025 12:11:26 UTC] Creating new QBO invoice with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 70
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 165
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 26
                                )

                            [UnitPrice] => 5
                            [Qty] => 33
                            [TaxCodeRef] => Array
                                (
                                    [value] => 11
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-11
    [DueDate] => 2025-08-10
    [TotalAmt] => 183.15
    [PrivateNote] => Stripe Invoice ID: in_1Rjka2CDiOqgoJOUHTKqZegC
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [GlobalTaxCalculation] => TaxExcluded
    [TxnTaxDetail] => Array
        (
            [TotalTax] => 18.15
        )

)

[19-Jul-2025 12:11:27 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 213
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-19T05:11:27-07:00
                            [LastModifiedByRef] => Array
                                (
                                    [value] => 9341455021033327
                                )

                            [LastUpdatedTime] => 2025-07-19T05:11:27-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-07-11
                    [CurrencyRef] => Array
                        (
                            [value] => AUD
                            [name] => Australian Dollar
                        )

                    [ExchangeRate] => 1
                    [PrivateNote] => Stripe Invoice ID: in_1Rjka2CDiOqgoJOUHTKqZegC
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 165
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 26
                                                    [name] => product1
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 33
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 81
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => 11
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 165
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 18.15
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 18.15
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 21
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 11
                                                    [NetAmountTaxable] => 165
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 70
                            [name] => testt(test@fsdf.fg)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 74
                            [Line1] => 2500 Garcia Ave
                            [Line2] => Sydney NSW  2050
                        )

                    [DueDate] => 2025-08-10
                    [GlobalTaxCalculation] => TaxExcluded
                    [TotalAmt] => 183.15
                    [HomeTotalAmt] => 183.15
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 183.15
                    [HomeBalance] => 183.15
                )

            [time] => 2025-07-19T05:11:26.948-07:00
        )

)

[19-Jul-2025 12:11:27 UTC] Created new QBO invoice ID: 213
[19-Jul-2025 12:11:28 UTC] Failed to create payment method: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Invalid Enumeration
                                    [Detail] => Invalid Enumeration : OTHER
                                    [code] => 2170
                                    [element] => Type
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-19T05:11:28.875-07:00
        )

)

[19-Jul-2025 12:11:29 UTC] Creating QBO payment with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 70
        )

    [TotalAmt] => 183.15
    [TxnDate] => 2025-07-11
    [PaymentRefNum] => pi_3RjkcnCDiOqgoJOU04
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [DepositToAccountRef] => Array
        (
            [value] => 108
        )

    [PrivateNote] => Stripe Invoice ID: in_1Rjka2CDiOqgoJOUHTKqZegC
    [Line] => Array
        (
            [0] => Array
                (
                    [Amount] => 183.15
                    [LinkedTxn] => Array
                        (
                            [0] => Array
                                (
                                    [TxnId] => 213
                                    [TxnType] => Invoice
                                )

                        )

                )

        )

)

[19-Jul-2025 12:11:29 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Payment] => Array
                (
                    [CustomerRef] => Array
                        (
                            [value] => 70
                            [name] => testt(test@fsdf.fg)
                        )

                    [DepositToAccountRef] => Array
                        (
                            [value] => 108
                        )

                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                        )

                    [PaymentRefNum] => pi_3RjkcnCDiOqgoJOU04
                    [TotalAmt] => 183.15
                    [UnappliedAmt] => 0
                    [ProcessPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 214
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-19T05:11:30-07:00
                            [LastUpdatedTime] => 2025-07-19T05:11:30-07:00
                        )

                    [TxnDate] => 2025-07-11
                    [CurrencyRef] => Array
                        (
                            [value] => AUD
                            [name] => Australian Dollar
                        )

                    [ExchangeRate] => 1
                    [PrivateNote] => Stripe Invoice ID: in_1Rjka2CDiOqgoJOUHTKqZegC
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Amount] => 183.15
                                    [LinkedTxn] => Array
                                        (
                                            [0] => Array
                                                (
                                                    [TxnId] => 213
                                                    [TxnType] => Invoice
                                                )

                                        )

                                    [LineEx] => Array
                                        (
                                            [any] => Array
                                                (
                                                    [0] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnId
                                                                    [Value] => 213
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                    [1] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnOpenBalance
                                                                    [Value] => 183.15
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                    [2] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnReferenceNumber
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                )

                                        )

                                )

                        )

                )

            [time] => 2025-07-19T05:11:29.508-07:00
        )

)

[19-Jul-2025 12:11:29 UTC] Payment created successfully in QBO. Payment ID: 214
[19-Jul-2025 12:11:29 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[19-Jul-2025 12:17:06 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RmWlZCDiOqgoJOU0aeQRFuu)
[19-Jul-2025 12:17:06 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[19-Jul-2025 12:17:06 UTC] Starting sales receipt creation process for event: evt_3RmWlZCDiOqgoJOU0aeQRFuu
[19-Jul-2025 12:17:06 UTC] Sales receipt creation failed: Customer email is required but missing
[19-Jul-2025 12:17:06 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:220
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(50): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 220
[19-Jul-2025 12:20:17 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RmWlZCDiOqgoJOU0aeQRFuu)
[19-Jul-2025 12:20:17 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[19-Jul-2025 12:20:17 UTC] Starting sales receipt creation process for event: evt_3RmWlZCDiOqgoJOU0aeQRFuu
[19-Jul-2025 12:20:17 UTC] Sales receipt creation failed: Customer email is required but missing
[19-Jul-2025 12:20:17 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:220
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(50): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 220
[19-Jul-2025 12:49:01 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RmWlZCDiOqgoJOU0aeQRFuu)
[19-Jul-2025 12:49:01 UTC] PHP Parse error:  syntax error, unexpected token "{" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 131
[19-Jul-2025 12:49:37 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RmWlZCDiOqgoJOU0aeQRFuu)
[19-Jul-2025 12:49:37 UTC] PHP Parse error:  syntax error, unexpected token "{" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 367
[19-Jul-2025 12:50:32 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RmWlZCDiOqgoJOU0aeQRFuu)
[19-Jul-2025 12:50:32 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[19-Jul-2025 12:50:32 UTC] Starting sales receipt creation process for event: evt_3RmWlZCDiOqgoJOU0aeQRFuu
[19-Jul-2025 12:50:32 UTC] Sales receipt creation failed: Customer email is required but missing
[19-Jul-2025 12:50:32 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:283
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(50): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 283
[19-Jul-2025 13:58:03 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RmbH2CDiOqgoJOU1LLExVNf)
[19-Jul-2025 13:58:03 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[19-Jul-2025 13:58:03 UTC] Starting sales receipt creation process for event: evt_3RmbH2CDiOqgoJOU1LLExVNf
[19-Jul-2025 13:58:03 UTC] Sales receipt creation failed: Customer email is required but missing
[19-Jul-2025 13:58:03 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:283
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(50): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 283
[19-Jul-2025 14:14:13 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RmbWhCDiOqgoJOU0iI1ZSFD)
[19-Jul-2025 14:14:13 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[19-Jul-2025 14:14:13 UTC] Starting sales receipt creation process for event: evt_3RmbWhCDiOqgoJOU0iI1ZSFD
[19-Jul-2025 14:14:14 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                )

            [time] => 2025-07-19T07:14:14.546-07:00
        )

)

[19-Jul-2025 14:14:15 UTC] Using QBO customer ID: 106
[19-Jul-2025 14:14:15 UTC] Found checkout session line items: 1
[19-Jul-2025 14:14:16 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 106
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 66
                    [Description] => llll
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 32
                                )

                            [UnitPrice] => 66
                            [Qty] => 1
                        )

                )

        )

    [TxnDate] => 2025-07-19
    [TotalAmt] => 66
    [PrivateNote] => Stripe Payment Intent ID: pi_3RmbWhCDiOqgoJOU002C1xOF
    [PaymentRefNum] => ch_3RmbWhCDiOqgoJOU09u55yTR
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 0
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[19-Jul-2025 14:14:20 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 671
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-19T07:14:17-07:00
                            [LastUpdatedTime] => 2025-07-19T07:14:17-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1265
                    [TxnDate] => 2025-07-19
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3RmbWhCDiOqgoJOU002C1xOF
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => llll
                                    [Amount] => 66
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 32
                                                    [name] => llll
                                                )

                                            [UnitPrice] => 66
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-09020802-V1-00120000
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 66
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 66
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 66
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 66
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 66
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 106
                            [name] => Ratul test(ratull@testtt.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 184
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 66
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3RmbWhCDiOqgoJOU09u55yTR
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-19T07:14:17.213-07:00
        )

)

[19-Jul-2025 14:14:20 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 671
[19-Jul-2025 14:14:20 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[19-Jul-2025 15:36:36 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RmcoQCDiOqgoJOU0Ne4cymJ)
[19-Jul-2025 15:36:36 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[19-Jul-2025 15:36:36 UTC] Starting sales receipt creation process for event: evt_3RmcoQCDiOqgoJOU0Ne4cymJ
[19-Jul-2025 15:36:36 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1752939396921
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[19-Jul-2025 15:36:37 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1752939397145
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[19-Jul-2025 15:36:37 UTC] Sales receipt creation failed: Failed to find or create customer in QuickBooks
[19-Jul-2025 15:36:37 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:220
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(50): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 220
[19-Jul-2025 16:26:00 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RmWlZCDiOqgoJOU0aeQRFuu)
[19-Jul-2025 16:26:00 UTC] PHP Parse error:  syntax error, unexpected token "{" in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 53
[19-Jul-2025 16:26:50 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RmWlZCDiOqgoJOU0aeQRFuu)
[19-Jul-2025 16:26:50 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[19-Jul-2025 16:26:50 UTC] Starting sales receipt creation process for event: evt_3RmWlZCDiOqgoJOU0aeQRFuu
[19-Jul-2025 16:26:50 UTC] No customer email in charge details, trying to get from invoice
[19-Jul-2025 16:26:50 UTC] Found customer details from invoice: ratulbinhasan.integration@gmail.com
[19-Jul-2025 16:26:51 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 61
                                    [BalanceWithJobs] => 61
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 105
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-15T23:59:14-07:00
                                            [LastUpdatedTime] => 2025-07-16T03:35:43-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt testt
                                    [DisplayName] => testt testt
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098127805f7fa6e41dea97e908749fd2b9e
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratulbinhasan.integration@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-19T09:26:51.670-07:00
        )

)

[19-Jul-2025 16:26:51 UTC] Using QBO customer ID: 105
[19-Jul-2025 16:26:51 UTC] No Checkout Session found for Payment Intent: pi_3RmWlZCDiOqgoJOU0XAwjeU8
[19-Jul-2025 16:26:51 UTC] No line items found from checkout session, trying to get from invoice
[19-Jul-2025 16:26:52 UTC] Found invoice line items: 2
[19-Jul-2025 16:26:53 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 105
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 968
                    [Description] => this is test
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 29
                                )

                            [UnitPrice] => 44
                            [Qty] => 22
                        )

                )

            [1] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 484
                    [Description] => losttt
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 31
                                )

                            [UnitPrice] => 44
                            [Qty] => 11
                        )

                )

        )

    [TxnDate] => 2025-07-19
    [TotalAmt] => 1452
    [PrivateNote] => Stripe Payment Intent ID: pi_3RmWlZCDiOqgoJOU0XAwjeU8
    [PaymentRefNum] => ch_3RmWlZCDiOqgoJOU0R8BNp4l
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 0
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[19-Jul-2025 16:26:55 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 672
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-19T09:26:54-07:00
                            [LastUpdatedTime] => 2025-07-19T09:26:54-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1266
                    [TxnDate] => 2025-07-19
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3RmWlZCDiOqgoJOU0XAwjeU8
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => this is test
                                    [Amount] => 968
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 29
                                                    [name] => this is test
                                                )

                                            [UnitPrice] => 44
                                            [Qty] => 22
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-09020802-V1-00120000
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Id] => 2
                                    [LineNum] => 2
                                    [Description] => losttt
                                    [Amount] => 484
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 31
                                                    [name] => losttt
                                                )

                                            [UnitPrice] => 44
                                            [Qty] => 11
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-09020802-V1-00120000
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [2] => Array
                                (
                                    [Amount] => 1452
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 1452
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 1452
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 1452
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 1452
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 105
                            [name] => testt testt
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 185
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 1452
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3RmWlZCDiOqgoJOU0R8BNp4l
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-19T09:26:54.021-07:00
        )

)

[19-Jul-2025 16:26:55 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 672
[19-Jul-2025 16:26:55 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[19-Jul-2025 16:32:05 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RmcoQCDiOqgoJOU0Ne4cymJ)
[19-Jul-2025 16:32:05 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[19-Jul-2025 16:32:05 UTC] Starting sales receipt creation process for event: evt_3RmcoQCDiOqgoJOU0Ne4cymJ
[19-Jul-2025 16:32:06 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                )

            [time] => 2025-07-19T09:32:06.185-07:00
        )

)

[19-Jul-2025 16:32:07 UTC] Using QBO customer ID: 107
[19-Jul-2025 16:32:07 UTC] Found checkout session line items: 1
[19-Jul-2025 16:32:08 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 107
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 71.28
                    [Description] => llll
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 32
                                )

                            [UnitPrice] => 71.28
                            [Qty] => 1
                        )

                )

        )

    [TxnDate] => 2025-07-19
    [TotalAmt] => 71.28
    [PrivateNote] => Stripe Payment Intent ID: pi_3RmcoQCDiOqgoJOU0KPfdZwD
    [PaymentRefNum] => ch_3RmcoQCDiOqgoJOU0CLFgQCZ
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 0
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[19-Jul-2025 16:32:09 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 673
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-19T09:32:09-07:00
                            [LastUpdatedTime] => 2025-07-19T09:32:09-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1267
                    [TxnDate] => 2025-07-19
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3RmcoQCDiOqgoJOU0KPfdZwD
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => llll
                                    [Amount] => 71.28
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 32
                                                    [name] => llll
                                                )

                                            [UnitPrice] => 71.28
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-09020802-V1-00120000
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 71.28
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 71.28
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 71.28
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 71.28
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 71.28
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 107
                            [name] => dsd fsfsf(ratuddll@testtt.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 186
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 71.28
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3RmcoQCDiOqgoJOU0CLFgQCZ
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-19T09:32:09.111-07:00
        )

)

[19-Jul-2025 16:32:09 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 673
[19-Jul-2025 16:32:09 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[19-Jul-2025 17:47:26 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RmWlZCDiOqgoJOU0aeQRFuu)
[19-Jul-2025 17:47:26 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[19-Jul-2025 17:47:26 UTC] Starting sales receipt creation process for event: evt_3RmWlZCDiOqgoJOU0aeQRFuu
[19-Jul-2025 17:47:26 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[19-Jul-2025 17:47:26 UTC] Payment intent already processed. QBO Sales Receipt ID: 672
[19-Jul-2025 17:49:16 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RmWlZCDiOqgoJOU0aeQRFuu)
[19-Jul-2025 17:49:16 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[19-Jul-2025 17:49:16 UTC] Starting sales receipt creation process for event: evt_3RmWlZCDiOqgoJOU0aeQRFuu
[19-Jul-2025 17:49:16 UTC] No customer email in charge details, trying to get from invoice
[19-Jul-2025 17:49:16 UTC] Found customer details from invoice: ratulbinhasan.integration@gmail.com
[19-Jul-2025 17:49:17 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 61
                                    [BalanceWithJobs] => 61
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 105
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-15T23:59:14-07:00
                                            [LastUpdatedTime] => 2025-07-16T03:35:43-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt testt
                                    [DisplayName] => testt testt
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098127805f7fa6e41dea97e908749fd2b9e
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratulbinhasan.integration@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-19T10:49:17.379-07:00
        )

)

[19-Jul-2025 17:49:17 UTC] Using QBO customer ID: 105
[19-Jul-2025 17:49:17 UTC] No Checkout Session found for Payment Intent: pi_3RmWlZCDiOqgoJOU0XAwjeU8
[19-Jul-2025 17:49:18 UTC] Found invoice for payment intent: in_1RmWk6CDiOqgoJOUHpW9woLm
[19-Jul-2025 17:49:18 UTC] No line items found from checkout session, trying to get from invoice
[19-Jul-2025 17:49:18 UTC] Found invoice line items: 2
[19-Jul-2025 17:49:19 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 105
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 968
                    [Description] => this is test
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 29
                                )

                            [UnitPrice] => 44
                            [Qty] => 22
                        )

                )

            [1] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 484
                    [Description] => losttt
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 31
                                )

                            [UnitPrice] => 44
                            [Qty] => 11
                        )

                )

        )

    [TxnDate] => 2025-07-19
    [TotalAmt] => 1452
    [PrivateNote] => Stripe Payment Intent ID: pi_3RmWlZCDiOqgoJOU0XAwjeU8
    [PaymentRefNum] => ch_3RmWlZCDiOqgoJOU0R8BNp4l
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TotalTax] => 0
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[19-Jul-2025 17:49:21 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 674
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-19T10:49:21-07:00
                            [LastUpdatedTime] => 2025-07-19T10:49:21-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1268
                    [TxnDate] => 2025-07-19
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3RmWlZCDiOqgoJOU0XAwjeU8
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => this is test
                                    [Amount] => 968
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 29
                                                    [name] => this is test
                                                )

                                            [UnitPrice] => 44
                                            [Qty] => 22
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-09020802-V1-00120000
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Id] => 2
                                    [LineNum] => 2
                                    [Description] => losttt
                                    [Amount] => 484
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 31
                                                    [name] => losttt
                                                )

                                            [UnitPrice] => 44
                                            [Qty] => 11
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-09020802-V1-00120000
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [2] => Array
                                (
                                    [Amount] => 1452
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 1452
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 1452
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 1452
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 1452
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 105
                            [name] => testt testt
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 187
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 1452
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3RmWlZCDiOqgoJOU0R8BNp4l
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-19T10:49:20.281-07:00
        )

)

[19-Jul-2025 17:49:21 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 674
[19-Jul-2025 17:49:21 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[19-Jul-2025 17:50:27 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RmcoQCDiOqgoJOU0Ne4cymJ)
[19-Jul-2025 17:50:27 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[19-Jul-2025 17:50:27 UTC] Starting sales receipt creation process for event: evt_3RmcoQCDiOqgoJOU0Ne4cymJ
[19-Jul-2025 17:50:27 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 107
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-19T09:32:07-07:00
                                            [LastUpdatedTime] => 2025-07-19T09:32:07-07:00
                                        )

                                    [GivenName] => dsd fsfsf
                                    [FamilyName] => dsd fsfsf
                                    [FullyQualifiedName] => dsd fsfsf(ratuddll@testtt.com)
                                    [DisplayName] => dsd fsfsf(ratuddll@testtt.com)
                                    [PrintOnCheckName] => dsd fsfsf dsd fsfsf
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098fca0813f1de74d7a869cb3c3abb3348a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratuddll@testtt.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-19T10:50:27.877-07:00
        )

)

[19-Jul-2025 17:50:27 UTC] Using QBO customer ID: 107
[19-Jul-2025 17:50:28 UTC] Found checkout session line items: 1
[19-Jul-2025 17:50:29 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 107
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 71.28
                    [Description] => llll
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 32
                                )

                            [UnitPrice] => 71.28
                            [Qty] => 1
                        )

                )

        )

    [TxnDate] => 2025-07-19
    [TotalAmt] => 71.28
    [PrivateNote] => Stripe Payment Intent ID: pi_3RmcoQCDiOqgoJOU0KPfdZwD
    [PaymentRefNum] => ch_3RmcoQCDiOqgoJOU0CLFgQCZ
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TotalTax] => 0
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[19-Jul-2025 17:50:30 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 675
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-19T10:50:30-07:00
                            [LastUpdatedTime] => 2025-07-19T10:50:30-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1269
                    [TxnDate] => 2025-07-19
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3RmcoQCDiOqgoJOU0KPfdZwD
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => llll
                                    [Amount] => 71.28
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 32
                                                    [name] => llll
                                                )

                                            [UnitPrice] => 71.28
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-09020802-V1-00120000
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 71.28
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 71.28
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 71.28
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 71.28
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 71.28
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 107
                            [name] => dsd fsfsf(ratuddll@testtt.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 188
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 71.28
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3RmcoQCDiOqgoJOU0CLFgQCZ
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-19T10:50:29.601-07:00
        )

)

[19-Jul-2025 17:50:30 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 675
[19-Jul-2025 17:50:30 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[19-Jul-2025 18:13:23 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RmcoQCDiOqgoJOU0Ne4cymJ)
[19-Jul-2025 18:13:23 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[19-Jul-2025 18:13:23 UTC] Starting sales receipt creation process for event: evt_3RmcoQCDiOqgoJOU0Ne4cymJ
[19-Jul-2025 18:13:23 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[19-Jul-2025 18:13:23 UTC] Payment intent already processed. QBO Sales Receipt ID: 675
[19-Jul-2025 18:13:50 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RmcoQCDiOqgoJOU0Ne4cymJ)
[19-Jul-2025 18:13:50 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[19-Jul-2025 18:13:50 UTC] Starting sales receipt creation process for event: evt_3RmcoQCDiOqgoJOU0Ne4cymJ
[19-Jul-2025 18:13:51 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 107
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-19T09:32:07-07:00
                                            [LastUpdatedTime] => 2025-07-19T09:32:07-07:00
                                        )

                                    [GivenName] => dsd fsfsf
                                    [FamilyName] => dsd fsfsf
                                    [FullyQualifiedName] => dsd fsfsf(ratuddll@testtt.com)
                                    [DisplayName] => dsd fsfsf(ratuddll@testtt.com)
                                    [PrintOnCheckName] => dsd fsfsf dsd fsfsf
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098fca0813f1de74d7a869cb3c3abb3348a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratuddll@testtt.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-19T11:13:51.120-07:00
        )

)

[19-Jul-2025 18:13:51 UTC] Using QBO customer ID: 107
[19-Jul-2025 18:13:51 UTC] Found checkout session: Array
(
    [id] => cs_test_a12Gn6m9pQ4TbJJzbqAYffOOC3R2aZFuqTwa5kTOu6PUSg82bNxE8gBE7c
    [object] => checkout.session
    [adaptive_pricing] => Array
        (
            [enabled] => 1
        )

    [after_expiration] => 
    [allow_promotion_codes] => 
    [amount_subtotal] => 6600
    [amount_total] => 7128
    [automatic_tax] => Array
        (
            [enabled] => 1
            [liability] => Array
                (
                    [type] => self
                )

            [provider] => stripe
            [status] => complete
        )

    [billing_address_collection] => auto
    [cancel_url] => https://stripe.com
    [client_reference_id] => 
    [client_secret] => 
    [collected_information] => 
    [consent] => 
    [consent_collection] => Array
        (
            [payment_method_reuse_agreement] => 
            [promotions] => none
            [terms_of_service] => none
        )

    [created] => 1752935407
    [currency] => usd
    [currency_conversion] => 
    [custom_fields] => Array
        (
        )

    [custom_text] => Array
        (
            [after_submit] => 
            [shipping_address] => 
            [submit] => 
            [terms_of_service_acceptance] => 
        )

    [customer] => 
    [customer_creation] => if_required
    [customer_details] => Array
        (
            [address] => Array
                (
                    [city] => Alabama
                    [country] => US
                    [line1] => Alabama
                    [line2] => Alabama
                    [postal_code] => 35013
                    [state] => AL
                )

            [email] => ratuddll@testtt.com
            [name] => dsd fsfsf
            [phone] => 
            [tax_exempt] => none
            [tax_ids] => Array
                (
                )

        )

    [customer_email] => 
    [discounts] => Array
        (
        )

    [expires_at] => 1753021807
    [invoice] => 
    [invoice_creation] => Array
        (
            [enabled] => 
            [invoice_data] => Array
                (
                    [account_tax_ids] => 
                    [custom_fields] => 
                    [description] => 
                    [footer] => 
                    [issuer] => 
                    [metadata] => Array
                        (
                        )

                    [rendering_options] => 
                )

        )

    [livemode] => 
    [locale] => auto
    [metadata] => Array
        (
        )

    [mode] => payment
    [origin_context] => 
    [payment_intent] => pi_3RmcoQCDiOqgoJOU0KPfdZwD
    [payment_link] => plink_1RmbVPCDiOqgoJOUb982KmEe
    [payment_method_collection] => if_required
    [payment_method_configuration_details] => 
    [payment_method_options] => Array
        (
            [card] => Array
                (
                    [request_three_d_secure] => automatic
                )

        )

    [payment_method_types] => Array
        (
            [0] => card
            [1] => link
        )

    [payment_status] => paid
    [permissions] => 
    [phone_number_collection] => Array
        (
            [enabled] => 
        )

    [presentment_details] => Array
        (
            [presentment_amount] => 899783
            [presentment_currency] => bdt
        )

    [recovered_from] => 
    [saved_payment_method_options] => 
    [setup_intent] => 
    [shipping] => 
    [shipping_address_collection] => 
    [shipping_options] => Array
        (
        )

    [shipping_rate] => 
    [status] => complete
    [submit_type] => auto
    [subscription] => 
    [success_url] => https://stripe.com
    [total_details] => Array
        (
            [amount_discount] => 0
            [amount_shipping] => 0
            [amount_tax] => 528
        )

    [ui_mode] => hosted
    [url] => 
    [wallet_options] => 
)

[19-Jul-2025 18:13:51 UTC] Calculated tax percentage from checkout session: 8%
[19-Jul-2025 18:13:51 UTC] Sales receipt creation failed: Unknown column 'user_id' in 'WHERE'
[19-Jul-2025 18:13:51 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:398
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(50): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 398
[19-Jul-2025 18:45:29 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RmcoQCDiOqgoJOU0Ne4cymJ)
[19-Jul-2025 18:45:29 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[19-Jul-2025 18:45:29 UTC] Starting sales receipt creation process for event: evt_3RmcoQCDiOqgoJOU0Ne4cymJ
[19-Jul-2025 18:45:30 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 107
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-19T09:32:07-07:00
                                            [LastUpdatedTime] => 2025-07-19T09:32:07-07:00
                                        )

                                    [GivenName] => dsd fsfsf
                                    [FamilyName] => dsd fsfsf
                                    [FullyQualifiedName] => dsd fsfsf(ratuddll@testtt.com)
                                    [DisplayName] => dsd fsfsf(ratuddll@testtt.com)
                                    [PrintOnCheckName] => dsd fsfsf dsd fsfsf
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098fca0813f1de74d7a869cb3c3abb3348a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratuddll@testtt.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-19T11:45:30.592-07:00
        )

)

[19-Jul-2025 18:45:30 UTC] Using QBO customer ID: 107
[19-Jul-2025 18:45:31 UTC] Found checkout session: Array
(
    [id] => cs_test_a12Gn6m9pQ4TbJJzbqAYffOOC3R2aZFuqTwa5kTOu6PUSg82bNxE8gBE7c
    [object] => checkout.session
    [adaptive_pricing] => Array
        (
            [enabled] => 1
        )

    [after_expiration] => 
    [allow_promotion_codes] => 
    [amount_subtotal] => 6600
    [amount_total] => 7128
    [automatic_tax] => Array
        (
            [enabled] => 1
            [liability] => Array
                (
                    [type] => self
                )

            [provider] => stripe
            [status] => complete
        )

    [billing_address_collection] => auto
    [cancel_url] => https://stripe.com
    [client_reference_id] => 
    [client_secret] => 
    [collected_information] => 
    [consent] => 
    [consent_collection] => Array
        (
            [payment_method_reuse_agreement] => 
            [promotions] => none
            [terms_of_service] => none
        )

    [created] => 1752935407
    [currency] => usd
    [currency_conversion] => 
    [custom_fields] => Array
        (
        )

    [custom_text] => Array
        (
            [after_submit] => 
            [shipping_address] => 
            [submit] => 
            [terms_of_service_acceptance] => 
        )

    [customer] => 
    [customer_creation] => if_required
    [customer_details] => Array
        (
            [address] => Array
                (
                    [city] => Alabama
                    [country] => US
                    [line1] => Alabama
                    [line2] => Alabama
                    [postal_code] => 35013
                    [state] => AL
                )

            [email] => ratuddll@testtt.com
            [name] => dsd fsfsf
            [phone] => 
            [tax_exempt] => none
            [tax_ids] => Array
                (
                )

        )

    [customer_email] => 
    [discounts] => Array
        (
        )

    [expires_at] => 1753021807
    [invoice] => 
    [invoice_creation] => Array
        (
            [enabled] => 
            [invoice_data] => Array
                (
                    [account_tax_ids] => 
                    [custom_fields] => 
                    [description] => 
                    [footer] => 
                    [issuer] => 
                    [metadata] => Array
                        (
                        )

                    [rendering_options] => 
                )

        )

    [livemode] => 
    [locale] => auto
    [metadata] => Array
        (
        )

    [mode] => payment
    [origin_context] => 
    [payment_intent] => pi_3RmcoQCDiOqgoJOU0KPfdZwD
    [payment_link] => plink_1RmbVPCDiOqgoJOUb982KmEe
    [payment_method_collection] => if_required
    [payment_method_configuration_details] => 
    [payment_method_options] => Array
        (
            [card] => Array
                (
                    [request_three_d_secure] => automatic
                )

        )

    [payment_method_types] => Array
        (
            [0] => card
            [1] => link
        )

    [payment_status] => paid
    [permissions] => 
    [phone_number_collection] => Array
        (
            [enabled] => 
        )

    [presentment_details] => Array
        (
            [presentment_amount] => 899783
            [presentment_currency] => bdt
        )

    [recovered_from] => 
    [saved_payment_method_options] => 
    [setup_intent] => 
    [shipping] => 
    [shipping_address_collection] => 
    [shipping_options] => Array
        (
        )

    [shipping_rate] => 
    [status] => complete
    [submit_type] => auto
    [subscription] => 
    [success_url] => https://stripe.com
    [total_details] => Array
        (
            [amount_discount] => 0
            [amount_shipping] => 0
            [amount_tax] => 528
        )

    [ui_mode] => hosted
    [url] => 
    [wallet_options] => 
)

[19-Jul-2025 18:45:31 UTC] Calculated tax percentage from checkout session: 8%
[19-Jul-2025 18:45:31 UTC] Sales receipt creation failed: Unknown column 'user_id' in 'WHERE'
[19-Jul-2025 18:45:31 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:398
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(50): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 398
[19-Jul-2025 19:06:37 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RmcoQCDiOqgoJOU0Ne4cymJ)
[19-Jul-2025 19:06:37 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[19-Jul-2025 19:06:37 UTC] Starting sales receipt creation process for event: evt_3RmcoQCDiOqgoJOU0Ne4cymJ
[19-Jul-2025 19:06:38 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 107
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-19T09:32:07-07:00
                                            [LastUpdatedTime] => 2025-07-19T09:32:07-07:00
                                        )

                                    [GivenName] => dsd fsfsf
                                    [FamilyName] => dsd fsfsf
                                    [FullyQualifiedName] => dsd fsfsf(ratuddll@testtt.com)
                                    [DisplayName] => dsd fsfsf(ratuddll@testtt.com)
                                    [PrintOnCheckName] => dsd fsfsf dsd fsfsf
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098fca0813f1de74d7a869cb3c3abb3348a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratuddll@testtt.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-19T12:06:38.610-07:00
        )

)

[19-Jul-2025 19:06:38 UTC] Using QBO customer ID: 107
[19-Jul-2025 19:06:39 UTC] Found checkout session: Array
(
    [id] => cs_test_a12Gn6m9pQ4TbJJzbqAYffOOC3R2aZFuqTwa5kTOu6PUSg82bNxE8gBE7c
    [object] => checkout.session
    [adaptive_pricing] => Array
        (
            [enabled] => 1
        )

    [after_expiration] => 
    [allow_promotion_codes] => 
    [amount_subtotal] => 6600
    [amount_total] => 7128
    [automatic_tax] => Array
        (
            [enabled] => 1
            [liability] => Array
                (
                    [type] => self
                )

            [provider] => stripe
            [status] => complete
        )

    [billing_address_collection] => auto
    [cancel_url] => https://stripe.com
    [client_reference_id] => 
    [client_secret] => 
    [collected_information] => 
    [consent] => 
    [consent_collection] => Array
        (
            [payment_method_reuse_agreement] => 
            [promotions] => none
            [terms_of_service] => none
        )

    [created] => 1752935407
    [currency] => usd
    [currency_conversion] => 
    [custom_fields] => Array
        (
        )

    [custom_text] => Array
        (
            [after_submit] => 
            [shipping_address] => 
            [submit] => 
            [terms_of_service_acceptance] => 
        )

    [customer] => 
    [customer_creation] => if_required
    [customer_details] => Array
        (
            [address] => Array
                (
                    [city] => Alabama
                    [country] => US
                    [line1] => Alabama
                    [line2] => Alabama
                    [postal_code] => 35013
                    [state] => AL
                )

            [email] => ratuddll@testtt.com
            [name] => dsd fsfsf
            [phone] => 
            [tax_exempt] => none
            [tax_ids] => Array
                (
                )

        )

    [customer_email] => 
    [discounts] => Array
        (
        )

    [expires_at] => 1753021807
    [invoice] => 
    [invoice_creation] => Array
        (
            [enabled] => 
            [invoice_data] => Array
                (
                    [account_tax_ids] => 
                    [custom_fields] => 
                    [description] => 
                    [footer] => 
                    [issuer] => 
                    [metadata] => Array
                        (
                        )

                    [rendering_options] => 
                )

        )

    [livemode] => 
    [locale] => auto
    [metadata] => Array
        (
        )

    [mode] => payment
    [origin_context] => 
    [payment_intent] => pi_3RmcoQCDiOqgoJOU0KPfdZwD
    [payment_link] => plink_1RmbVPCDiOqgoJOUb982KmEe
    [payment_method_collection] => if_required
    [payment_method_configuration_details] => 
    [payment_method_options] => Array
        (
            [card] => Array
                (
                    [request_three_d_secure] => automatic
                )

        )

    [payment_method_types] => Array
        (
            [0] => card
            [1] => link
        )

    [payment_status] => paid
    [permissions] => 
    [phone_number_collection] => Array
        (
            [enabled] => 
        )

    [presentment_details] => Array
        (
            [presentment_amount] => 899783
            [presentment_currency] => bdt
        )

    [recovered_from] => 
    [saved_payment_method_options] => 
    [setup_intent] => 
    [shipping] => 
    [shipping_address_collection] => 
    [shipping_options] => Array
        (
        )

    [shipping_rate] => 
    [status] => complete
    [submit_type] => auto
    [subscription] => 
    [success_url] => https://stripe.com
    [total_details] => Array
        (
            [amount_discount] => 0
            [amount_shipping] => 0
            [amount_tax] => 528
        )

    [ui_mode] => hosted
    [url] => 
    [wallet_options] => 
)

[19-Jul-2025 19:06:39 UTC] Total tax from checkout session: 5.28
[19-Jul-2025 19:06:39 UTC] Calculated tax percentage: 8%
[19-Jul-2025 19:06:39 UTC] Sales receipt creation failed: Unknown column 'user_id' in 'WHERE'
[19-Jul-2025 19:06:39 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:402
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(50): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 402
[20-Jul-2025 04:56:32 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RmcoQCDiOqgoJOU0Ne4cymJ)
[20-Jul-2025 04:56:32 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[20-Jul-2025 04:56:32 UTC] Starting sales receipt creation process for event: evt_3RmcoQCDiOqgoJOU0Ne4cymJ
[20-Jul-2025 04:56:35 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 107
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-19T09:32:07-07:00
                                            [LastUpdatedTime] => 2025-07-19T09:32:07-07:00
                                        )

                                    [GivenName] => dsd fsfsf
                                    [FamilyName] => dsd fsfsf
                                    [FullyQualifiedName] => dsd fsfsf(ratuddll@testtt.com)
                                    [DisplayName] => dsd fsfsf(ratuddll@testtt.com)
                                    [PrintOnCheckName] => dsd fsfsf dsd fsfsf
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098fca0813f1de74d7a869cb3c3abb3348a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratuddll@testtt.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-19T21:56:35.062-07:00
        )

)

[20-Jul-2025 04:56:35 UTC] Using QBO customer ID: 107
[20-Jul-2025 04:56:35 UTC] Found checkout session line items: 1
[20-Jul-2025 04:56:36 UTC] Getting tax code for tax percentage: 0%
[20-Jul-2025 04:56:36 UTC] No invoice ID, calculating from checkout session
[20-Jul-2025 04:56:36 UTC] Using calculated tax percentage from session: 0%
[20-Jul-2025 04:56:36 UTC] Tax percentage is 0, no tax code needed
[20-Jul-2025 04:56:36 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 107
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 71.28
                    [Description] => llll
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 32
                                )

                            [UnitPrice] => 71.28
                            [Qty] => 1
                        )

                )

        )

    [TxnDate] => 2025-07-19
    [TotalAmt] => 71.28
    [PrivateNote] => Stripe Payment Intent ID: pi_3RmcoQCDiOqgoJOU0KPfdZwD
    [PaymentRefNum] => ch_3RmcoQCDiOqgoJOU0CLFgQCZ
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 0
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[20-Jul-2025 04:56:37 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 676
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-19T21:56:37-07:00
                            [LastUpdatedTime] => 2025-07-19T21:56:37-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1270
                    [TxnDate] => 2025-07-19
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3RmcoQCDiOqgoJOU0KPfdZwD
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => llll
                                    [Amount] => 71.28
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 32
                                                    [name] => llll
                                                )

                                            [UnitPrice] => 71.28
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-09020802-V1-00120000
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 71.28
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 71.28
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 71.28
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 71.28
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 71.28
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 107
                            [name] => dsd fsfsf(ratuddll@testtt.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 189
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 71.28
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3RmcoQCDiOqgoJOU0CLFgQCZ
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-19T21:56:37.010-07:00
        )

)

[20-Jul-2025 04:56:37 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 676
[20-Jul-2025 04:56:37 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[20-Jul-2025 05:18:11 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RmcoQCDiOqgoJOU0Ne4cymJ)
[20-Jul-2025 05:18:11 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[20-Jul-2025 05:18:11 UTC] Starting sales receipt creation process for event: evt_3RmcoQCDiOqgoJOU0Ne4cymJ
[20-Jul-2025 05:18:11 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[20-Jul-2025 05:18:11 UTC] Payment intent already processed. QBO Sales Receipt ID: 676
[20-Jul-2025 05:18:48 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RmcoQCDiOqgoJOU0Ne4cymJ)
[20-Jul-2025 05:18:48 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[20-Jul-2025 05:18:48 UTC] Starting sales receipt creation process for event: evt_3RmcoQCDiOqgoJOU0Ne4cymJ
[20-Jul-2025 05:18:49 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 107
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-19T09:32:07-07:00
                                            [LastUpdatedTime] => 2025-07-19T09:32:07-07:00
                                        )

                                    [GivenName] => dsd fsfsf
                                    [FamilyName] => dsd fsfsf
                                    [FullyQualifiedName] => dsd fsfsf(ratuddll@testtt.com)
                                    [DisplayName] => dsd fsfsf(ratuddll@testtt.com)
                                    [PrintOnCheckName] => dsd fsfsf dsd fsfsf
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098fca0813f1de74d7a869cb3c3abb3348a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratuddll@testtt.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-19T22:18:49.249-07:00
        )

)

[20-Jul-2025 05:18:49 UTC] Using QBO customer ID: 107
[20-Jul-2025 05:18:49 UTC] Found checkout session: cs_test_a12Gn6m9pQ4TbJJzbqAYffOOC3R2aZFuqTwa5kTOu6PUSg82bNxE8gBE7c
[20-Jul-2025 05:18:49 UTC] Session tax amount: $5.28
[20-Jul-2025 05:18:49 UTC] Session subtotal: $66
[20-Jul-2025 05:18:49 UTC] Calculated tax percentage from session: 8%
[20-Jul-2025 05:18:49 UTC] Found checkout session line items: 1
[20-Jul-2025 05:18:49 UTC] Line item: llll, Subtotal: 66, Tax: 5.28, Total: 71.28
[20-Jul-2025 05:18:50 UTC] Getting tax code for tax percentage: 8%
[20-Jul-2025 05:18:50 UTC] Recalculated tax percentage from checkout session: 8%
[20-Jul-2025 05:18:50 UTC] Found exact tax code match: 2 for percentage: 8%
[20-Jul-2025 05:18:50 UTC] Total line items amount: 66, Total tax: 5.28
[20-Jul-2025 05:18:50 UTC] Getting tax code for tax percentage: 8%
[20-Jul-2025 05:18:50 UTC] Recalculated tax percentage from checkout session: 8%
[20-Jul-2025 05:18:50 UTC] Found exact tax code match: 2 for percentage: 8%
[20-Jul-2025 05:18:50 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 107
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 66
                    [Description] => llll
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 32
                                )

                            [UnitPrice] => 66
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => 2
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-19
    [TotalAmt] => 71.28
    [PrivateNote] => Stripe Payment Intent ID: pi_3RmcoQCDiOqgoJOU0KPfdZwD
    [PaymentRefNum] => ch_3RmcoQCDiOqgoJOU0CLFgQCZ
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => 2
                )

            [TotalTax] => 5.28
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[20-Jul-2025 05:18:51 UTC] QBO API response: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Invalid Line TaxCode in the request
                                    [Detail] => Valid line TaxCodes for US should be TAX or NON. Supplied value: 2
                                    [code] => 6100
                                    [element] => Line.SalesItemLineDetail.TaxCodeRef
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-19T22:18:51.148-07:00
        )

)

[20-Jul-2025 05:18:51 UTC] Sales receipt creation failed: Failed to create sales receipt in QuickBooks
[20-Jul-2025 05:18:51 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[20-Jul-2025 06:08:12 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RmcoQCDiOqgoJOU0Ne4cymJ)
[20-Jul-2025 06:08:12 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[20-Jul-2025 06:08:12 UTC] Starting sales receipt creation process for event: evt_3RmcoQCDiOqgoJOU0Ne4cymJ
[20-Jul-2025 06:08:13 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1752991693033
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[20-Jul-2025 06:08:13 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1752991693205
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[20-Jul-2025 06:08:13 UTC] Sales receipt creation failed: Failed to find or create customer in QuickBooks
[20-Jul-2025 06:08:13 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:351
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(50): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 351
[20-Jul-2025 06:09:57 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RmcoQCDiOqgoJOU0Ne4cymJ)
[20-Jul-2025 06:09:57 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[20-Jul-2025 06:09:57 UTC] Starting sales receipt creation process for event: evt_3RmcoQCDiOqgoJOU0Ne4cymJ
[20-Jul-2025 06:09:58 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 107
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-19T09:32:07-07:00
                                            [LastUpdatedTime] => 2025-07-19T09:32:07-07:00
                                        )

                                    [GivenName] => dsd fsfsf
                                    [FamilyName] => dsd fsfsf
                                    [FullyQualifiedName] => dsd fsfsf(ratuddll@testtt.com)
                                    [DisplayName] => dsd fsfsf(ratuddll@testtt.com)
                                    [PrintOnCheckName] => dsd fsfsf dsd fsfsf
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098fca0813f1de74d7a869cb3c3abb3348a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratuddll@testtt.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-19T23:09:58.295-07:00
        )

)

[20-Jul-2025 06:09:58 UTC] Using QBO customer ID: 107
[20-Jul-2025 06:09:58 UTC] Found checkout session: cs_test_a12Gn6m9pQ4TbJJzbqAYffOOC3R2aZFuqTwa5kTOu6PUSg82bNxE8gBE7c
[20-Jul-2025 06:09:58 UTC] Session tax amount: $5.28
[20-Jul-2025 06:09:58 UTC] Session subtotal: $66
[20-Jul-2025 06:09:58 UTC] Calculated tax percentage from session: 8%
[20-Jul-2025 06:09:59 UTC] Found checkout session line items: 1
[20-Jul-2025 06:09:59 UTC] Line item: llll, Subtotal: 66, Tax: 5.28, Total: 71.28
[20-Jul-2025 06:09:59 UTC] Total line items amount: 66, Total tax: 5.28
[20-Jul-2025 06:10:00 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 107
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 66
                    [Description] => llll
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 32
                                )

                            [UnitPrice] => 66
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-19
    [TotalAmt] => 71.28
    [PrivateNote] => Stripe Payment Intent ID: pi_3RmcoQCDiOqgoJOU0KPfdZwD
    [PaymentRefNum] => ch_3RmcoQCDiOqgoJOU0CLFgQCZ
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 5.28
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[20-Jul-2025 06:10:01 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 677
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-19T23:10:01-07:00
                            [LastUpdatedTime] => 2025-07-19T23:10:01-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1271
                    [TxnDate] => 2025-07-19
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3RmcoQCDiOqgoJOU0KPfdZwD
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => llll
                                    [Amount] => 66
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 32
                                                    [name] => llll
                                                )

                                            [UnitPrice] => 66
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-09020802-V1-00120000
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 66
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 5.28
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0.42
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 66
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 3.47
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 66
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0.83
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 66
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0.56
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 66
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 107
                            [name] => dsd fsfsf(ratuddll@testtt.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 190
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 71.28
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3RmcoQCDiOqgoJOU0CLFgQCZ
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-19T23:10:00.010-07:00
        )

)

[20-Jul-2025 06:10:01 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 677
[20-Jul-2025 06:10:01 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[20-Jul-2025 06:17:17 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RmWlZCDiOqgoJOU0aeQRFuu)
[20-Jul-2025 06:17:17 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[20-Jul-2025 06:17:17 UTC] Starting sales receipt creation process for event: evt_3RmWlZCDiOqgoJOU0aeQRFuu
[20-Jul-2025 06:17:17 UTC] No customer email in charge details, trying to get from invoice
[20-Jul-2025 06:17:17 UTC] Found customer details from invoice: ratulbinhasan.integration@gmail.com
[20-Jul-2025 06:17:18 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 61
                                    [BalanceWithJobs] => 61
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 105
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-15T23:59:14-07:00
                                            [LastUpdatedTime] => 2025-07-16T03:35:43-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt testt
                                    [DisplayName] => testt testt
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098127805f7fa6e41dea97e908749fd2b9e
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratulbinhasan.integration@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-19T23:17:18.320-07:00
        )

)

[20-Jul-2025 06:17:18 UTC] Using QBO customer ID: 105
[20-Jul-2025 06:17:18 UTC] No Checkout Session found for Payment Intent: pi_3RmWlZCDiOqgoJOU0XAwjeU8
[20-Jul-2025 06:17:18 UTC] No line items found from checkout session, trying to get from invoice
[20-Jul-2025 06:17:18 UTC] Found invoice line items: 2
[20-Jul-2025 06:17:20 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 105
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 968
                    [Description] => this is test
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 29
                                )

                            [UnitPrice] => 44
                            [Qty] => 22
                            [TaxCodeRef] => Array
                                (
                                    [value] => NON
                                )

                        )

                )

            [1] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 484
                    [Description] => losttt
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 31
                                )

                            [UnitPrice] => 44
                            [Qty] => 11
                            [TaxCodeRef] => Array
                                (
                                    [value] => NON
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-19
    [TotalAmt] => 1452
    [PrivateNote] => Stripe Payment Intent ID: pi_3RmWlZCDiOqgoJOU0XAwjeU8
    [PaymentRefNum] => ch_3RmWlZCDiOqgoJOU0R8BNp4l
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => NON
                )

            [TotalTax] => 0
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[20-Jul-2025 06:17:21 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 678
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-19T23:17:21-07:00
                            [LastUpdatedTime] => 2025-07-19T23:17:21-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1272
                    [TxnDate] => 2025-07-19
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3RmWlZCDiOqgoJOU0XAwjeU8
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => this is test
                                    [Amount] => 968
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 29
                                                    [name] => this is test
                                                )

                                            [UnitPrice] => 44
                                            [Qty] => 22
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => NON
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Id] => 2
                                    [LineNum] => 2
                                    [Description] => losttt
                                    [Amount] => 484
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 31
                                                    [name] => losttt
                                                )

                                            [UnitPrice] => 44
                                            [Qty] => 11
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => NON
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [2] => Array
                                (
                                    [Amount] => 1452
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 105
                            [name] => testt testt
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 191
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 1452
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3RmWlZCDiOqgoJOU0R8BNp4l
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-19T23:17:20.706-07:00
        )

)

[20-Jul-2025 06:17:21 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 678
[20-Jul-2025 06:17:21 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[20-Jul-2025 08:48:38 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RmWlZCDiOqgoJOU0aeQRFuu)
[20-Jul-2025 08:48:38 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[20-Jul-2025 08:48:38 UTC] Starting sales receipt creation process for event: evt_3RmWlZCDiOqgoJOU0aeQRFuu
[20-Jul-2025 08:48:38 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[20-Jul-2025 08:48:38 UTC] Payment intent already processed. QBO Sales Receipt ID: 678
[20-Jul-2025 08:49:51 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RmWlZCDiOqgoJOU0aeQRFuu)
[20-Jul-2025 08:49:51 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[20-Jul-2025 08:49:51 UTC] Starting sales receipt creation process for event: evt_3RmWlZCDiOqgoJOU0aeQRFuu
[20-Jul-2025 08:49:51 UTC] No customer email in charge details, trying to get from invoice
[20-Jul-2025 08:49:51 UTC] Found customer details from invoice: ratulbinhasan.integration@gmail.com
[20-Jul-2025 08:49:52 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                )

            [time] => 2025-07-20T01:49:52.133-07:00
        )

)

[20-Jul-2025 08:49:52 UTC] Using QBO customer ID: 72
[20-Jul-2025 08:49:52 UTC] No Checkout Session found for Payment Intent: pi_3RmWlZCDiOqgoJOU0XAwjeU8
[20-Jul-2025 08:49:52 UTC] No line items found from checkout session, trying to get from invoice
[20-Jul-2025 08:49:53 UTC] Found invoice line items: 2
[20-Jul-2025 08:49:53 UTC] Sales receipt creation failed: Unknown column 'user_id' in 'WHERE'
[20-Jul-2025 08:49:53 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:398
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(50): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 398
[20-Jul-2025 09:17:37 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RmWlZCDiOqgoJOU0aeQRFuu)
[20-Jul-2025 09:17:37 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[20-Jul-2025 09:17:37 UTC] Starting sales receipt creation process for event: evt_3RmWlZCDiOqgoJOU0aeQRFuu
[20-Jul-2025 09:17:37 UTC] No customer email in charge details, trying to get from invoice
[20-Jul-2025 09:17:38 UTC] Found customer details from invoice: ratulbinhasan.integration@gmail.com
[20-Jul-2025 09:17:38 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 72
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-20T01:49:53-07:00
                                            [LastUpdatedTime] => 2025-07-20T01:49:53-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt(ratulbinhasan.integration@gmail.com)
                                    [DisplayName] => testt(ratulbinhasan.integration@gmail.com)
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 00209983ece7696ea041089f54f9433e7aaf36
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratulbinhasan.integration@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-20T02:17:38.839-07:00
        )

)

[20-Jul-2025 09:17:38 UTC] Using QBO customer ID: 72
[20-Jul-2025 09:17:39 UTC] No Checkout Session found for Payment Intent: pi_3RmWlZCDiOqgoJOU0XAwjeU8
[20-Jul-2025 09:17:39 UTC] No line items found from checkout session, trying to get from invoice
[20-Jul-2025 09:17:39 UTC] Found invoice line items: 2
[20-Jul-2025 09:17:40 UTC] Sales receipt creation failed: Table 'wdsklsxvqb_stripe_qbo_integration.tax_settings' doesn't exist
[20-Jul-2025 09:17:40 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:468
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(50): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 468
[20-Jul-2025 09:32:41 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RmWlZCDiOqgoJOU0aeQRFuu)
[20-Jul-2025 09:32:41 UTC] PHP Fatal error:  Cannot redeclare get_default_non_taxable_code() (previously declared in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:32) in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 80
[20-Jul-2025 09:36:00 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RmWlZCDiOqgoJOU0aeQRFuu)
[20-Jul-2025 09:36:00 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[20-Jul-2025 09:36:00 UTC] Starting sales receipt creation process for event: evt_3RmWlZCDiOqgoJOU0aeQRFuu
[20-Jul-2025 09:36:00 UTC] No customer email in charge details, trying to get from invoice
[20-Jul-2025 09:36:00 UTC] Found customer details from invoice: ratulbinhasan.integration@gmail.com
[20-Jul-2025 09:36:01 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 72
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-20T01:49:53-07:00
                                            [LastUpdatedTime] => 2025-07-20T01:49:53-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt(ratulbinhasan.integration@gmail.com)
                                    [DisplayName] => testt(ratulbinhasan.integration@gmail.com)
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 00209983ece7696ea041089f54f9433e7aaf36
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratulbinhasan.integration@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-20T02:36:01.188-07:00
        )

)

[20-Jul-2025 09:36:01 UTC] Using QBO customer ID: 72
[20-Jul-2025 09:36:01 UTC] No Checkout Session found for Payment Intent: pi_3RmWlZCDiOqgoJOU0XAwjeU8
[20-Jul-2025 09:36:01 UTC] No line items found from checkout session, trying to get from invoice
[20-Jul-2025 09:36:01 UTC] Found invoice line items: 2
[20-Jul-2025 09:36:02 UTC] Sales receipt creation failed: Unknown column 'tax_ref_code' in 'SELECT'
[20-Jul-2025 09:36:02 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:456
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(50): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 456
[20-Jul-2025 09:38:09 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RmWlZCDiOqgoJOU0aeQRFuu)
[20-Jul-2025 09:38:09 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[20-Jul-2025 09:38:09 UTC] Starting sales receipt creation process for event: evt_3RmWlZCDiOqgoJOU0aeQRFuu
[20-Jul-2025 09:38:09 UTC] No customer email in charge details, trying to get from invoice
[20-Jul-2025 09:38:10 UTC] Found customer details from invoice: ratulbinhasan.integration@gmail.com
[20-Jul-2025 09:38:10 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 72
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-20T01:49:53-07:00
                                            [LastUpdatedTime] => 2025-07-20T01:49:53-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt(ratulbinhasan.integration@gmail.com)
                                    [DisplayName] => testt(ratulbinhasan.integration@gmail.com)
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 00209983ece7696ea041089f54f9433e7aaf36
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratulbinhasan.integration@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-20T02:38:10.774-07:00
        )

)

[20-Jul-2025 09:38:10 UTC] Using QBO customer ID: 72
[20-Jul-2025 09:38:11 UTC] No Checkout Session found for Payment Intent: pi_3RmWlZCDiOqgoJOU0XAwjeU8
[20-Jul-2025 09:38:11 UTC] No line items found from checkout session, trying to get from invoice
[20-Jul-2025 09:38:11 UTC] Found invoice line items: 2
[20-Jul-2025 09:38:11 UTC] Sales receipt creation failed: Unknown column 'user_id' in 'WHERE'
[20-Jul-2025 09:38:11 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:456
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(50): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 456
[20-Jul-2025 09:43:35 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RmWlZCDiOqgoJOU0aeQRFuu)
[20-Jul-2025 09:43:35 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[20-Jul-2025 09:43:35 UTC] Starting sales receipt creation process for event: evt_3RmWlZCDiOqgoJOU0aeQRFuu
[20-Jul-2025 09:43:35 UTC] No customer email in charge details, trying to get from invoice
[20-Jul-2025 09:43:36 UTC] Found customer details from invoice: ratulbinhasan.integration@gmail.com
[20-Jul-2025 09:43:36 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 72
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-20T01:49:53-07:00
                                            [LastUpdatedTime] => 2025-07-20T01:49:53-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt(ratulbinhasan.integration@gmail.com)
                                    [DisplayName] => testt(ratulbinhasan.integration@gmail.com)
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 00209983ece7696ea041089f54f9433e7aaf36
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratulbinhasan.integration@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-20T02:43:36.815-07:00
        )

)

[20-Jul-2025 09:43:36 UTC] Using QBO customer ID: 72
[20-Jul-2025 09:43:37 UTC] No Checkout Session found for Payment Intent: pi_3RmWlZCDiOqgoJOU0XAwjeU8
[20-Jul-2025 09:43:37 UTC] No line items found from checkout session, trying to get from invoice
[20-Jul-2025 09:43:37 UTC] Found invoice line items: 2
[20-Jul-2025 09:43:37 UTC] Sales receipt creation failed: Unknown column 'tax_rate' in 'WHERE'
[20-Jul-2025 09:43:37 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:455
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(50): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 455
[20-Jul-2025 09:45:16 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RmWlZCDiOqgoJOU0aeQRFuu)
[20-Jul-2025 09:45:16 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[20-Jul-2025 09:45:16 UTC] Starting sales receipt creation process for event: evt_3RmWlZCDiOqgoJOU0aeQRFuu
[20-Jul-2025 09:45:16 UTC] No customer email in charge details, trying to get from invoice
[20-Jul-2025 09:45:17 UTC] Found customer details from invoice: ratulbinhasan.integration@gmail.com
[20-Jul-2025 09:45:17 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 72
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-20T01:49:53-07:00
                                            [LastUpdatedTime] => 2025-07-20T01:49:53-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt(ratulbinhasan.integration@gmail.com)
                                    [DisplayName] => testt(ratulbinhasan.integration@gmail.com)
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 00209983ece7696ea041089f54f9433e7aaf36
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratulbinhasan.integration@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-20T02:45:17.381-07:00
        )

)

[20-Jul-2025 09:45:17 UTC] Using QBO customer ID: 72
[20-Jul-2025 09:45:17 UTC] No Checkout Session found for Payment Intent: pi_3RmWlZCDiOqgoJOU0XAwjeU8
[20-Jul-2025 09:45:17 UTC] No line items found from checkout session, trying to get from invoice
[20-Jul-2025 09:45:18 UTC] Found invoice line items: 2
[20-Jul-2025 09:45:20 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 72
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 968
                    [Description] => this is test
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 28
                                )

                            [UnitPrice] => 44
                            [Qty] => 22
                            [TaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                        )

                )

            [1] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 484
                    [Description] => losttt
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 29
                                )

                            [UnitPrice] => 44
                            [Qty] => 11
                            [TaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-19
    [TotalAmt] => 1452
    [PrivateNote] => Stripe Payment Intent ID: pi_3RmWlZCDiOqgoJOU0XAwjeU8
    [PaymentRefNum] => ch_3RmWlZCDiOqgoJOU0R8BNp4l
    [PaymentMethodRef] => Array
        (
            [value] => 3
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [DepositToAccountRef] => Array
        (
            [value] => 108
        )

)

[20-Jul-2025 09:45:20 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 215
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-20T02:45:21-07:00
                            [LastUpdatedTime] => 2025-07-20T02:45:21-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-07-19
                    [CurrencyRef] => Array
                        (
                            [value] => AUD
                            [name] => Australian Dollar
                        )

                    [ExchangeRate] => 1
                    [PrivateNote] => Stripe Payment Intent ID: pi_3RmWlZCDiOqgoJOU0XAwjeU8
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => this is test
                                    [Amount] => 968
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 28
                                                    [name] => this is test
                                                )

                                            [UnitPrice] => 44
                                            [Qty] => 22
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 81
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => 5
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Id] => 2
                                    [LineNum] => 2
                                    [Description] => losttt
                                    [Amount] => 484
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 29
                                                    [name] => losttt
                                                )

                                            [UnitPrice] => 44
                                            [Qty] => 11
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 81
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => 5
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [2] => Array
                                (
                                    [Amount] => 1452
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 4
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0
                                                    [NetAmountTaxable] => 1452
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 72
                            [name] => testt(ratulbinhasan.integration@gmail.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 75
                            [Line1] => 2500 Garcia Ave
                            [Line2] => Sydney NSW  2050
                        )

                    [GlobalTaxCalculation] => TaxExcluded
                    [TotalAmt] => 1452
                    [HomeTotalAmt] => 1452
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [HomeBalance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 3
                            [name] => Credit Card
                        )

                    [PaymentRefNum] => ch_3RmWlZCDiOqgoJOU0R8BNp4l
                    [DepositToAccountRef] => Array
                        (
                            [value] => 108
                            [name] => Undeposited Funds
                        )

                )

            [time] => 2025-07-20T02:45:20.454-07:00
        )

)

[20-Jul-2025 09:45:20 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 215
[20-Jul-2025 09:45:20 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[20-Jul-2025 09:47:26 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RmWlZCDiOqgoJOU0aeQRFuu)
[20-Jul-2025 09:47:26 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[20-Jul-2025 09:47:26 UTC] Starting sales receipt creation process for event: evt_3RmWlZCDiOqgoJOU0aeQRFuu
[20-Jul-2025 09:47:26 UTC] No customer email in charge details, trying to get from invoice
[20-Jul-2025 09:47:27 UTC] Found customer details from invoice: ratulbinhasan.integration@gmail.com
[20-Jul-2025 09:47:27 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 72
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-20T01:49:53-07:00
                                            [LastUpdatedTime] => 2025-07-20T01:49:53-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt(ratulbinhasan.integration@gmail.com)
                                    [DisplayName] => testt(ratulbinhasan.integration@gmail.com)
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 00209983ece7696ea041089f54f9433e7aaf36
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratulbinhasan.integration@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-20T02:47:27.496-07:00
        )

)

[20-Jul-2025 09:47:27 UTC] Using QBO customer ID: 72
[20-Jul-2025 09:47:27 UTC] No Checkout Session found for Payment Intent: pi_3RmWlZCDiOqgoJOU0XAwjeU8
[20-Jul-2025 09:47:27 UTC] No line items found from checkout session, trying to get from invoice
[20-Jul-2025 09:47:28 UTC] Found invoice line items: 2
[20-Jul-2025 09:47:29 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 72
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 968
                    [Description] => this is test
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 28
                                )

                            [UnitPrice] => 44
                            [Qty] => 22
                            [TaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                        )

                )

            [1] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 484
                    [Description] => losttt
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 29
                                )

                            [UnitPrice] => 44
                            [Qty] => 11
                            [TaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-19
    [TotalAmt] => 1452
    [PrivateNote] => Stripe Payment Intent ID: pi_3RmWlZCDiOqgoJOU0XAwjeU8
    [PaymentRefNum] => ch_3RmWlZCDiOqgoJOU0R8BNp4l
    [PaymentMethodRef] => Array
        (
            [value] => 3
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [DepositToAccountRef] => Array
        (
            [value] => 108
        )

)

[20-Jul-2025 09:47:30 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 216
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-20T02:47:30-07:00
                            [LastUpdatedTime] => 2025-07-20T02:47:30-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-07-19
                    [CurrencyRef] => Array
                        (
                            [value] => AUD
                            [name] => Australian Dollar
                        )

                    [ExchangeRate] => 1
                    [PrivateNote] => Stripe Payment Intent ID: pi_3RmWlZCDiOqgoJOU0XAwjeU8
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => this is test
                                    [Amount] => 968
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 28
                                                    [name] => this is test
                                                )

                                            [UnitPrice] => 44
                                            [Qty] => 22
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 81
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => 5
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Id] => 2
                                    [LineNum] => 2
                                    [Description] => losttt
                                    [Amount] => 484
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 29
                                                    [name] => losttt
                                                )

                                            [UnitPrice] => 44
                                            [Qty] => 11
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 81
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => 5
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [2] => Array
                                (
                                    [Amount] => 1452
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 4
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0
                                                    [NetAmountTaxable] => 1452
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 72
                            [name] => testt(ratulbinhasan.integration@gmail.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 76
                            [Line1] => 2500 Garcia Ave
                            [Line2] => Sydney NSW  2050
                        )

                    [GlobalTaxCalculation] => TaxExcluded
                    [TotalAmt] => 1452
                    [HomeTotalAmt] => 1452
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [HomeBalance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 3
                            [name] => Credit Card
                        )

                    [PaymentRefNum] => ch_3RmWlZCDiOqgoJOU0R8BNp4l
                    [DepositToAccountRef] => Array
                        (
                            [value] => 108
                            [name] => Undeposited Funds
                        )

                )

            [time] => 2025-07-20T02:47:29.603-07:00
        )

)

[20-Jul-2025 09:47:30 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 216
[20-Jul-2025 09:47:30 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[20-Jul-2025 09:59:51 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RmWlZCDiOqgoJOU0aeQRFuu)
[20-Jul-2025 09:59:51 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[20-Jul-2025 09:59:51 UTC] Starting sales receipt creation process for event: evt_3RmWlZCDiOqgoJOU0aeQRFuu
[20-Jul-2025 09:59:51 UTC] No customer email in charge details, trying to get from invoice
[20-Jul-2025 09:59:51 UTC] Found customer details from invoice: ratulbinhasan.integration@gmail.com
[20-Jul-2025 09:59:52 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 72
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-20T01:49:53-07:00
                                            [LastUpdatedTime] => 2025-07-20T01:49:53-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt(ratulbinhasan.integration@gmail.com)
                                    [DisplayName] => testt(ratulbinhasan.integration@gmail.com)
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 00209983ece7696ea041089f54f9433e7aaf36
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratulbinhasan.integration@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-20T02:59:52.330-07:00
        )

)

[20-Jul-2025 09:59:52 UTC] Using QBO customer ID: 72
[20-Jul-2025 09:59:52 UTC] No Checkout Session found for Payment Intent: pi_3RmWlZCDiOqgoJOU0XAwjeU8
[20-Jul-2025 09:59:52 UTC] No line items found from checkout session, trying to get from invoice
[20-Jul-2025 09:59:53 UTC] Found invoice line items: 2
[20-Jul-2025 09:59:53 UTC] Using tax exempt ID from sync settings: 8
[20-Jul-2025 09:59:53 UTC] Using tax exempt ID from sync settings: 8
[20-Jul-2025 09:59:54 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 72
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 968
                    [Description] => this is test
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 28
                                )

                            [UnitPrice] => 44
                            [Qty] => 22
                            [TaxCodeRef] => Array
                                (
                                    [value] => 8
                                )

                        )

                )

            [1] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 484
                    [Description] => losttt
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 29
                                )

                            [UnitPrice] => 44
                            [Qty] => 11
                            [TaxCodeRef] => Array
                                (
                                    [value] => 8
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-19
    [TotalAmt] => 1452
    [PrivateNote] => Stripe Payment Intent ID: pi_3RmWlZCDiOqgoJOU0XAwjeU8
    [PaymentRefNum] => ch_3RmWlZCDiOqgoJOU0R8BNp4l
    [PaymentMethodRef] => Array
        (
            [value] => 3
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [DepositToAccountRef] => Array
        (
            [value] => 108
        )

)

[20-Jul-2025 09:59:55 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 217
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-20T02:59:55-07:00
                            [LastUpdatedTime] => 2025-07-20T02:59:55-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-07-19
                    [CurrencyRef] => Array
                        (
                            [value] => AUD
                            [name] => Australian Dollar
                        )

                    [ExchangeRate] => 1
                    [PrivateNote] => Stripe Payment Intent ID: pi_3RmWlZCDiOqgoJOU0XAwjeU8
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => this is test
                                    [Amount] => 968
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 28
                                                    [name] => this is test
                                                )

                                            [UnitPrice] => 44
                                            [Qty] => 22
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 81
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => 8
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Id] => 2
                                    [LineNum] => 2
                                    [Description] => losttt
                                    [Amount] => 484
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 29
                                                    [name] => losttt
                                                )

                                            [UnitPrice] => 44
                                            [Qty] => 11
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 81
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => 8
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [2] => Array
                                (
                                    [Amount] => 1452
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0
                                                    [NetAmountTaxable] => 1452
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 72
                            [name] => testt(ratulbinhasan.integration@gmail.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 77
                            [Line1] => 2500 Garcia Ave
                            [Line2] => Sydney NSW  2050
                        )

                    [GlobalTaxCalculation] => TaxExcluded
                    [TotalAmt] => 1452
                    [HomeTotalAmt] => 1452
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [HomeBalance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 3
                            [name] => Credit Card
                        )

                    [PaymentRefNum] => ch_3RmWlZCDiOqgoJOU0R8BNp4l
                    [DepositToAccountRef] => Array
                        (
                            [value] => 108
                            [name] => Undeposited Funds
                        )

                )

            [time] => 2025-07-20T02:59:54.686-07:00
        )

)

[20-Jul-2025 09:59:55 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 217
[20-Jul-2025 09:59:55 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[20-Jul-2025 10:00:37 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RmcoQCDiOqgoJOU0Ne4cymJ)
[20-Jul-2025 10:00:37 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[20-Jul-2025 10:00:37 UTC] Starting sales receipt creation process for event: evt_3RmcoQCDiOqgoJOU0Ne4cymJ
[20-Jul-2025 10:00:37 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                )

            [time] => 2025-07-20T03:00:37.808-07:00
        )

)

[20-Jul-2025 10:00:38 UTC] Using QBO customer ID: 73
[20-Jul-2025 10:00:38 UTC] Found checkout session: cs_test_a12Gn6m9pQ4TbJJzbqAYffOOC3R2aZFuqTwa5kTOu6PUSg82bNxE8gBE7c
[20-Jul-2025 10:00:38 UTC] Session tax amount: $5.28
[20-Jul-2025 10:00:38 UTC] Session subtotal: $66
[20-Jul-2025 10:00:38 UTC] Calculated tax percentage from session: 8%
[20-Jul-2025 10:00:38 UTC] Found checkout session line items: 1
[20-Jul-2025 10:00:38 UTC] Line item: llll, Subtotal: 66, Tax: 5.28, Total: 71.28
[20-Jul-2025 10:00:39 UTC] No tax code found for 8%, using default non-taxable
[20-Jul-2025 10:00:39 UTC] Using tax exempt ID from sync settings: 8
[20-Jul-2025 10:00:39 UTC] Total line items amount: 66, Total tax: 5.28
[20-Jul-2025 10:00:40 UTC] No tax code found for 8%, using default non-taxable
[20-Jul-2025 10:00:40 UTC] Using tax exempt ID from sync settings: 8
[20-Jul-2025 10:00:40 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 73
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 66
                    [Description] => llll
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 30
                                )

                            [UnitPrice] => 66
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => 8
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-19
    [TotalAmt] => 71.28
    [PrivateNote] => Stripe Payment Intent ID: pi_3RmcoQCDiOqgoJOU0KPfdZwD
    [PaymentRefNum] => ch_3RmcoQCDiOqgoJOU0CLFgQCZ
    [PaymentMethodRef] => Array
        (
            [value] => 3
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => 8
                )

            [TotalTax] => 5.28
        )

    [DepositToAccountRef] => Array
        (
            [value] => 108
        )

)

[20-Jul-2025 10:00:41 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 218
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-20T03:00:41-07:00
                            [LastUpdatedTime] => 2025-07-20T03:00:41-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-07-19
                    [CurrencyRef] => Array
                        (
                            [value] => AUD
                            [name] => Australian Dollar
                        )

                    [ExchangeRate] => 1
                    [PrivateNote] => Stripe Payment Intent ID: pi_3RmcoQCDiOqgoJOU0KPfdZwD
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => llll
                                    [Amount] => 66
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 30
                                                    [name] => llll
                                                )

                                            [UnitPrice] => 66
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 81
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => 8
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 66
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0
                                                    [NetAmountTaxable] => 66
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 73
                            [name] => dsd fsfsf(ratuddll@testtt.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 78
                            [Line1] => 2500 Garcia Ave
                            [Line2] => Sydney NSW  2050
                        )

                    [GlobalTaxCalculation] => TaxExcluded
                    [TotalAmt] => 66
                    [HomeTotalAmt] => 66
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [HomeBalance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 3
                            [name] => Credit Card
                        )

                    [PaymentRefNum] => ch_3RmcoQCDiOqgoJOU0CLFgQCZ
                    [DepositToAccountRef] => Array
                        (
                            [value] => 108
                            [name] => Undeposited Funds
                        )

                )

            [time] => 2025-07-20T03:00:40.768-07:00
        )

)

[20-Jul-2025 10:00:41 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 218
[20-Jul-2025 10:00:41 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[20-Jul-2025 10:02:50 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RmcoQCDiOqgoJOU0Ne4cymJ)
[20-Jul-2025 10:02:50 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[20-Jul-2025 10:02:50 UTC] Starting sales receipt creation process for event: evt_3RmcoQCDiOqgoJOU0Ne4cymJ
[20-Jul-2025 10:02:51 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 73
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-20T03:00:38-07:00
                                            [LastUpdatedTime] => 2025-07-20T03:00:38-07:00
                                        )

                                    [GivenName] => dsd fsfsf
                                    [FamilyName] => dsd fsfsf
                                    [FullyQualifiedName] => dsd fsfsf(ratuddll@testtt.com)
                                    [DisplayName] => dsd fsfsf(ratuddll@testtt.com)
                                    [PrintOnCheckName] => dsd fsfsf dsd fsfsf
                                    [Active] => 1
                                    [V4IDPseudonym] => 002099b3353d0d0dab467597cb929c8e625195
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratuddll@testtt.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-20T03:02:51.335-07:00
        )

)

[20-Jul-2025 10:02:51 UTC] Using QBO customer ID: 73
[20-Jul-2025 10:02:51 UTC] Found checkout session: cs_test_a12Gn6m9pQ4TbJJzbqAYffOOC3R2aZFuqTwa5kTOu6PUSg82bNxE8gBE7c
[20-Jul-2025 10:02:51 UTC] Session tax amount: $5.28
[20-Jul-2025 10:02:51 UTC] Session subtotal: $66
[20-Jul-2025 10:02:51 UTC] Calculated tax percentage from session: 8%
[20-Jul-2025 10:02:51 UTC] Found checkout session line items: 1
[20-Jul-2025 10:02:51 UTC] Line item: llll, Subtotal: 66, Tax: 5.28, Total: 71.28
[20-Jul-2025 10:02:52 UTC] Found tax code for 8%: 12
[20-Jul-2025 10:02:52 UTC] Total line items amount: 66, Total tax: 5.28
[20-Jul-2025 10:02:52 UTC] Found tax code for 8%: 12
[20-Jul-2025 10:02:52 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 73
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 66
                    [Description] => llll
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 30
                                )

                            [UnitPrice] => 66
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => 12
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-19
    [TotalAmt] => 71.28
    [PrivateNote] => Stripe Payment Intent ID: pi_3RmcoQCDiOqgoJOU0KPfdZwD
    [PaymentRefNum] => ch_3RmcoQCDiOqgoJOU0CLFgQCZ
    [PaymentMethodRef] => Array
        (
            [value] => 3
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => 12
                )

            [TotalTax] => 5.28
        )

    [DepositToAccountRef] => Array
        (
            [value] => 108
        )

)

[20-Jul-2025 10:02:53 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 219
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-20T03:02:53-07:00
                            [LastUpdatedTime] => 2025-07-20T03:02:53-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-07-19
                    [CurrencyRef] => Array
                        (
                            [value] => AUD
                            [name] => Australian Dollar
                        )

                    [ExchangeRate] => 1
                    [PrivateNote] => Stripe Payment Intent ID: pi_3RmcoQCDiOqgoJOU0KPfdZwD
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => llll
                                    [Amount] => 66
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 30
                                                    [name] => llll
                                                )

                                            [UnitPrice] => 66
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 81
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => 12
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 66
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 5.28
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 5.28
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 22
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 8
                                                    [NetAmountTaxable] => 66
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 73
                            [name] => dsd fsfsf(ratuddll@testtt.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 79
                            [Line1] => 2500 Garcia Ave
                            [Line2] => Sydney NSW  2050
                        )

                    [GlobalTaxCalculation] => TaxExcluded
                    [TotalAmt] => 71.28
                    [HomeTotalAmt] => 71.28
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [HomeBalance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 3
                            [name] => Credit Card
                        )

                    [PaymentRefNum] => ch_3RmcoQCDiOqgoJOU0CLFgQCZ
                    [DepositToAccountRef] => Array
                        (
                            [value] => 108
                            [name] => Undeposited Funds
                        )

                )

            [time] => 2025-07-20T03:02:53.225-07:00
        )

)

[20-Jul-2025 10:02:53 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 219
[20-Jul-2025 10:02:53 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[20-Jul-2025 11:31:51 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RmcoQCDiOqgoJOU0Ne4cymJ)
[20-Jul-2025 11:31:51 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[20-Jul-2025 11:31:51 UTC] Starting sales receipt creation process for event: evt_3RmcoQCDiOqgoJOU0Ne4cymJ
[20-Jul-2025 11:31:51 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[20-Jul-2025 11:31:51 UTC] Payment intent already processed. QBO Sales Receipt ID: 219
[20-Jul-2025 11:32:35 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RmcoQCDiOqgoJOU0Ne4cymJ)
[20-Jul-2025 11:32:35 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[20-Jul-2025 11:32:35 UTC] Starting sales receipt creation process for event: evt_3RmcoQCDiOqgoJOU0Ne4cymJ
[20-Jul-2025 11:32:35 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 107
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-19T09:32:07-07:00
                                            [LastUpdatedTime] => 2025-07-19T09:32:07-07:00
                                        )

                                    [GivenName] => dsd fsfsf
                                    [FamilyName] => dsd fsfsf
                                    [FullyQualifiedName] => dsd fsfsf(ratuddll@testtt.com)
                                    [DisplayName] => dsd fsfsf(ratuddll@testtt.com)
                                    [PrintOnCheckName] => dsd fsfsf dsd fsfsf
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098fca0813f1de74d7a869cb3c3abb3348a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratuddll@testtt.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-20T04:32:35.817-07:00
        )

)

[20-Jul-2025 11:32:35 UTC] Using QBO customer ID: 107
[20-Jul-2025 11:32:36 UTC] Found checkout session: cs_test_a12Gn6m9pQ4TbJJzbqAYffOOC3R2aZFuqTwa5kTOu6PUSg82bNxE8gBE7c
[20-Jul-2025 11:32:36 UTC] Session tax amount: $5.28
[20-Jul-2025 11:32:36 UTC] Session subtotal: $66
[20-Jul-2025 11:32:36 UTC] Calculated tax percentage from session: 8%
[20-Jul-2025 11:32:36 UTC] Found checkout session line items: 1
[20-Jul-2025 11:32:36 UTC] Line item: llll, Subtotal: 66, Tax: 5.28, Total: 71.28
[20-Jul-2025 11:32:36 UTC] Found tax code for 8%: 2
[20-Jul-2025 11:32:36 UTC] Total line items amount: 66, Total tax: 5.28
[20-Jul-2025 11:32:37 UTC] Found tax code for 8%: 2
[20-Jul-2025 11:32:37 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 107
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 66
                    [Description] => llll
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 32
                                )

                            [UnitPrice] => 66
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => 2
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-19
    [TotalAmt] => 71.28
    [PrivateNote] => Stripe Payment Intent ID: pi_3RmcoQCDiOqgoJOU0KPfdZwD
    [PaymentRefNum] => ch_3RmcoQCDiOqgoJOU0CLFgQCZ
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => 2
                )

            [TotalTax] => 5.28
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[20-Jul-2025 11:32:37 UTC] QBO API response: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Invalid Line TaxCode in the request
                                    [Detail] => Valid line TaxCodes for US should be TAX or NON. Supplied value: 2
                                    [code] => 6100
                                    [element] => Line.SalesItemLineDetail.TaxCodeRef
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-20T04:32:37.846-07:00
        )

)

[20-Jul-2025 11:32:37 UTC] Sales receipt creation failed: Failed to create sales receipt in QuickBooks
[20-Jul-2025 11:32:37 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[20-Jul-2025 11:45:16 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RmcoQCDiOqgoJOU0Ne4cymJ)
[20-Jul-2025 11:45:16 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[20-Jul-2025 11:45:16 UTC] Starting sales receipt creation process for event: evt_3RmcoQCDiOqgoJOU0Ne4cymJ
[20-Jul-2025 11:45:17 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 107
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-19T09:32:07-07:00
                                            [LastUpdatedTime] => 2025-07-19T09:32:07-07:00
                                        )

                                    [GivenName] => dsd fsfsf
                                    [FamilyName] => dsd fsfsf
                                    [FullyQualifiedName] => dsd fsfsf(ratuddll@testtt.com)
                                    [DisplayName] => dsd fsfsf(ratuddll@testtt.com)
                                    [PrintOnCheckName] => dsd fsfsf dsd fsfsf
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098fca0813f1de74d7a869cb3c3abb3348a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratuddll@testtt.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-20T04:45:17.478-07:00
        )

)

[20-Jul-2025 11:45:17 UTC] Using QBO customer ID: 107
[20-Jul-2025 11:45:17 UTC] Found checkout session: cs_test_a12Gn6m9pQ4TbJJzbqAYffOOC3R2aZFuqTwa5kTOu6PUSg82bNxE8gBE7c
[20-Jul-2025 11:45:17 UTC] Session tax amount: $5.28
[20-Jul-2025 11:45:17 UTC] Session subtotal: $66
[20-Jul-2025 11:45:17 UTC] Calculated tax percentage from session: 8%
[20-Jul-2025 11:45:18 UTC] Found checkout session line items: 1
[20-Jul-2025 11:45:18 UTC] Line item: llll, Subtotal: 66, Tax: 5.28, Total: 71.28
[20-Jul-2025 11:45:18 UTC] Sales receipt creation failed: Unknown column 'country' in 'SELECT'
[20-Jul-2025 11:45:18 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:467
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(50): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 467
[20-Jul-2025 12:11:21 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RmcoQCDiOqgoJOU0Ne4cymJ)
[20-Jul-2025 12:11:21 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[20-Jul-2025 12:11:21 UTC] Starting sales receipt creation process for event: evt_3RmcoQCDiOqgoJOU0Ne4cymJ
[20-Jul-2025 12:11:22 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 107
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-19T09:32:07-07:00
                                            [LastUpdatedTime] => 2025-07-19T09:32:07-07:00
                                        )

                                    [GivenName] => dsd fsfsf
                                    [FamilyName] => dsd fsfsf
                                    [FullyQualifiedName] => dsd fsfsf(ratuddll@testtt.com)
                                    [DisplayName] => dsd fsfsf(ratuddll@testtt.com)
                                    [PrintOnCheckName] => dsd fsfsf dsd fsfsf
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098fca0813f1de74d7a869cb3c3abb3348a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratuddll@testtt.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-20T05:11:22.333-07:00
        )

)

[20-Jul-2025 12:11:22 UTC] Using QBO customer ID: 107
[20-Jul-2025 12:11:22 UTC] Found checkout session: cs_test_a12Gn6m9pQ4TbJJzbqAYffOOC3R2aZFuqTwa5kTOu6PUSg82bNxE8gBE7c
[20-Jul-2025 12:11:22 UTC] Session tax amount: $5.28
[20-Jul-2025 12:11:22 UTC] Session subtotal: $66
[20-Jul-2025 12:11:22 UTC] Calculated tax percentage from session: 8%
[20-Jul-2025 12:11:22 UTC] Found checkout session line items: 1
[20-Jul-2025 12:11:22 UTC] Line item: llll, Subtotal: 66, Tax: 5.28, Total: 71.28
[20-Jul-2025 12:11:23 UTC] Total line items amount: 66, Total tax: 5.28
[20-Jul-2025 12:11:24 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 107
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 66
                    [Description] => llll
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 32
                                )

                            [UnitPrice] => 66
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-19
    [TotalAmt] => 71.28
    [PrivateNote] => Stripe Payment Intent ID: pi_3RmcoQCDiOqgoJOU0KPfdZwD
    [PaymentRefNum] => ch_3RmcoQCDiOqgoJOU0CLFgQCZ
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 5.28
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[20-Jul-2025 12:11:25 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 679
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-20T05:11:25-07:00
                            [LastUpdatedTime] => 2025-07-20T05:11:25-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1273
                    [TxnDate] => 2025-07-19
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3RmcoQCDiOqgoJOU0KPfdZwD
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => llll
                                    [Amount] => 66
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 32
                                                    [name] => llll
                                                )

                                            [UnitPrice] => 66
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-09020802-V1-00120000
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 66
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 5.28
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0.42
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 66
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 3.47
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 66
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0.83
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 66
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0.56
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 66
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 107
                            [name] => dsd fsfsf(ratuddll@testtt.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 193
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 71.28
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3RmcoQCDiOqgoJOU0CLFgQCZ
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-20T05:11:24.886-07:00
        )

)

[20-Jul-2025 12:11:25 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 679
[20-Jul-2025 12:11:25 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[20-Jul-2025 12:19:42 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RmWlZCDiOqgoJOU0aeQRFuu)
[20-Jul-2025 12:19:42 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[20-Jul-2025 12:19:42 UTC] Starting sales receipt creation process for event: evt_3RmWlZCDiOqgoJOU0aeQRFuu
[20-Jul-2025 12:19:42 UTC] No customer email in charge details, trying to get from invoice
[20-Jul-2025 12:19:43 UTC] Found customer details from invoice: ratulbinhasan.integration@gmail.com
[20-Jul-2025 12:19:44 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 61
                                    [BalanceWithJobs] => 61
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 105
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-15T23:59:14-07:00
                                            [LastUpdatedTime] => 2025-07-16T03:35:43-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt testt
                                    [DisplayName] => testt testt
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098127805f7fa6e41dea97e908749fd2b9e
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratulbinhasan.integration@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-20T05:19:43.956-07:00
        )

)

[20-Jul-2025 12:19:44 UTC] Using QBO customer ID: 105
[20-Jul-2025 12:19:44 UTC] No Checkout Session found for Payment Intent: pi_3RmWlZCDiOqgoJOU0XAwjeU8
[20-Jul-2025 12:19:44 UTC] No line items found from checkout session, trying to get from invoice
[20-Jul-2025 12:19:44 UTC] Found invoice line items: 2
[20-Jul-2025 12:19:46 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 105
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 968
                    [Description] => this is test
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 29
                                )

                            [UnitPrice] => 44
                            [Qty] => 22
                            [TaxCodeRef] => Array
                                (
                                    [value] => NON
                                )

                        )

                )

            [1] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 484
                    [Description] => losttt
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 31
                                )

                            [UnitPrice] => 44
                            [Qty] => 11
                            [TaxCodeRef] => Array
                                (
                                    [value] => NON
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-19
    [TotalAmt] => 1452
    [PrivateNote] => Stripe Payment Intent ID: pi_3RmWlZCDiOqgoJOU0XAwjeU8
    [PaymentRefNum] => ch_3RmWlZCDiOqgoJOU0R8BNp4l
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[20-Jul-2025 12:19:47 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 680
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-20T05:19:47-07:00
                            [LastUpdatedTime] => 2025-07-20T05:19:47-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1274
                    [TxnDate] => 2025-07-19
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3RmWlZCDiOqgoJOU0XAwjeU8
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => this is test
                                    [Amount] => 968
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 29
                                                    [name] => this is test
                                                )

                                            [UnitPrice] => 44
                                            [Qty] => 22
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => NON
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Id] => 2
                                    [LineNum] => 2
                                    [Description] => losttt
                                    [Amount] => 484
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 31
                                                    [name] => losttt
                                                )

                                            [UnitPrice] => 44
                                            [Qty] => 11
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => NON
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [2] => Array
                                (
                                    [Amount] => 1452
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 105
                            [name] => testt testt
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 194
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 1452
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3RmWlZCDiOqgoJOU0R8BNp4l
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-20T05:19:46.937-07:00
        )

)

[20-Jul-2025 12:19:47 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 680
[20-Jul-2025 12:19:47 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[20-Jul-2025 12:42:59 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RmWlZCDiOqgoJOU0aeQRFuu)
[20-Jul-2025 12:42:59 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[20-Jul-2025 12:42:59 UTC] Starting sales receipt creation process for event: evt_3RmWlZCDiOqgoJOU0aeQRFuu
[20-Jul-2025 12:42:59 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[20-Jul-2025 12:42:59 UTC] Payment intent already processed. QBO Sales Receipt ID: 680
[20-Jul-2025 12:45:10 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RmWlZCDiOqgoJOU0aeQRFuu)
[20-Jul-2025 12:45:10 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[20-Jul-2025 12:45:10 UTC] Starting sales receipt creation process for event: evt_3RmWlZCDiOqgoJOU0aeQRFuu
[20-Jul-2025 12:45:10 UTC] No customer email in charge details, trying to get from invoice
[20-Jul-2025 12:45:10 UTC] Found customer details from invoice: ratulbinhasan.integration@gmail.com
[20-Jul-2025 12:45:11 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                )

            [time] => 2025-07-20T05:45:11.593-07:00
        )

)

[20-Jul-2025 12:45:12 UTC] Using QBO customer ID: 68
[20-Jul-2025 12:45:12 UTC] No Checkout Session found for Payment Intent: pi_3RmWlZCDiOqgoJOU0XAwjeU8
[20-Jul-2025 12:45:12 UTC] No line items found from checkout session, trying to get from invoice
[20-Jul-2025 12:45:12 UTC] Found invoice line items: 2
[20-Jul-2025 12:45:14 UTC] Using tax exempt ID from sync settings: 3
[20-Jul-2025 12:45:15 UTC] Using tax exempt ID from sync settings: 3
[20-Jul-2025 12:45:16 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 68
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 968
                    [Description] => this is test
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 29
                                )

                            [UnitPrice] => 44
                            [Qty] => 22
                            [TaxCodeRef] => Array
                                (
                                    [value] => 3
                                )

                        )

                )

            [1] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 484
                    [Description] => losttt
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 30
                                )

                            [UnitPrice] => 44
                            [Qty] => 11
                            [TaxCodeRef] => Array
                                (
                                    [value] => 3
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-19
    [TotalAmt] => 1452
    [PrivateNote] => Stripe Payment Intent ID: pi_3RmWlZCDiOqgoJOU0XAwjeU8
    [PaymentRefNum] => ch_3RmWlZCDiOqgoJOU0R8BNp4l
    [PaymentMethodRef] => Array
        (
            [value] => 3
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [DepositToAccountRef] => Array
        (
            [value] => 26
        )

)

[20-Jul-2025 12:45:17 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 183
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-20T05:45:17-07:00
                            [LastUpdatedTime] => 2025-07-20T05:45:17-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-07-19
                    [CurrencyRef] => Array
                        (
                            [value] => CAD
                            [name] => Canadian Dollar
                        )

                    [ExchangeRate] => 1
                    [PrivateNote] => Stripe Payment Intent ID: pi_3RmWlZCDiOqgoJOU0XAwjeU8
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => this is test
                                    [Amount] => 968
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 29
                                                    [name] => this is test
                                                )

                                            [UnitPrice] => 44
                                            [Qty] => 22
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 67
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => 3
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Id] => 2
                                    [LineNum] => 2
                                    [Description] => losttt
                                    [Amount] => 484
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 30
                                                    [name] => losttt
                                                )

                                            [UnitPrice] => 44
                                            [Qty] => 11
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 67
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => 3
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [2] => Array
                                (
                                    [Amount] => 1452
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 4
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0
                                                    [NetAmountTaxable] => 1452
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 68
                            [name] => testt(ratulbinhasan.integration@gmail.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 64
                            [Line1] => 5100 Spectrum Way
                            [Line2] => Cooksville ON  L4W 5S2
                        )

                    [GlobalTaxCalculation] => TaxExcluded
                    [TotalAmt] => 1452
                    [HomeTotalAmt] => 1452
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [HomeBalance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 3
                            [name] => Credit Card
                        )

                    [PaymentRefNum] => ch_3RmWlZCDiOqgoJOU0R8BNp4l
                    [DepositToAccountRef] => Array
                        (
                            [value] => 26
                            [name] => Undeposited Funds
                        )

                )

            [time] => 2025-07-20T05:45:16.740-07:00
        )

)

[20-Jul-2025 12:45:17 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 183
[20-Jul-2025 12:45:17 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[20-Jul-2025 12:47:04 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RmcoQCDiOqgoJOU0Ne4cymJ)
[20-Jul-2025 12:47:04 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[20-Jul-2025 12:47:04 UTC] Starting sales receipt creation process for event: evt_3RmcoQCDiOqgoJOU0Ne4cymJ
[20-Jul-2025 12:47:04 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                )

            [time] => 2025-07-20T05:47:04.472-07:00
        )

)

[20-Jul-2025 12:47:04 UTC] Using QBO customer ID: 69
[20-Jul-2025 12:47:05 UTC] Found checkout session: cs_test_a12Gn6m9pQ4TbJJzbqAYffOOC3R2aZFuqTwa5kTOu6PUSg82bNxE8gBE7c
[20-Jul-2025 12:47:05 UTC] Session tax amount: $5.28
[20-Jul-2025 12:47:05 UTC] Session subtotal: $66
[20-Jul-2025 12:47:05 UTC] Calculated tax percentage from session: 8%
[20-Jul-2025 12:47:05 UTC] Found checkout session line items: 1
[20-Jul-2025 12:47:05 UTC] Line item: llll, Subtotal: 66, Tax: 5.28, Total: 71.28
[20-Jul-2025 12:47:06 UTC] Found tax code for 8%: 8
[20-Jul-2025 12:47:06 UTC] Total line items amount: 66, Total tax: 5.28
[20-Jul-2025 12:47:07 UTC] Found tax code for 8%: 8
[20-Jul-2025 12:47:07 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 69
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 66
                    [Description] => llll
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 31
                                )

                            [UnitPrice] => 66
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => 8
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-19
    [TotalAmt] => 71.28
    [PrivateNote] => Stripe Payment Intent ID: pi_3RmcoQCDiOqgoJOU0KPfdZwD
    [PaymentRefNum] => ch_3RmcoQCDiOqgoJOU0CLFgQCZ
    [PaymentMethodRef] => Array
        (
            [value] => 3
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => 8
                )

            [TotalTax] => 5.28
        )

    [DepositToAccountRef] => Array
        (
            [value] => 26
        )

)

[20-Jul-2025 12:47:08 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 184
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-20T05:47:08-07:00
                            [LastUpdatedTime] => 2025-07-20T05:47:08-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-07-19
                    [CurrencyRef] => Array
                        (
                            [value] => CAD
                            [name] => Canadian Dollar
                        )

                    [ExchangeRate] => 1
                    [PrivateNote] => Stripe Payment Intent ID: pi_3RmcoQCDiOqgoJOU0KPfdZwD
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => llll
                                    [Amount] => 66
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 31
                                                    [name] => llll
                                                )

                                            [UnitPrice] => 66
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 67
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => 8
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 66
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 5.28
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 5.28
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 18
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 8
                                                    [NetAmountTaxable] => 66
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 69
                            [name] => dsd fsfsf(ratuddll@testtt.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 65
                            [Line1] => 5100 Spectrum Way
                            [Line2] => Cooksville ON  L4W 5S2
                        )

                    [GlobalTaxCalculation] => TaxExcluded
                    [TotalAmt] => 71.28
                    [HomeTotalAmt] => 71.28
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [HomeBalance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 3
                            [name] => Credit Card
                        )

                    [PaymentRefNum] => ch_3RmcoQCDiOqgoJOU0CLFgQCZ
                    [DepositToAccountRef] => Array
                        (
                            [value] => 26
                            [name] => Undeposited Funds
                        )

                )

            [time] => 2025-07-20T05:47:08.231-07:00
        )

)

[20-Jul-2025 12:47:08 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 184
[20-Jul-2025 12:47:08 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[20-Jul-2025 17:21:09 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rn0omCDiOqgoJOU0Jdq6VOz)
[20-Jul-2025 17:21:09 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[20-Jul-2025 17:21:09 UTC] Starting sales receipt creation process for event: evt_3Rn0omCDiOqgoJOU0Jdq6VOz
[20-Jul-2025 17:21:09 UTC] No customer email in charge details, trying to get from invoice
[20-Jul-2025 17:21:09 UTC] Stripe Webhook Received: charge.succeeded (ID: evt_3Rn0omCDiOqgoJOU0XJuMtLC)
[20-Jul-2025 17:21:09 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[20-Jul-2025 17:21:09 UTC] Starting charge processing for Stripe charge: evt_3Rn0omCDiOqgoJOU0XJuMtLC
[20-Jul-2025 17:21:09 UTC] Payment creation failed: Customer email is required but missing
[20-Jul-2025 17:21:09 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[20-Jul-2025 17:21:09 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1Rn0vBCDiOqgoJOUAl3rXNJh)
[20-Jul-2025 17:21:09 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[20-Jul-2025 17:21:09 UTC] Starting payment process for Stripe invoice: evt_1Rn0vBCDiOqgoJOUAl3rXNJh
[20-Jul-2025 17:21:09 UTC] Fetching Stripe invoice: in_1Rn0nNCDiOqgoJOUUcyNjVAl
[20-Jul-2025 17:21:09 UTC] Found customer details from invoice: ratulbinhasan.integration@gmail.com
[20-Jul-2025 17:21:09 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rn0nNCDiOqgoJOUUcyNjVAl
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 144078
    [amount_overpaid] => 0
    [amount_paid] => 144078
    [amount_remaining] => 0
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 1
    [attempted] => 1
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => ch_3Rn0omCDiOqgoJOU0Lr9v729
    [collection_method] => send_invoice
    [created] => 1753031585
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => Array
        (
            [city] => testt
            [country] => US
            [line1] => rwrwr
            [line2] => fsf
            [postal_code] => 95014
            [state] => CO
        )

    [customer_email] => ratulbinhasan.integration@gmail.com
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => Array
        (
            [address] => Array
                (
                    [city] => testt
                    [country] => US
                    [line1] => rwrwr
                    [line2] => fsf
                    [postal_code] => 95014
                    [state] => CO
                )

            [name] => testt
            [phone] => 
        )

    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [object] => tax_rate
                    [active] => 1
                    [country] => BD
                    [created] => 1752217701
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1755623672
    [effective_at] => 1753031672
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TaVJnR3ZVNzZLSWozZnhndEtqUkR2MFdXSHVTUVBTLDE0MzU3Mjg2OQ0200cZJebROc?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TaVJnR3ZVNzZLSWozZnhndEtqUkR2MFdXSHVTUVBTLDE0MzU3Mjg2OQ0200cZJebROc/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rn0o4CDiOqgoJOURuyU4XXZ
                            [object] => line_item
                            [amount] => 33000
                            [amount_excluding_tax] => 33000
                            [currency] => usd
                            [description] => llll
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rn0nNCDiOqgoJOUUcyNjVAl
                            [invoice_item] => ii_1Rn0o4CDiOqgoJOU9jGyjiND
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rn0o4CDiOqgoJOU9jGyjiND
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1753031628
                                    [start] => 1753031628
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RlPu2CDiOqgoJOUqYL6qJsw
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1752651442
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SgnUhRleVQlEod
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 6600
                                    [unit_amount_decimal] => 6600
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RlPu2CDiOqgoJOUqYL6qJsw
                                            [product] => prod_SgnUhRleVQlEod
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 6600
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 5
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 3630
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 33000
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 3630
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 33000
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 6600
                        )

                    [1] => Array
                        (
                            [id] => il_1Rn0npCDiOqgoJOUzp10odf6
                            [object] => line_item
                            [amount] => 96800
                            [amount_excluding_tax] => 96800
                            [currency] => usd
                            [description] => losttt
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rn0nNCDiOqgoJOUUcyNjVAl
                            [invoice_item] => ii_1Rn0npCDiOqgoJOUrynDhtN8
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rn0npCDiOqgoJOUrynDhtN8
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1753031613
                                    [start] => 1753031613
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RmWkSCDiOqgoJOUw6sHdaOT
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1752916084
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SgnORpg4HJjM59
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 4400
                                    [unit_amount_decimal] => 4400
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RmWkSCDiOqgoJOUw6sHdaOT
                                            [product] => prod_SgnORpg4HJjM59
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 4400
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 22
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 10648
                                            [inclusive] => 
                                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                            [taxability_reason] => 
                                            [taxable_amount] => 96800
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 10648
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 96800
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 4400
                        )

                )

            [has_more] => 
            [total_count] => 2
            [url] => /v1/invoices/in_1Rn0nNCDiOqgoJOUUcyNjVAl/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0011
    [on_behalf_of] => 
    [paid] => 1
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3Rn0omCDiOqgoJOU0CKszRxP
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1753031585
    [period_start] => 1753031585
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => paid
    [status_transitions] => Array
        (
            [finalized_at] => 1753031672
            [marked_uncollectible_at] => 
            [paid_at] => 1753032068
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 129800
    [subtotal_excluding_tax] => 129800
    [tax] => 14278
    [test_clock] => 
    [total] => 144078
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 129800
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 14278
                    [inclusive] => 
                    [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                    [taxability_reason] => 
                    [taxable_amount] => 129800
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 14278
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1Rjb4DCDiOqgoJOUCMRe2PFL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 129800
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1753031585
)

[20-Jul-2025 17:21:10 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 61
                                    [BalanceWithJobs] => 61
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 105
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-15T23:59:14-07:00
                                            [LastUpdatedTime] => 2025-07-16T03:35:43-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt testt
                                    [DisplayName] => testt testt
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098127805f7fa6e41dea97e908749fd2b9e
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratulbinhasan.integration@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-20T10:21:10.380-07:00
        )

)

[20-Jul-2025 17:21:10 UTC] Using QBO customer ID: 105
[20-Jul-2025 17:21:10 UTC] No Checkout Session found for Payment Intent: pi_3Rn0omCDiOqgoJOU0CKszRxP
[20-Jul-2025 17:21:10 UTC] No line items found from checkout session, trying to get from invoice
[20-Jul-2025 17:21:11 UTC] Found invoice line items: 2
[20-Jul-2025 17:21:11 UTC] Using tax_percent from invoice: 11%
[20-Jul-2025 17:21:11 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 61
                                    [BalanceWithJobs] => 61
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 105
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-15T23:59:14-07:00
                                            [LastUpdatedTime] => 2025-07-16T03:35:43-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt testt
                                    [DisplayName] => testt testt
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098127805f7fa6e41dea97e908749fd2b9e
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratulbinhasan.integration@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-20T10:21:11.056-07:00
        )

)

[20-Jul-2025 17:21:11 UTC] Using QBO customer ID: 105
[20-Jul-2025 17:21:11 UTC] No existing QBO invoice found, creating new one
[20-Jul-2025 17:21:11 UTC] Creating new QBO invoice with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 105
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 330
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 32
                                )

                            [UnitPrice] => 66
                            [Qty] => 5
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

            [1] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 968
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 31
                                )

                            [UnitPrice] => 44
                            [Qty] => 22
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-20
    [DueDate] => 2025-08-19
    [TotalAmt] => 1440.78
    [PrivateNote] => Stripe Invoice ID: in_1Rn0nNCDiOqgoJOUUcyNjVAl
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 142.78
        )

)

[20-Jul-2025 17:21:12 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 681
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-20T10:21:13-07:00
                            [LastModifiedByRef] => Array
                                (
                                    [value] => 123145870265994
                                )

                            [LastUpdatedTime] => 2025-07-20T10:21:13-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1275
                    [TxnDate] => 2025-07-20
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Invoice ID: in_1Rn0nNCDiOqgoJOUUcyNjVAl
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 330
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 32
                                                    [name] => llll
                                                )

                                            [UnitPrice] => 66
                                            [Qty] => 5
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-09020802-V1-00120000
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Id] => 2
                                    [LineNum] => 2
                                    [Amount] => 968
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 31
                                                    [name] => losttt
                                                )

                                            [UnitPrice] => 44
                                            [Qty] => 22
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-09020802-V1-00120000
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [2] => Array
                                (
                                    [Amount] => 1298
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 142.78
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 11.28
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 1298
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 93.93
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 1298
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 22.54
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 1298
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 15.03
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 1298
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 105
                            [name] => testt testt
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 195
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [DueDate] => 2025-08-19
                    [TotalAmt] => 1440.78
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 1440.78
                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-20T10:21:11.799-07:00
        )

)

[20-Jul-2025 17:21:12 UTC] Created new QBO invoice ID: 681
[20-Jul-2025 17:21:13 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 105
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 293.7
                    [Description] => llll
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 32
                                )

                            [UnitPrice] => 58.74
                            [Qty] => 5
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

            [1] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 861.52
                    [Description] => losttt
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 31
                                )

                            [UnitPrice] => 39.16
                            [Qty] => 22
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-20
    [TotalAmt] => 1440.78
    [PrivateNote] => Stripe Payment Intent ID: pi_3Rn0omCDiOqgoJOU0CKszRxP
    [PaymentRefNum] => ch_3Rn0omCDiOqgoJOU0Lr9v729
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 142.78
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[20-Jul-2025 17:21:13 UTC] Failed to create payment method: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Invalid Enumeration
                                    [Detail] => Invalid Enumeration : OTHER
                                    [code] => 2170
                                    [element] => Type
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-20T10:21:13.894-07:00
        )

)

[20-Jul-2025 17:21:14 UTC] Creating QBO payment with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 105
        )

    [TotalAmt] => 1440.78
    [TxnDate] => 2025-07-20
    [PaymentRefNum] => pi_3Rn0omCDiOqgoJOU0C
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

    [PrivateNote] => Stripe Invoice ID: in_1Rn0nNCDiOqgoJOUUcyNjVAl
    [Line] => Array
        (
            [0] => Array
                (
                    [Amount] => 1440.78
                    [LinkedTxn] => Array
                        (
                            [0] => Array
                                (
                                    [TxnId] => 681
                                    [TxnType] => Invoice
                                )

                        )

                )

        )

)

[20-Jul-2025 17:21:14 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 682
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-20T10:21:14-07:00
                            [LastUpdatedTime] => 2025-07-20T10:21:14-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1276
                    [TxnDate] => 2025-07-20
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3Rn0omCDiOqgoJOU0CKszRxP
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => llll
                                    [Amount] => 293.7
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 32
                                                    [name] => llll
                                                )

                                            [UnitPrice] => 58.74
                                            [Qty] => 5
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-09020802-V1-00120000
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Id] => 2
                                    [LineNum] => 2
                                    [Description] => losttt
                                    [Amount] => 861.52
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 31
                                                    [name] => losttt
                                                )

                                            [UnitPrice] => 39.16
                                            [Qty] => 22
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-09020802-V1-00120000
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [2] => Array
                                (
                                    [Amount] => 1155.22
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 142.78
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 11.27
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 1155.22
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 93.93
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 1155.22
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 22.54
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 1155.22
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 15.04
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 1155.22
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 105
                            [name] => testt testt
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 196
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 1298
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3Rn0omCDiOqgoJOU0Lr9v729
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-20T10:21:13.516-07:00
        )

)

[20-Jul-2025 17:21:14 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 682
[20-Jul-2025 17:21:14 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[20-Jul-2025 17:21:15 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Payment] => Array
                (
                    [CustomerRef] => Array
                        (
                            [value] => 105
                            [name] => testt testt
                        )

                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                        )

                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                        )

                    [PaymentRefNum] => pi_3Rn0omCDiOqgoJOU0C
                    [TotalAmt] => 1440.78
                    [UnappliedAmt] => 0
                    [ProcessPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 683
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-20T10:21:15-07:00
                            [LastUpdatedTime] => 2025-07-20T10:21:15-07:00
                        )

                    [TxnDate] => 2025-07-20
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Invoice ID: in_1Rn0nNCDiOqgoJOUUcyNjVAl
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Amount] => 1440.78
                                    [LinkedTxn] => Array
                                        (
                                            [0] => Array
                                                (
                                                    [TxnId] => 681
                                                    [TxnType] => Invoice
                                                )

                                        )

                                    [LineEx] => Array
                                        (
                                            [any] => Array
                                                (
                                                    [0] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnId
                                                                    [Value] => 681
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                    [1] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnOpenBalance
                                                                    [Value] => 1440.78
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                    [2] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnReferenceNumber
                                                                    [Value] => 1275
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                )

                                        )

                                )

                        )

                )

            [time] => 2025-07-20T10:21:14.194-07:00
        )

)

[20-Jul-2025 17:21:15 UTC] Payment created successfully in QBO. Payment ID: 683
[20-Jul-2025 17:21:15 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[20-Jul-2025 17:23:53 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rn0xlCDiOqgoJOU1iE2dmvz)
[20-Jul-2025 17:23:53 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[20-Jul-2025 17:23:53 UTC] Starting sales receipt creation process for event: evt_3Rn0xlCDiOqgoJOU1iE2dmvz
[20-Jul-2025 17:23:53 UTC] No customer email in charge details, trying to get from invoice
[20-Jul-2025 17:23:53 UTC] Sales receipt creation failed: Customer email is required but missing
[20-Jul-2025 17:23:53 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:484
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(50): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 484
[20-Jul-2025 17:23:53 UTC] Stripe Webhook Received: charge.succeeded (ID: evt_3Rn0xlCDiOqgoJOU1y4KQKRn)
[20-Jul-2025 17:23:53 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[20-Jul-2025 17:23:53 UTC] Starting charge processing for Stripe charge: evt_3Rn0xlCDiOqgoJOU1y4KQKRn
[20-Jul-2025 17:23:53 UTC] Payment creation failed: Customer email is required but missing
[20-Jul-2025 17:23:53 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[20-Jul-2025 17:59:51 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rn0xOCDiOqgoJOU1fn5AV9M)
[20-Jul-2025 17:59:51 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[20-Jul-2025 17:59:51 UTC] Starting sales receipt creation process for event: evt_3Rn0xOCDiOqgoJOU1fn5AV9M
[20-Jul-2025 17:59:51 UTC] No customer email in charge details, trying to get from invoice
[20-Jul-2025 17:59:51 UTC] Stripe Webhook Received: charge.succeeded (ID: evt_3Rn0xOCDiOqgoJOU1ECexuEU)
[20-Jul-2025 17:59:51 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[20-Jul-2025 17:59:51 UTC] Starting charge processing for Stripe charge: evt_3Rn0xOCDiOqgoJOU1ECexuEU
[20-Jul-2025 17:59:51 UTC] Payment creation failed: Customer email is required but missing
[20-Jul-2025 17:59:51 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[20-Jul-2025 17:59:51 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1Rn1WdCDiOqgoJOUHiJmxPGM)
[20-Jul-2025 17:59:51 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[20-Jul-2025 17:59:51 UTC] Starting payment process for Stripe invoice: evt_1Rn1WdCDiOqgoJOUHiJmxPGM
[20-Jul-2025 17:59:51 UTC] Fetching Stripe invoice: in_1Rn0whCDiOqgoJOU4vVHl2YJ
[20-Jul-2025 17:59:51 UTC] Found customer details from invoice: ratulbinhasan.integration@gmail.com
[20-Jul-2025 17:59:51 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rn0whCDiOqgoJOU4vVHl2YJ
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 6600
    [amount_overpaid] => 0
    [amount_paid] => 6600
    [amount_remaining] => 0
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 1
    [attempted] => 1
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 1
            [liability] => Array
                (
                    [type] => self
                )

            [provider] => stripe
            [status] => complete
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => ch_3Rn0xOCDiOqgoJOU14259SDC
    [collection_method] => send_invoice
    [created] => 1753032163
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => Array
        (
            [city] => testt
            [country] => US
            [line1] => rwrwr
            [line2] => fsf
            [postal_code] => 95014
            [state] => CO
        )

    [customer_email] => ratulbinhasan.integration@gmail.com
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => Array
        (
            [address] => Array
                (
                    [city] => testt
                    [country] => US
                    [line1] => rwrwr
                    [line2] => fsf
                    [postal_code] => 95014
                    [state] => CO
                )

            [name] => testt
            [phone] => 
        )

    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1755624206
    [effective_at] => 1753032206
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TaVJxV0lTN2g3SnFCSkVBQXV6Snh4UWNoNzNvZFlhLDE0MzU3NTE5MQ0200f4e6iyKq?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TaVJxV0lTN2g3SnFCSkVBQXV6Snh4UWNoNzNvZFlhLDE0MzU3NTE5MQ0200f4e6iyKq/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rn0x5CDiOqgoJOUfDGOlXCK
                            [object] => line_item
                            [amount] => 6600
                            [amount_excluding_tax] => 6600
                            [currency] => usd
                            [description] => llll
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rn0whCDiOqgoJOU4vVHl2YJ
                            [invoice_item] => ii_1Rn0x5CDiOqgoJOUZDojf4Up
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rn0x5CDiOqgoJOUZDojf4Up
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1753032187
                                    [start] => 1753032187
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RlPu2CDiOqgoJOUqYL6qJsw
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1752651442
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SgnUhRleVQlEod
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 6600
                                    [unit_amount_decimal] => 6600
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RlPu2CDiOqgoJOUqYL6qJsw
                                            [product] => prod_SgnUhRleVQlEod
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 6600
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 1
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 0
                                            [inclusive] => 
                                            [tax_rate] => txr_1RlPxVCDiOqgoJOUtbT35WCR
                                            [taxability_reason] => not_collecting
                                            [taxable_amount] => 0
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 0
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1RlPxVCDiOqgoJOUtbT35WCR
                                                )

                                            [taxability_reason] => not_collecting
                                            [taxable_amount] => 0
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 6600
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rn0whCDiOqgoJOU4vVHl2YJ/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0012
    [on_behalf_of] => 
    [paid] => 1
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3Rn0xOCDiOqgoJOU1K3HdICA
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1753032163
    [period_start] => 1753032163
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => paid
    [status_transitions] => Array
        (
            [finalized_at] => 1753032206
            [marked_uncollectible_at] => 
            [paid_at] => 1753034389
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 6600
    [subtotal_excluding_tax] => 6600
    [tax] => 0
    [test_clock] => 
    [total] => 6600
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 6600
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 0
                    [inclusive] => 
                    [tax_rate] => txr_1RlPxVCDiOqgoJOUtbT35WCR
                    [taxability_reason] => not_collecting
                    [taxable_amount] => 0
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 0
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1RlPxVCDiOqgoJOUtbT35WCR
                        )

                    [taxability_reason] => not_collecting
                    [taxable_amount] => 0
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1753032163
)

[20-Jul-2025 17:59:52 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 61
                                    [BalanceWithJobs] => 61
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 105
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-15T23:59:14-07:00
                                            [LastUpdatedTime] => 2025-07-20T10:21:15-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt testt
                                    [DisplayName] => testt testt
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098127805f7fa6e41dea97e908749fd2b9e
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratulbinhasan.integration@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-20T10:59:52.595-07:00
        )

)

[20-Jul-2025 17:59:52 UTC] Using QBO customer ID: 105
[20-Jul-2025 17:59:52 UTC] No Checkout Session found for Payment Intent: pi_3Rn0xOCDiOqgoJOU1K3HdICA
[20-Jul-2025 17:59:52 UTC] No line items found from checkout session, trying to get from invoice
[20-Jul-2025 17:59:53 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 61
                                    [BalanceWithJobs] => 61
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 105
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-15T23:59:14-07:00
                                            [LastUpdatedTime] => 2025-07-20T10:21:15-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt testt
                                    [DisplayName] => testt testt
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098127805f7fa6e41dea97e908749fd2b9e
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratulbinhasan.integration@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-20T10:59:53.246-07:00
        )

)

[20-Jul-2025 17:59:53 UTC] Using QBO customer ID: 105
[20-Jul-2025 17:59:53 UTC] No existing QBO invoice found, creating new one
[20-Jul-2025 17:59:53 UTC] Found invoice line items: 1
[20-Jul-2025 17:59:53 UTC] Using tax_percent from invoice: 9.125%
[20-Jul-2025 17:59:53 UTC] Creating new QBO invoice with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 105
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 66
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 32
                                )

                            [UnitPrice] => 66
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-20
    [DueDate] => 2025-08-19
    [TotalAmt] => 66
    [PrivateNote] => Stripe Invoice ID: in_1Rn0whCDiOqgoJOU4vVHl2YJ
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
)

[20-Jul-2025 17:59:54 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 105
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 59.9775
                    [Description] => llll
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 32
                                )

                            [UnitPrice] => 59.9775
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-20
    [TotalAmt] => 51
    [PrivateNote] => Stripe Payment Intent ID: pi_3Rn0xOCDiOqgoJOU1K3HdICA
    [PaymentRefNum] => ch_3Rn0xOCDiOqgoJOU14259SDC
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 6.0225
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[20-Jul-2025 17:59:55 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 684
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-20T10:59:55-07:00
                            [LastModifiedByRef] => Array
                                (
                                    [value] => 123145870265994
                                )

                            [LastUpdatedTime] => 2025-07-20T10:59:55-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1277
                    [TxnDate] => 2025-07-20
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Invoice ID: in_1Rn0whCDiOqgoJOU4vVHl2YJ
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 66
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 32
                                                    [name] => llll
                                                )

                                            [UnitPrice] => 66
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-09020802-V1-00120000
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 66
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 6.27
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0.5
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 66
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 4.12
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 66
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0.99
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 66
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0.66
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 66
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 105
                            [name] => testt testt
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 197
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [DueDate] => 2025-08-19
                    [TotalAmt] => 72.27
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 72.27
                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-20T10:59:54.035-07:00
        )

)

[20-Jul-2025 17:59:55 UTC] Created new QBO invoice ID: 684
[20-Jul-2025 17:59:56 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 685
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-20T10:59:55-07:00
                            [LastUpdatedTime] => 2025-07-20T10:59:55-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1278
                    [TxnDate] => 2025-07-20
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3Rn0xOCDiOqgoJOU1K3HdICA
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => llll
                                    [Amount] => 59.98
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 32
                                                    [name] => llll
                                                )

                                            [UnitPrice] => 59.9775
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-09020802-V1-00120000
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 59.98
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 6.02
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0.48
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 59.98
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 3.96
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 59.98
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0.95
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 59.98
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0.63
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 59.98
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 105
                            [name] => testt testt
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 198
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 66
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3Rn0xOCDiOqgoJOU14259SDC
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-20T10:59:55.243-07:00
        )

)

[20-Jul-2025 17:59:56 UTC] Failed to create payment method: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Invalid Enumeration
                                    [Detail] => Invalid Enumeration : OTHER
                                    [code] => 2170
                                    [element] => Type
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-20T10:59:55.989-07:00
        )

)

[20-Jul-2025 17:59:56 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 685
[20-Jul-2025 17:59:56 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[20-Jul-2025 17:59:56 UTC] Creating QBO payment with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 105
        )

    [TotalAmt] => 66
    [TxnDate] => 2025-07-20
    [PaymentRefNum] => pi_3Rn0xOCDiOqgoJOU1K
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

    [PrivateNote] => Stripe Invoice ID: in_1Rn0whCDiOqgoJOU4vVHl2YJ
    [Line] => Array
        (
            [0] => Array
                (
                    [Amount] => 66
                    [LinkedTxn] => Array
                        (
                            [0] => Array
                                (
                                    [TxnId] => 684
                                    [TxnType] => Invoice
                                )

                        )

                )

        )

)

[20-Jul-2025 17:59:57 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Payment] => Array
                (
                    [CustomerRef] => Array
                        (
                            [value] => 105
                            [name] => testt testt
                        )

                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                        )

                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                        )

                    [PaymentRefNum] => pi_3Rn0xOCDiOqgoJOU1K
                    [TotalAmt] => 66
                    [UnappliedAmt] => 0
                    [ProcessPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 686
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-20T10:59:57-07:00
                            [LastUpdatedTime] => 2025-07-20T10:59:57-07:00
                        )

                    [TxnDate] => 2025-07-20
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Invoice ID: in_1Rn0whCDiOqgoJOU4vVHl2YJ
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Amount] => 66
                                    [LinkedTxn] => Array
                                        (
                                            [0] => Array
                                                (
                                                    [TxnId] => 684
                                                    [TxnType] => Invoice
                                                )

                                        )

                                    [LineEx] => Array
                                        (
                                            [any] => Array
                                                (
                                                    [0] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnId
                                                                    [Value] => 684
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                    [1] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnOpenBalance
                                                                    [Value] => 72.27
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                    [2] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnReferenceNumber
                                                                    [Value] => 1277
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                )

                                        )

                                )

                        )

                )

            [time] => 2025-07-20T10:59:56.413-07:00
        )

)

[20-Jul-2025 17:59:57 UTC] Payment created successfully in QBO. Payment ID: 686
[20-Jul-2025 17:59:57 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[20-Jul-2025 18:05:16 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rn1brCDiOqgoJOU1SN6FfNt)
[20-Jul-2025 18:05:16 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[20-Jul-2025 18:05:16 UTC] Starting sales receipt creation process for event: evt_3Rn1brCDiOqgoJOU1SN6FfNt
[20-Jul-2025 18:05:16 UTC] Stripe Webhook Received: charge.succeeded (ID: evt_3Rn1brCDiOqgoJOU1K4GiSjt)
[20-Jul-2025 18:05:16 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[20-Jul-2025 18:05:16 UTC] Starting charge processing for Stripe charge: evt_3Rn1brCDiOqgoJOU1K4GiSjt
[20-Jul-2025 18:05:17 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                )

            [time] => 2025-07-20T11:05:17.463-07:00
        )

)

[20-Jul-2025 18:05:17 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                )

            [time] => 2025-07-20T11:05:17.504-07:00
        )

)

[20-Jul-2025 18:05:18 UTC] Using QBO customer ID: 108
[20-Jul-2025 18:05:18 UTC] Found checkout session: cs_test_a1lG1IedbEuL2KGpomjI3ZTnm50Hq6qTOnuHdiG7VivkhwW7Bm6w7iVupp
[20-Jul-2025 18:05:18 UTC] Session tax amount: $0
[20-Jul-2025 18:05:18 UTC] Session subtotal: $66
[20-Jul-2025 18:05:18 UTC] Found checkout session line items: 1
[20-Jul-2025 18:05:18 UTC] Line item: llll, Subtotal: 66, Tax: 0, Total: 66
[20-Jul-2025 18:05:19 UTC] Total line items amount: 66, Total tax: 0
[20-Jul-2025 18:05:19 UTC] Creating QBO invoice with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 109
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 66
                    [Description] => llll
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 32
                                )

                            [UnitPrice] => 66
                            [Qty] => 1
                        )

                )

        )

    [TxnDate] => 2025-07-20
    [DueDate] => 2025-07-20
    [TotalAmt] => 66
    [PrivateNote] => Stripe Charge: ch_3Rn1brCDiOqgoJOU1kV4WSM7
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
)

[20-Jul-2025 18:05:19 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 108
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 66
                    [Description] => llll
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 32
                                )

                            [UnitPrice] => 66
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => NON
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-20
    [TotalAmt] => 66
    [PrivateNote] => Stripe Payment Intent ID: pi_3Rn1brCDiOqgoJOU1Gl7ObER
    [PaymentRefNum] => ch_3Rn1brCDiOqgoJOU1kV4WSM7
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[20-Jul-2025 18:05:20 UTC] QBO Invoice API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 687
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-20T11:05:20-07:00
                            [LastModifiedByRef] => Array
                                (
                                    [value] => 123145870265994
                                )

                            [LastUpdatedTime] => 2025-07-20T11:05:20-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1279
                    [TxnDate] => 2025-07-20
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Charge: ch_3Rn1brCDiOqgoJOU1kV4WSM7
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => llll
                                    [Amount] => 66
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 32
                                                    [name] => llll
                                                )

                                            [UnitPrice] => 66
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-09020802-V1-00120000
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 66
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 6.27
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0.5
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 66
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 4.12
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 66
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0.99
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 66
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0.66
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 66
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 109
                            [name] => nhn hnhn(tfvdeds@testtt.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 199
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [DueDate] => 2025-07-20
                    [TotalAmt] => 72.27
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 72.27
                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-20T11:05:19.578-07:00
        )

)

[20-Jul-2025 18:05:20 UTC] Invoice created successfully in QBO. Invoice ID: 687
[20-Jul-2025 18:05:20 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 688
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-20T11:05:20-07:00
                            [LastUpdatedTime] => 2025-07-20T11:05:20-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1280
                    [TxnDate] => 2025-07-20
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3Rn1brCDiOqgoJOU1Gl7ObER
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => llll
                                    [Amount] => 66
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 32
                                                    [name] => llll
                                                )

                                            [UnitPrice] => 66
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => NON
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 66
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 108
                            [name] => nhn hnhn(tfvdeds@testtt.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 200
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 66
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3Rn1brCDiOqgoJOU1kV4WSM7
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-20T11:05:20.037-07:00
        )

)

[20-Jul-2025 18:05:20 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 688
[20-Jul-2025 18:05:20 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[20-Jul-2025 18:05:21 UTC] Failed to create payment method: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Invalid Enumeration
                                    [Detail] => Invalid Enumeration : OTHER
                                    [code] => 2170
                                    [element] => Type
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-20T11:05:20.973-07:00
        )

)

[20-Jul-2025 18:05:21 UTC] Creating QBO payment with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 109
        )

    [TotalAmt] => 66
    [TxnDate] => 2025-07-20
    [PaymentRefNum] => stripe_ch_3Rn1brCDiOq
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [PrivateNote] => Stripe Charge: ch_3Rn1brCDiOqgoJOU1kV4WSM7
    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [Amount] => 66
                    [LinkedTxn] => Array
                        (
                            [0] => Array
                                (
                                    [TxnId] => 687
                                    [TxnType] => Invoice
                                )

                        )

                )

        )

)

[20-Jul-2025 18:05:22 UTC] QBO Payment API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Payment] => Array
                (
                    [CustomerRef] => Array
                        (
                            [value] => 109
                            [name] => nhn hnhn(tfvdeds@testtt.com)
                        )

                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                        )

                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                        )

                    [PaymentRefNum] => stripe_ch_3Rn1brCDiOq
                    [TotalAmt] => 66
                    [UnappliedAmt] => 0
                    [ProcessPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 689
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-20T11:05:22-07:00
                            [LastUpdatedTime] => 2025-07-20T11:05:22-07:00
                        )

                    [TxnDate] => 2025-07-20
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Charge: ch_3Rn1brCDiOqgoJOU1kV4WSM7
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Amount] => 66
                                    [LinkedTxn] => Array
                                        (
                                            [0] => Array
                                                (
                                                    [TxnId] => 687
                                                    [TxnType] => Invoice
                                                )

                                        )

                                    [LineEx] => Array
                                        (
                                            [any] => Array
                                                (
                                                    [0] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnId
                                                                    [Value] => 687
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                    [1] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnOpenBalance
                                                                    [Value] => 72.27
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                    [2] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnReferenceNumber
                                                                    [Value] => 1279
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                )

                                        )

                                )

                        )

                )

            [time] => 2025-07-20T11:05:21.536-07:00
        )

)

[20-Jul-2025 18:05:22 UTC] Payment created successfully in QBO. Payment ID: 689
[20-Jul-2025 18:05:22 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[20-Jul-2025 18:18:54 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rn1p1CDiOqgoJOU1b56lh6A)
[20-Jul-2025 18:18:54 UTC] Stripe Webhook Received: charge.succeeded (ID: evt_3Rn1p1CDiOqgoJOU17IIAobp)
[20-Jul-2025 18:18:54 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[20-Jul-2025 18:18:54 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[20-Jul-2025 18:18:54 UTC] Starting charge processing for Stripe charge: evt_3Rn1p1CDiOqgoJOU17IIAobp
[20-Jul-2025 18:18:54 UTC] Starting sales receipt creation process for event: evt_3Rn1p1CDiOqgoJOU1b56lh6A
[20-Jul-2025 18:18:54 UTC] No customer email in charge details, trying to get from invoice
[20-Jul-2025 18:18:54 UTC] Payment creation failed: Customer email is required but missing
[20-Jul-2025 18:18:54 UTC] Sales receipt creation failed: Customer email is required but missing
[20-Jul-2025 18:18:54 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:484
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(50): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 484
[20-Jul-2025 18:18:54 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[21-Jul-2025 05:00:45 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RnBqCCDiOqgoJOU18nzErsm)
[21-Jul-2025 05:00:45 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[21-Jul-2025 05:00:45 UTC] Starting sales receipt creation process for event: evt_3RnBqCCDiOqgoJOU18nzErsm
[21-Jul-2025 05:00:45 UTC] No customer email in charge details, trying to get from invoice
[21-Jul-2025 05:00:45 UTC] Sales receipt creation failed: Customer email is required but missing
[21-Jul-2025 05:00:45 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:484
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(50): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 484
[21-Jul-2025 05:00:46 UTC] Stripe Webhook Received: charge.succeeded (ID: evt_3RnBqCCDiOqgoJOU1FKJdwNz)
[21-Jul-2025 05:00:46 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[21-Jul-2025 05:00:46 UTC] Starting charge processing for Stripe charge: evt_3RnBqCCDiOqgoJOU1FKJdwNz
[21-Jul-2025 05:00:46 UTC] Payment creation failed: Customer email is required but missing
[21-Jul-2025 05:00:46 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[21-Jul-2025 05:19:58 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RnBqCCDiOqgoJOU18nzErsm)
[21-Jul-2025 05:19:58 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[21-Jul-2025 05:19:58 UTC] Starting sales receipt creation process for event: evt_3RnBqCCDiOqgoJOU18nzErsm
[21-Jul-2025 05:19:58 UTC] No customer email in charge details, trying to get from invoice
[21-Jul-2025 05:19:58 UTC] Sales receipt creation failed: Customer email is required but missing
[21-Jul-2025 05:19:58 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:484
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(50): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 484
[21-Jul-2025 07:53:06 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RnBqCCDiOqgoJOU18nzErsm)
[21-Jul-2025 07:53:06 UTC] PHP Fatal error:  Cannot redeclare get_stripe_customer() (previously declared in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php:79) in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 640
[21-Jul-2025 07:53:57 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RnBqCCDiOqgoJOU18nzErsm)
[21-Jul-2025 07:53:57 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[21-Jul-2025 07:53:57 UTC] Starting sales receipt creation process for event: evt_3RnBqCCDiOqgoJOU18nzErsm
[21-Jul-2025 07:53:57 UTC] No customer email in charge details, trying to get from invoice
[21-Jul-2025 07:53:57 UTC] No customer details found yet, trying to fetch directly from Stripe using customer ID
[21-Jul-2025 07:53:57 UTC] Found customer details directly from Stripe: ratulbinhasan.integration@gmail.com
[21-Jul-2025 07:53:58 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 67.27
                                    [BalanceWithJobs] => 67.27
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 105
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-15T23:59:14-07:00
                                            [LastUpdatedTime] => 2025-07-20T10:59:57-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt testt
                                    [DisplayName] => testt testt
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098127805f7fa6e41dea97e908749fd2b9e
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratulbinhasan.integration@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-21T00:53:58.328-07:00
        )

)

[21-Jul-2025 07:53:58 UTC] Using QBO customer ID: 105
[21-Jul-2025 07:53:58 UTC] No Checkout Session found for Payment Intent: pi_3RnBqCCDiOqgoJOU1H48LvaN
[21-Jul-2025 07:53:58 UTC] No line items found from checkout session, trying to get from invoice
[21-Jul-2025 07:53:58 UTC] No line items found from checkout session or invoice, using default line item
[21-Jul-2025 07:54:00 UTC] Created default 'Stripe Payment' item
[21-Jul-2025 07:54:01 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 105
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 44
                    [Description] => test payment
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 33
                                )

                            [UnitPrice] => 44
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => NON
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-21
    [TotalAmt] => 44
    [PrivateNote] => Stripe Payment Intent ID: pi_3RnBqCCDiOqgoJOU1H48LvaN
    [PaymentRefNum] => ch_3RnBqCCDiOqgoJOU1p4AwhBp
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[21-Jul-2025 07:54:02 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 690
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-21T00:54:02-07:00
                            [LastUpdatedTime] => 2025-07-21T00:54:02-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1281
                    [TxnDate] => 2025-07-21
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3RnBqCCDiOqgoJOU1H48LvaN
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => test payment
                                    [Amount] => 44
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 33
                                                    [name] => Stripe Payment
                                                )

                                            [UnitPrice] => 44
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => NON
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 44
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 105
                            [name] => testt testt
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 201
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 44
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3RnBqCCDiOqgoJOU1p4AwhBp
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-21T00:54:01.379-07:00
        )

)

[21-Jul-2025 07:54:02 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 690
[21-Jul-2025 07:54:02 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[21-Jul-2025 07:55:52 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rn0xlCDiOqgoJOU1iE2dmvz)
[21-Jul-2025 07:55:52 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[21-Jul-2025 07:55:52 UTC] Starting sales receipt creation process for event: evt_3Rn0xlCDiOqgoJOU1iE2dmvz
[21-Jul-2025 07:55:52 UTC] No customer email in charge details, trying to get from invoice
[21-Jul-2025 07:55:52 UTC] No customer details found yet, trying to fetch directly from Stripe using customer ID
[21-Jul-2025 07:55:52 UTC] Found customer details directly from Stripe: ratulbinhasan.integration@gmail.com
[21-Jul-2025 07:55:53 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 67.27
                                    [BalanceWithJobs] => 67.27
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 105
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-15T23:59:14-07:00
                                            [LastUpdatedTime] => 2025-07-20T10:59:57-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt testt
                                    [DisplayName] => testt testt
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098127805f7fa6e41dea97e908749fd2b9e
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratulbinhasan.integration@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-21T00:55:53.202-07:00
        )

)

[21-Jul-2025 07:55:53 UTC] Using QBO customer ID: 105
[21-Jul-2025 07:55:53 UTC] No Checkout Session found for Payment Intent: pi_3Rn0xlCDiOqgoJOU1nzMQ5SV
[21-Jul-2025 07:55:53 UTC] No line items found from checkout session, trying to get from invoice
[21-Jul-2025 07:55:53 UTC] No line items found from checkout session or invoice, using default line item
[21-Jul-2025 07:55:54 UTC] Using default 'Stripe Payment' item
[21-Jul-2025 07:55:55 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 105
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 15
                    [Description] => Invoice RPYUF7UP-0012
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 33
                                )

                            [UnitPrice] => 15
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => NON
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-20
    [TotalAmt] => 15
    [PrivateNote] => Stripe Payment Intent ID: pi_3Rn0xlCDiOqgoJOU1nzMQ5SV
    [PaymentRefNum] => ch_3Rn0xlCDiOqgoJOU1tR3VX2Z
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[21-Jul-2025 07:55:56 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 691
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-21T00:55:55-07:00
                            [LastUpdatedTime] => 2025-07-21T00:55:55-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1282
                    [TxnDate] => 2025-07-20
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3Rn0xlCDiOqgoJOU1nzMQ5SV
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => Invoice RPYUF7UP-0012
                                    [Amount] => 15
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 33
                                                    [name] => Stripe Payment
                                                )

                                            [UnitPrice] => 15
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => NON
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 15
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 105
                            [name] => testt testt
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 202
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 15
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3Rn0xlCDiOqgoJOU1tR3VX2Z
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-21T00:55:55.288-07:00
        )

)

[21-Jul-2025 07:55:56 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 691
[21-Jul-2025 07:55:56 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[21-Jul-2025 07:57:52 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rn0xlCDiOqgoJOU1iE2dmvz)
[21-Jul-2025 07:57:52 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[21-Jul-2025 07:57:52 UTC] Starting sales receipt creation process for event: evt_3Rn0xlCDiOqgoJOU1iE2dmvz
[21-Jul-2025 07:57:52 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[21-Jul-2025 07:57:52 UTC] Payment intent already processed. QBO Sales Receipt ID: 691
[21-Jul-2025 07:58:01 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RnBqCCDiOqgoJOU18nzErsm)
[21-Jul-2025 07:58:01 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[21-Jul-2025 07:58:01 UTC] Starting sales receipt creation process for event: evt_3RnBqCCDiOqgoJOU18nzErsm
[21-Jul-2025 07:58:01 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[21-Jul-2025 07:58:01 UTC] Payment intent already processed. QBO Sales Receipt ID: 690
[21-Jul-2025 07:58:44 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RnBqCCDiOqgoJOU18nzErsm)
[21-Jul-2025 07:58:44 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[21-Jul-2025 07:58:44 UTC] Starting sales receipt creation process for event: evt_3RnBqCCDiOqgoJOU18nzErsm
[21-Jul-2025 07:58:44 UTC] No customer email in charge details, trying to get from invoice
[21-Jul-2025 07:58:44 UTC] No customer details found yet, trying to fetch directly from Stripe using customer ID
[21-Jul-2025 07:58:44 UTC] Found customer details directly from Stripe: ratulbinhasan.integration@gmail.com
[21-Jul-2025 07:58:45 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 72
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-20T01:49:53-07:00
                                            [LastUpdatedTime] => 2025-07-20T01:49:53-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt(ratulbinhasan.integration@gmail.com)
                                    [DisplayName] => testt(ratulbinhasan.integration@gmail.com)
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 00209983ece7696ea041089f54f9433e7aaf36
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratulbinhasan.integration@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-21T00:58:45.541-07:00
        )

)

[21-Jul-2025 07:58:45 UTC] Using QBO customer ID: 72
[21-Jul-2025 07:58:45 UTC] No Checkout Session found for Payment Intent: pi_3RnBqCCDiOqgoJOU1H48LvaN
[21-Jul-2025 07:58:45 UTC] No line items found from checkout session, trying to get from invoice
[21-Jul-2025 07:58:45 UTC] No line items found from checkout session or invoice, using default line item
[21-Jul-2025 07:58:47 UTC] Created default 'Stripe Payment' item
[21-Jul-2025 07:58:47 UTC] Using tax exempt ID from sync settings: 4
[21-Jul-2025 07:58:48 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 72
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 44
                    [Description] => test payment
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 31
                                )

                            [UnitPrice] => 44
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => 4
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-21
    [TotalAmt] => 44
    [PrivateNote] => Stripe Payment Intent ID: pi_3RnBqCCDiOqgoJOU1H48LvaN
    [PaymentRefNum] => ch_3RnBqCCDiOqgoJOU1p4AwhBp
    [PaymentMethodRef] => Array
        (
            [value] => 3
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [DepositToAccountRef] => Array
        (
            [value] => 108
        )

)

[21-Jul-2025 07:58:49 UTC] QBO API response: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => A business validation error has occurred while processing your request
                                    [Detail] => Business Validation Error: Were sorry, QuickBooks encountered an error while calculating tax. Try reselecting the tax rate or reentering the product/service item and saving the form again.
                                    [code] => 6000
                                    [element] => 
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-21T00:58:48.849-07:00
        )

)

[21-Jul-2025 07:58:49 UTC] Sales receipt creation failed: Failed to create sales receipt in QuickBooks
[21-Jul-2025 07:58:49 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[21-Jul-2025 07:59:06 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rn0xlCDiOqgoJOU1iE2dmvz)
[21-Jul-2025 07:59:06 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[21-Jul-2025 07:59:06 UTC] Starting sales receipt creation process for event: evt_3Rn0xlCDiOqgoJOU1iE2dmvz
[21-Jul-2025 07:59:06 UTC] No customer email in charge details, trying to get from invoice
[21-Jul-2025 07:59:06 UTC] No customer details found yet, trying to fetch directly from Stripe using customer ID
[21-Jul-2025 07:59:06 UTC] Found customer details directly from Stripe: ratulbinhasan.integration@gmail.com
[21-Jul-2025 07:59:06 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 72
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-20T01:49:53-07:00
                                            [LastUpdatedTime] => 2025-07-20T01:49:53-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt(ratulbinhasan.integration@gmail.com)
                                    [DisplayName] => testt(ratulbinhasan.integration@gmail.com)
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 00209983ece7696ea041089f54f9433e7aaf36
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratulbinhasan.integration@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-21T00:59:06.864-07:00
        )

)

[21-Jul-2025 07:59:06 UTC] Using QBO customer ID: 72
[21-Jul-2025 07:59:07 UTC] No Checkout Session found for Payment Intent: pi_3Rn0xlCDiOqgoJOU1nzMQ5SV
[21-Jul-2025 07:59:07 UTC] No line items found from checkout session, trying to get from invoice
[21-Jul-2025 07:59:07 UTC] No line items found from checkout session or invoice, using default line item
[21-Jul-2025 07:59:07 UTC] Using default 'Stripe Payment' item
[21-Jul-2025 07:59:08 UTC] Using tax exempt ID from sync settings: 4
[21-Jul-2025 07:59:08 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 72
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 15
                    [Description] => Invoice RPYUF7UP-0012
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 31
                                )

                            [UnitPrice] => 15
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => 4
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-20
    [TotalAmt] => 15
    [PrivateNote] => Stripe Payment Intent ID: pi_3Rn0xlCDiOqgoJOU1nzMQ5SV
    [PaymentRefNum] => ch_3Rn0xlCDiOqgoJOU1tR3VX2Z
    [PaymentMethodRef] => Array
        (
            [value] => 3
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [DepositToAccountRef] => Array
        (
            [value] => 108
        )

)

[21-Jul-2025 07:59:09 UTC] QBO API response: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => A business validation error has occurred while processing your request
                                    [Detail] => Business Validation Error: Were sorry, QuickBooks encountered an error while calculating tax. Try reselecting the tax rate or reentering the product/service item and saving the form again.
                                    [code] => 6000
                                    [element] => 
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-21T00:59:09.180-07:00
        )

)

[21-Jul-2025 07:59:09 UTC] Sales receipt creation failed: Failed to create sales receipt in QuickBooks
[21-Jul-2025 07:59:09 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[21-Jul-2025 08:02:54 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rn0xlCDiOqgoJOU1iE2dmvz)
[21-Jul-2025 08:02:54 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[21-Jul-2025 08:02:54 UTC] Starting sales receipt creation process for event: evt_3Rn0xlCDiOqgoJOU1iE2dmvz
[21-Jul-2025 08:02:54 UTC] No customer email in charge details, trying to get from invoice
[21-Jul-2025 08:02:54 UTC] No customer details found yet, trying to fetch directly from Stripe using customer ID
[21-Jul-2025 08:02:55 UTC] Found customer details directly from Stripe: ratulbinhasan.integration@gmail.com
[21-Jul-2025 08:02:55 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 72
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-20T01:49:53-07:00
                                            [LastUpdatedTime] => 2025-07-20T01:49:53-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt(ratulbinhasan.integration@gmail.com)
                                    [DisplayName] => testt(ratulbinhasan.integration@gmail.com)
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 00209983ece7696ea041089f54f9433e7aaf36
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratulbinhasan.integration@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-21T01:02:55.433-07:00
        )

)

[21-Jul-2025 08:02:55 UTC] Using QBO customer ID: 72
[21-Jul-2025 08:02:55 UTC] No Checkout Session found for Payment Intent: pi_3Rn0xlCDiOqgoJOU1nzMQ5SV
[21-Jul-2025 08:02:55 UTC] No line items found from checkout session, trying to get from invoice
[21-Jul-2025 08:02:55 UTC] No line items found from checkout session or invoice, using default line item
[21-Jul-2025 08:02:56 UTC] Using default 'Stripe Payment' item
[21-Jul-2025 08:02:56 UTC] Using tax exempt ID from sync settings: 8
[21-Jul-2025 08:02:57 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 72
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 15
                    [Description] => Invoice RPYUF7UP-0012
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 31
                                )

                            [UnitPrice] => 15
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => 8
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-20
    [TotalAmt] => 15
    [PrivateNote] => Stripe Payment Intent ID: pi_3Rn0xlCDiOqgoJOU1nzMQ5SV
    [PaymentRefNum] => ch_3Rn0xlCDiOqgoJOU1tR3VX2Z
    [PaymentMethodRef] => Array
        (
            [value] => 3
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [DepositToAccountRef] => Array
        (
            [value] => 108
        )

)

[21-Jul-2025 08:02:57 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 220
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-21T01:02:58-07:00
                            [LastUpdatedTime] => 2025-07-21T01:02:58-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-07-20
                    [CurrencyRef] => Array
                        (
                            [value] => AUD
                            [name] => Australian Dollar
                        )

                    [ExchangeRate] => 1
                    [PrivateNote] => Stripe Payment Intent ID: pi_3Rn0xlCDiOqgoJOU1nzMQ5SV
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => Invoice RPYUF7UP-0012
                                    [Amount] => 15
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 31
                                                    [name] => Stripe Payment
                                                )

                                            [UnitPrice] => 15
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 81
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => 8
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 15
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0
                                                    [NetAmountTaxable] => 15
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 72
                            [name] => testt(ratulbinhasan.integration@gmail.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 80
                            [Line1] => 2500 Garcia Ave
                            [Line2] => Sydney NSW  2050
                        )

                    [GlobalTaxCalculation] => TaxExcluded
                    [TotalAmt] => 15
                    [HomeTotalAmt] => 15
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [HomeBalance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 3
                            [name] => Credit Card
                        )

                    [PaymentRefNum] => ch_3Rn0xlCDiOqgoJOU1tR3VX2Z
                    [DepositToAccountRef] => Array
                        (
                            [value] => 108
                            [name] => Undeposited Funds
                        )

                )

            [time] => 2025-07-21T01:02:57.536-07:00
        )

)

[21-Jul-2025 08:02:57 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 220
[21-Jul-2025 08:02:57 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[21-Jul-2025 08:03:02 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RnBqCCDiOqgoJOU18nzErsm)
[21-Jul-2025 08:03:02 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[21-Jul-2025 08:03:02 UTC] Starting sales receipt creation process for event: evt_3RnBqCCDiOqgoJOU18nzErsm
[21-Jul-2025 08:03:02 UTC] No customer email in charge details, trying to get from invoice
[21-Jul-2025 08:03:02 UTC] No customer details found yet, trying to fetch directly from Stripe using customer ID
[21-Jul-2025 08:03:03 UTC] Found customer details directly from Stripe: ratulbinhasan.integration@gmail.com
[21-Jul-2025 08:03:03 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 72
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-20T01:49:53-07:00
                                            [LastUpdatedTime] => 2025-07-20T01:49:53-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt(ratulbinhasan.integration@gmail.com)
                                    [DisplayName] => testt(ratulbinhasan.integration@gmail.com)
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 00209983ece7696ea041089f54f9433e7aaf36
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratulbinhasan.integration@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-21T01:03:03.400-07:00
        )

)

[21-Jul-2025 08:03:03 UTC] Using QBO customer ID: 72
[21-Jul-2025 08:03:03 UTC] No Checkout Session found for Payment Intent: pi_3RnBqCCDiOqgoJOU1H48LvaN
[21-Jul-2025 08:03:03 UTC] No line items found from checkout session, trying to get from invoice
[21-Jul-2025 08:03:03 UTC] No line items found from checkout session or invoice, using default line item
[21-Jul-2025 08:03:04 UTC] Using default 'Stripe Payment' item
[21-Jul-2025 08:03:04 UTC] Using tax exempt ID from sync settings: 8
[21-Jul-2025 08:03:05 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 72
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 44
                    [Description] => test payment
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 31
                                )

                            [UnitPrice] => 44
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => 8
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-21
    [TotalAmt] => 44
    [PrivateNote] => Stripe Payment Intent ID: pi_3RnBqCCDiOqgoJOU1H48LvaN
    [PaymentRefNum] => ch_3RnBqCCDiOqgoJOU1p4AwhBp
    [PaymentMethodRef] => Array
        (
            [value] => 3
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [DepositToAccountRef] => Array
        (
            [value] => 108
        )

)

[21-Jul-2025 08:03:05 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 221
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-21T01:03:06-07:00
                            [LastUpdatedTime] => 2025-07-21T01:03:06-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-07-21
                    [CurrencyRef] => Array
                        (
                            [value] => AUD
                            [name] => Australian Dollar
                        )

                    [ExchangeRate] => 1
                    [PrivateNote] => Stripe Payment Intent ID: pi_3RnBqCCDiOqgoJOU1H48LvaN
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => test payment
                                    [Amount] => 44
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 31
                                                    [name] => Stripe Payment
                                                )

                                            [UnitPrice] => 44
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 81
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => 8
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 44
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0
                                                    [NetAmountTaxable] => 44
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 72
                            [name] => testt(ratulbinhasan.integration@gmail.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 81
                            [Line1] => 2500 Garcia Ave
                            [Line2] => Sydney NSW  2050
                        )

                    [GlobalTaxCalculation] => TaxExcluded
                    [TotalAmt] => 44
                    [HomeTotalAmt] => 44
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [HomeBalance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 3
                            [name] => Credit Card
                        )

                    [PaymentRefNum] => ch_3RnBqCCDiOqgoJOU1p4AwhBp
                    [DepositToAccountRef] => Array
                        (
                            [value] => 108
                            [name] => Undeposited Funds
                        )

                )

            [time] => 2025-07-21T01:03:05.505-07:00
        )

)

[21-Jul-2025 08:03:05 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 221
[21-Jul-2025 08:03:05 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[21-Jul-2025 08:08:27 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rn0omCDiOqgoJOU0Jdq6VOz)
[21-Jul-2025 08:08:27 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[21-Jul-2025 08:08:27 UTC] Starting sales receipt creation process for event: evt_3Rn0omCDiOqgoJOU0Jdq6VOz
[21-Jul-2025 08:08:27 UTC] No customer email in charge details, trying to get from invoice
[21-Jul-2025 08:08:28 UTC] Found customer details from invoice: ratulbinhasan.integration@gmail.com
[21-Jul-2025 08:08:29 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 72
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-20T01:49:53-07:00
                                            [LastUpdatedTime] => 2025-07-20T01:49:53-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt(ratulbinhasan.integration@gmail.com)
                                    [DisplayName] => testt(ratulbinhasan.integration@gmail.com)
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 00209983ece7696ea041089f54f9433e7aaf36
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratulbinhasan.integration@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-21T01:08:29.141-07:00
        )

)

[21-Jul-2025 08:08:29 UTC] Using QBO customer ID: 72
[21-Jul-2025 08:08:29 UTC] No Checkout Session found for Payment Intent: pi_3Rn0omCDiOqgoJOU0CKszRxP
[21-Jul-2025 08:08:29 UTC] No line items found from checkout session, trying to get from invoice
[21-Jul-2025 08:08:29 UTC] Found invoice line items: 2
[21-Jul-2025 08:08:29 UTC] Using tax_percent from invoice: 11%
[21-Jul-2025 08:08:30 UTC] Found tax code for 11%: 11
[21-Jul-2025 08:08:31 UTC] Found tax code for 11%: 11
[21-Jul-2025 08:08:32 UTC] Found tax code for 11%: 11
[21-Jul-2025 08:08:32 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 72
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 293.7
                    [Description] => llll
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 30
                                )

                            [UnitPrice] => 58.74
                            [Qty] => 5
                            [TaxCodeRef] => Array
                                (
                                    [value] => 11
                                )

                        )

                )

            [1] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 861.52
                    [Description] => losttt
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 29
                                )

                            [UnitPrice] => 39.16
                            [Qty] => 22
                            [TaxCodeRef] => Array
                                (
                                    [value] => 11
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-20
    [TotalAmt] => 1440.78
    [PrivateNote] => Stripe Payment Intent ID: pi_3Rn0omCDiOqgoJOU0CKszRxP
    [PaymentRefNum] => ch_3Rn0omCDiOqgoJOU0Lr9v729
    [PaymentMethodRef] => Array
        (
            [value] => 3
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => 11
                )

            [TotalTax] => 142.78
        )

    [DepositToAccountRef] => Array
        (
            [value] => 108
        )

)

[21-Jul-2025 08:08:33 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 222
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-21T01:08:33-07:00
                            [LastUpdatedTime] => 2025-07-21T01:08:33-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-07-20
                    [CurrencyRef] => Array
                        (
                            [value] => AUD
                            [name] => Australian Dollar
                        )

                    [ExchangeRate] => 1
                    [PrivateNote] => Stripe Payment Intent ID: pi_3Rn0omCDiOqgoJOU0CKszRxP
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => llll
                                    [Amount] => 293.7
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 30
                                                    [name] => llll
                                                )

                                            [UnitPrice] => 58.74
                                            [Qty] => 5
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 81
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => 11
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Id] => 2
                                    [LineNum] => 2
                                    [Description] => losttt
                                    [Amount] => 861.52
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 29
                                                    [name] => losttt
                                                )

                                            [UnitPrice] => 39.16
                                            [Qty] => 22
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 81
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => 11
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [2] => Array
                                (
                                    [Amount] => 1155.22
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 127.08
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 127.08
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 21
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 11
                                                    [NetAmountTaxable] => 1155.22
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 72
                            [name] => testt(ratulbinhasan.integration@gmail.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 82
                            [Line1] => 2500 Garcia Ave
                            [Line2] => Sydney NSW  2050
                        )

                    [GlobalTaxCalculation] => TaxExcluded
                    [TotalAmt] => 1282.3
                    [HomeTotalAmt] => 1282.3
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [HomeBalance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 3
                            [name] => Credit Card
                        )

                    [PaymentRefNum] => ch_3Rn0omCDiOqgoJOU0Lr9v729
                    [DepositToAccountRef] => Array
                        (
                            [value] => 108
                            [name] => Undeposited Funds
                        )

                )

            [time] => 2025-07-21T01:08:32.836-07:00
        )

)

[21-Jul-2025 08:08:33 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 222
[21-Jul-2025 08:08:33 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[21-Jul-2025 08:26:17 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rn0xlCDiOqgoJOU1iE2dmvz)
[21-Jul-2025 08:26:17 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[21-Jul-2025 08:26:17 UTC] Starting sales receipt creation process for event: evt_3Rn0xlCDiOqgoJOU1iE2dmvz
[21-Jul-2025 08:26:17 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[21-Jul-2025 08:26:17 UTC] Payment intent already processed. QBO Sales Receipt ID: 220
[21-Jul-2025 08:26:27 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rn0omCDiOqgoJOU0Jdq6VOz)
[21-Jul-2025 08:26:27 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[21-Jul-2025 08:26:27 UTC] Starting sales receipt creation process for event: evt_3Rn0omCDiOqgoJOU0Jdq6VOz
[21-Jul-2025 08:26:27 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[21-Jul-2025 08:26:27 UTC] Payment intent already processed. QBO Sales Receipt ID: 222
[21-Jul-2025 08:26:29 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rn0xOCDiOqgoJOU1fn5AV9M)
[21-Jul-2025 08:26:29 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[21-Jul-2025 08:26:29 UTC] Starting sales receipt creation process for event: evt_3Rn0xOCDiOqgoJOU1fn5AV9M
[21-Jul-2025 08:26:29 UTC] No customer email in charge details, trying to get from invoice
[21-Jul-2025 08:26:29 UTC] Found customer details from invoice: ratulbinhasan.integration@gmail.com
[21-Jul-2025 08:26:30 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 72
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-20T01:49:53-07:00
                                            [LastUpdatedTime] => 2025-07-20T01:49:53-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt(ratulbinhasan.integration@gmail.com)
                                    [DisplayName] => testt(ratulbinhasan.integration@gmail.com)
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 00209983ece7696ea041089f54f9433e7aaf36
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratulbinhasan.integration@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-21T01:26:30.466-07:00
        )

)

[21-Jul-2025 08:26:30 UTC] Using QBO customer ID: 72
[21-Jul-2025 08:26:30 UTC] No Checkout Session found for Payment Intent: pi_3Rn0xOCDiOqgoJOU1K3HdICA
[21-Jul-2025 08:26:30 UTC] No line items found from checkout session, trying to get from invoice
[21-Jul-2025 08:26:31 UTC] Found invoice line items: 1
[21-Jul-2025 08:26:31 UTC] Using tax_percent from invoice: 9.125%
[21-Jul-2025 08:26:31 UTC] No tax code found for 9.13%, using default non-taxable
[21-Jul-2025 08:26:32 UTC] Using tax exempt ID from sync settings: 8
[21-Jul-2025 08:26:33 UTC] No tax code found for 9.13%, using default non-taxable
[21-Jul-2025 08:26:33 UTC] Using tax exempt ID from sync settings: 8
[21-Jul-2025 08:26:33 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 72
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 59.9775
                    [Description] => llll
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 30
                                )

                            [UnitPrice] => 59.9775
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => 8
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-20
    [TotalAmt] => 51
    [PrivateNote] => Stripe Payment Intent ID: pi_3Rn0xOCDiOqgoJOU1K3HdICA
    [PaymentRefNum] => ch_3Rn0xOCDiOqgoJOU14259SDC
    [PaymentMethodRef] => Array
        (
            [value] => 3
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => 8
                )

            [TotalTax] => 6.0225
        )

    [DepositToAccountRef] => Array
        (
            [value] => 108
        )

)

[21-Jul-2025 08:26:33 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RnBqCCDiOqgoJOU18nzErsm)
[21-Jul-2025 08:26:33 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[21-Jul-2025 08:26:33 UTC] Starting sales receipt creation process for event: evt_3RnBqCCDiOqgoJOU18nzErsm
[21-Jul-2025 08:26:33 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[21-Jul-2025 08:26:33 UTC] Payment intent already processed. QBO Sales Receipt ID: 221
[21-Jul-2025 08:26:34 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 223
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-21T01:26:34-07:00
                            [LastUpdatedTime] => 2025-07-21T01:26:34-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-07-20
                    [CurrencyRef] => Array
                        (
                            [value] => AUD
                            [name] => Australian Dollar
                        )

                    [ExchangeRate] => 1
                    [PrivateNote] => Stripe Payment Intent ID: pi_3Rn0xOCDiOqgoJOU1K3HdICA
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => llll
                                    [Amount] => 59.98
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 30
                                                    [name] => llll
                                                )

                                            [UnitPrice] => 59.9775
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 81
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => 8
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 59.98
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0
                                                    [NetAmountTaxable] => 59.98
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 72
                            [name] => testt(ratulbinhasan.integration@gmail.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 83
                            [Line1] => 2500 Garcia Ave
                            [Line2] => Sydney NSW  2050
                        )

                    [GlobalTaxCalculation] => TaxExcluded
                    [TotalAmt] => 59.98
                    [HomeTotalAmt] => 59.98
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [HomeBalance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 3
                            [name] => Credit Card
                        )

                    [PaymentRefNum] => ch_3Rn0xOCDiOqgoJOU14259SDC
                    [DepositToAccountRef] => Array
                        (
                            [value] => 108
                            [name] => Undeposited Funds
                        )

                )

            [time] => 2025-07-21T01:26:34.116-07:00
        )

)

[21-Jul-2025 08:26:34 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 223
[21-Jul-2025 08:26:34 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[21-Jul-2025 08:29:56 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RnBqCCDiOqgoJOU18nzErsm)
[21-Jul-2025 08:29:56 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[21-Jul-2025 08:29:56 UTC] Starting sales receipt creation process for event: evt_3RnBqCCDiOqgoJOU18nzErsm
[21-Jul-2025 08:29:56 UTC] No customer email in charge details, trying to get from invoice
[21-Jul-2025 08:29:56 UTC] No customer details found yet, trying to fetch directly from Stripe using customer ID
[21-Jul-2025 08:29:56 UTC] Found customer details directly from Stripe: ratulbinhasan.integration@gmail.com
[21-Jul-2025 08:29:57 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 72
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-20T01:49:53-07:00
                                            [LastUpdatedTime] => 2025-07-20T01:49:53-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt(ratulbinhasan.integration@gmail.com)
                                    [DisplayName] => testt(ratulbinhasan.integration@gmail.com)
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 00209983ece7696ea041089f54f9433e7aaf36
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratulbinhasan.integration@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-21T01:29:57.031-07:00
        )

)

[21-Jul-2025 08:29:57 UTC] Using QBO customer ID: 72
[21-Jul-2025 08:29:57 UTC] No Checkout Session found for Payment Intent: pi_3RnBqCCDiOqgoJOU1H48LvaN
[21-Jul-2025 08:29:57 UTC] No line items found from checkout session, trying to get from invoice
[21-Jul-2025 08:29:57 UTC] No line items found from checkout session or invoice, using default line item
[21-Jul-2025 08:29:58 UTC] Using default 'Stripe Payment' item
[21-Jul-2025 08:29:58 UTC] Using tax exempt ID from sync settings: 8
[21-Jul-2025 08:29:58 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 72
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 44
                    [Description] => test payment
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 31
                                )

                            [UnitPrice] => 44
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => 8
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-21
    [TotalAmt] => 44
    [PrivateNote] => Stripe Payment Intent ID: pi_3RnBqCCDiOqgoJOU1H48LvaN
    [PaymentRefNum] => ch_3RnBqCCDiOqgoJOU1p4AwhBp
    [PaymentMethodRef] => Array
        (
            [value] => 3
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [DepositToAccountRef] => Array
        (
            [value] => 108
        )

)

[21-Jul-2025 08:29:59 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 224
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-21T01:29:59-07:00
                            [LastUpdatedTime] => 2025-07-21T01:29:59-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-07-21
                    [CurrencyRef] => Array
                        (
                            [value] => AUD
                            [name] => Australian Dollar
                        )

                    [ExchangeRate] => 1
                    [PrivateNote] => Stripe Payment Intent ID: pi_3RnBqCCDiOqgoJOU1H48LvaN
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => test payment
                                    [Amount] => 44
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 31
                                                    [name] => Stripe Payment
                                                )

                                            [UnitPrice] => 44
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 81
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => 8
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 44
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0
                                                    [NetAmountTaxable] => 44
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 72
                            [name] => testt(ratulbinhasan.integration@gmail.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 84
                            [Line1] => 2500 Garcia Ave
                            [Line2] => Sydney NSW  2050
                        )

                    [GlobalTaxCalculation] => TaxExcluded
                    [TotalAmt] => 44
                    [HomeTotalAmt] => 44
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [HomeBalance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 3
                            [name] => Credit Card
                        )

                    [PaymentRefNum] => ch_3RnBqCCDiOqgoJOU1p4AwhBp
                    [DepositToAccountRef] => Array
                        (
                            [value] => 108
                            [name] => Undeposited Funds
                        )

                )

            [time] => 2025-07-21T01:29:59.147-07:00
        )

)

[21-Jul-2025 08:29:59 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 224
[21-Jul-2025 08:29:59 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[21-Jul-2025 08:30:01 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rn0xOCDiOqgoJOU1fn5AV9M)
[21-Jul-2025 08:30:01 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[21-Jul-2025 08:30:01 UTC] Starting sales receipt creation process for event: evt_3Rn0xOCDiOqgoJOU1fn5AV9M
[21-Jul-2025 08:30:01 UTC] No customer email in charge details, trying to get from invoice
[21-Jul-2025 08:30:02 UTC] Found customer details from invoice: ratulbinhasan.integration@gmail.com
[21-Jul-2025 08:30:02 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 72
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-20T01:49:53-07:00
                                            [LastUpdatedTime] => 2025-07-20T01:49:53-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt(ratulbinhasan.integration@gmail.com)
                                    [DisplayName] => testt(ratulbinhasan.integration@gmail.com)
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 00209983ece7696ea041089f54f9433e7aaf36
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratulbinhasan.integration@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-21T01:30:02.754-07:00
        )

)

[21-Jul-2025 08:30:02 UTC] Using QBO customer ID: 72
[21-Jul-2025 08:30:03 UTC] No Checkout Session found for Payment Intent: pi_3Rn0xOCDiOqgoJOU1K3HdICA
[21-Jul-2025 08:30:03 UTC] No line items found from checkout session, trying to get from invoice
[21-Jul-2025 08:30:03 UTC] Found invoice line items: 1
[21-Jul-2025 08:30:03 UTC] Using tax_percent from invoice: 9.125%
[21-Jul-2025 08:30:04 UTC] No tax code found for 9.13%, using default non-taxable
[21-Jul-2025 08:30:04 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rn0xlCDiOqgoJOU1iE2dmvz)
[21-Jul-2025 08:30:04 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[21-Jul-2025 08:30:04 UTC] Starting sales receipt creation process for event: evt_3Rn0xlCDiOqgoJOU1iE2dmvz
[21-Jul-2025 08:30:04 UTC] No customer email in charge details, trying to get from invoice
[21-Jul-2025 08:30:04 UTC] No customer details found yet, trying to fetch directly from Stripe using customer ID
[21-Jul-2025 08:30:04 UTC] Using tax exempt ID from sync settings: 8
[21-Jul-2025 08:30:05 UTC] Found customer details directly from Stripe: ratulbinhasan.integration@gmail.com
[21-Jul-2025 08:30:05 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 72
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-20T01:49:53-07:00
                                            [LastUpdatedTime] => 2025-07-20T01:49:53-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt(ratulbinhasan.integration@gmail.com)
                                    [DisplayName] => testt(ratulbinhasan.integration@gmail.com)
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 00209983ece7696ea041089f54f9433e7aaf36
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratulbinhasan.integration@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-21T01:30:05.518-07:00
        )

)

[21-Jul-2025 08:30:05 UTC] Using QBO customer ID: 72
[21-Jul-2025 08:30:05 UTC] No tax code found for 9.13%, using default non-taxable
[21-Jul-2025 08:30:05 UTC] No Checkout Session found for Payment Intent: pi_3Rn0xlCDiOqgoJOU1nzMQ5SV
[21-Jul-2025 08:30:05 UTC] No line items found from checkout session, trying to get from invoice
[21-Jul-2025 08:30:05 UTC] No line items found from checkout session or invoice, using default line item
[21-Jul-2025 08:30:06 UTC] Using tax exempt ID from sync settings: 8
[21-Jul-2025 08:30:06 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 72
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 59.9775
                    [Description] => llll
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 30
                                )

                            [UnitPrice] => 59.9775
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => 8
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-20
    [TotalAmt] => 51
    [PrivateNote] => Stripe Payment Intent ID: pi_3Rn0xOCDiOqgoJOU1K3HdICA
    [PaymentRefNum] => ch_3Rn0xOCDiOqgoJOU14259SDC
    [PaymentMethodRef] => Array
        (
            [value] => 3
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => 8
                )

            [TotalTax] => 6.0225
        )

    [DepositToAccountRef] => Array
        (
            [value] => 108
        )

)

[21-Jul-2025 08:30:06 UTC] Using default 'Stripe Payment' item
[21-Jul-2025 08:30:06 UTC] Using tax exempt ID from sync settings: 8
[21-Jul-2025 08:30:06 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 225
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-21T01:30:07-07:00
                            [LastUpdatedTime] => 2025-07-21T01:30:07-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-07-20
                    [CurrencyRef] => Array
                        (
                            [value] => AUD
                            [name] => Australian Dollar
                        )

                    [ExchangeRate] => 1
                    [PrivateNote] => Stripe Payment Intent ID: pi_3Rn0xOCDiOqgoJOU1K3HdICA
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => llll
                                    [Amount] => 59.98
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 30
                                                    [name] => llll
                                                )

                                            [UnitPrice] => 59.9775
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 81
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => 8
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 59.98
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0
                                                    [NetAmountTaxable] => 59.98
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 72
                            [name] => testt(ratulbinhasan.integration@gmail.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 85
                            [Line1] => 2500 Garcia Ave
                            [Line2] => Sydney NSW  2050
                        )

                    [GlobalTaxCalculation] => TaxExcluded
                    [TotalAmt] => 59.98
                    [HomeTotalAmt] => 59.98
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [HomeBalance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 3
                            [name] => Credit Card
                        )

                    [PaymentRefNum] => ch_3Rn0xOCDiOqgoJOU14259SDC
                    [DepositToAccountRef] => Array
                        (
                            [value] => 108
                            [name] => Undeposited Funds
                        )

                )

            [time] => 2025-07-21T01:30:06.634-07:00
        )

)

[21-Jul-2025 08:30:06 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 225
[21-Jul-2025 08:30:06 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[21-Jul-2025 08:30:07 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 72
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 15
                    [Description] => Invoice RPYUF7UP-0012
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 31
                                )

                            [UnitPrice] => 15
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => 8
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-20
    [TotalAmt] => 15
    [PrivateNote] => Stripe Payment Intent ID: pi_3Rn0xlCDiOqgoJOU1nzMQ5SV
    [PaymentRefNum] => ch_3Rn0xlCDiOqgoJOU1tR3VX2Z
    [PaymentMethodRef] => Array
        (
            [value] => 3
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [DepositToAccountRef] => Array
        (
            [value] => 108
        )

)

[21-Jul-2025 08:30:07 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 226
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-21T01:30:08-07:00
                            [LastUpdatedTime] => 2025-07-21T01:30:08-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-07-20
                    [CurrencyRef] => Array
                        (
                            [value] => AUD
                            [name] => Australian Dollar
                        )

                    [ExchangeRate] => 1
                    [PrivateNote] => Stripe Payment Intent ID: pi_3Rn0xlCDiOqgoJOU1nzMQ5SV
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => Invoice RPYUF7UP-0012
                                    [Amount] => 15
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 31
                                                    [name] => Stripe Payment
                                                )

                                            [UnitPrice] => 15
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 81
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => 8
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 15
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0
                                                    [NetAmountTaxable] => 15
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 72
                            [name] => testt(ratulbinhasan.integration@gmail.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 86
                            [Line1] => 2500 Garcia Ave
                            [Line2] => Sydney NSW  2050
                        )

                    [GlobalTaxCalculation] => TaxExcluded
                    [TotalAmt] => 15
                    [HomeTotalAmt] => 15
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [HomeBalance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 3
                            [name] => Credit Card
                        )

                    [PaymentRefNum] => ch_3Rn0xlCDiOqgoJOU1tR3VX2Z
                    [DepositToAccountRef] => Array
                        (
                            [value] => 108
                            [name] => Undeposited Funds
                        )

                )

            [time] => 2025-07-21T01:30:07.697-07:00
        )

)

[21-Jul-2025 08:30:07 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 226
[21-Jul-2025 08:30:07 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[21-Jul-2025 08:30:09 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rn0omCDiOqgoJOU0Jdq6VOz)
[21-Jul-2025 08:30:09 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[21-Jul-2025 08:30:09 UTC] Starting sales receipt creation process for event: evt_3Rn0omCDiOqgoJOU0Jdq6VOz
[21-Jul-2025 08:30:09 UTC] No customer email in charge details, trying to get from invoice
[21-Jul-2025 08:30:09 UTC] Found customer details from invoice: ratulbinhasan.integration@gmail.com
[21-Jul-2025 08:30:10 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 72
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-20T01:49:53-07:00
                                            [LastUpdatedTime] => 2025-07-20T01:49:53-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt(ratulbinhasan.integration@gmail.com)
                                    [DisplayName] => testt(ratulbinhasan.integration@gmail.com)
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 00209983ece7696ea041089f54f9433e7aaf36
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratulbinhasan.integration@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-21T01:30:10.737-07:00
        )

)

[21-Jul-2025 08:30:10 UTC] Using QBO customer ID: 72
[21-Jul-2025 08:30:10 UTC] No Checkout Session found for Payment Intent: pi_3Rn0omCDiOqgoJOU0CKszRxP
[21-Jul-2025 08:30:10 UTC] No line items found from checkout session, trying to get from invoice
[21-Jul-2025 08:30:10 UTC] Found invoice line items: 2
[21-Jul-2025 08:30:10 UTC] Using tax_percent from invoice: 11%
[21-Jul-2025 08:30:11 UTC] Found tax code for 11%: 11
[21-Jul-2025 08:30:12 UTC] Found tax code for 11%: 11
[21-Jul-2025 08:30:12 UTC] Found tax code for 11%: 11
[21-Jul-2025 08:30:13 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 72
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 293.7
                    [Description] => llll
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 30
                                )

                            [UnitPrice] => 58.74
                            [Qty] => 5
                            [TaxCodeRef] => Array
                                (
                                    [value] => 11
                                )

                        )

                )

            [1] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 861.52
                    [Description] => losttt
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 29
                                )

                            [UnitPrice] => 39.16
                            [Qty] => 22
                            [TaxCodeRef] => Array
                                (
                                    [value] => 11
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-20
    [TotalAmt] => 1440.78
    [PrivateNote] => Stripe Payment Intent ID: pi_3Rn0omCDiOqgoJOU0CKszRxP
    [PaymentRefNum] => ch_3Rn0omCDiOqgoJOU0Lr9v729
    [PaymentMethodRef] => Array
        (
            [value] => 3
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => 11
                )

            [TotalTax] => 142.78
        )

    [DepositToAccountRef] => Array
        (
            [value] => 108
        )

)

[21-Jul-2025 08:30:13 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 227
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-21T01:30:14-07:00
                            [LastUpdatedTime] => 2025-07-21T01:30:14-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-07-20
                    [CurrencyRef] => Array
                        (
                            [value] => AUD
                            [name] => Australian Dollar
                        )

                    [ExchangeRate] => 1
                    [PrivateNote] => Stripe Payment Intent ID: pi_3Rn0omCDiOqgoJOU0CKszRxP
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => llll
                                    [Amount] => 293.7
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 30
                                                    [name] => llll
                                                )

                                            [UnitPrice] => 58.74
                                            [Qty] => 5
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 81
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => 11
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Id] => 2
                                    [LineNum] => 2
                                    [Description] => losttt
                                    [Amount] => 861.52
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 29
                                                    [name] => losttt
                                                )

                                            [UnitPrice] => 39.16
                                            [Qty] => 22
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 81
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => 11
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [2] => Array
                                (
                                    [Amount] => 1155.22
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 127.08
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 127.08
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 21
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 11
                                                    [NetAmountTaxable] => 1155.22
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 72
                            [name] => testt(ratulbinhasan.integration@gmail.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 87
                            [Line1] => 2500 Garcia Ave
                            [Line2] => Sydney NSW  2050
                        )

                    [GlobalTaxCalculation] => TaxExcluded
                    [TotalAmt] => 1282.3
                    [HomeTotalAmt] => 1282.3
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [HomeBalance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 3
                            [name] => Credit Card
                        )

                    [PaymentRefNum] => ch_3Rn0omCDiOqgoJOU0Lr9v729
                    [DepositToAccountRef] => Array
                        (
                            [value] => 108
                            [name] => Undeposited Funds
                        )

                )

            [time] => 2025-07-21T01:30:14.162-07:00
        )

)

[21-Jul-2025 08:30:13 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 227
[21-Jul-2025 08:30:13 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[21-Jul-2025 12:23:51 UTC] Stripe Webhook Received: invoice.created (ID: evt_1RnIl1CDiOqgoJOU0VpG0m9d)
[21-Jul-2025 12:23:51 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[21-Jul-2025 12:23:52 UTC] Starting invoice creation process for event: evt_1RnIl1CDiOqgoJOU0VpG0m9d
[21-Jul-2025 12:23:52 UTC] Fetching Stripe invoice: in_1RnIl1CDiOqgoJOUIm628E6j
[21-Jul-2025 12:23:52 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RnIl1CDiOqgoJOUIm628E6j
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 0
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 0
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 1
            [liability] => Array
                (
                    [type] => self
                )

            [provider] => stripe
            [status] => complete
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1753100631
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => Array
        (
            [city] => testt
            [country] => US
            [line1] => rwrwr
            [line2] => fsf
            [postal_code] => 95014
            [state] => CO
        )

    [customer_email] => ratulbinhasan.integration@gmail.com
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => Array
        (
            [address] => Array
                (
                    [city] => testt
                    [country] => US
                    [line1] => rwrwr
                    [line2] => fsf
                    [postal_code] => 95014
                    [state] => CO
                )

            [name] => testt
            [phone] => 
        )

    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 
    [effective_at] => 
    [ending_balance] => 
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => 
    [invoice_pdf] => 
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                )

            [has_more] => 
            [total_count] => 0
            [url] => /v1/invoices/in_1RnIl1CDiOqgoJOUIm628E6j/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => 
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => 
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1753100631
    [period_start] => 1753100631
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => auto
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => draft
    [status_transitions] => Array
        (
            [finalized_at] => 
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 0
    [subtotal_excluding_tax] => 0
    [tax] => 
    [test_clock] => 
    [total] => 0
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 0
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
        )

    [total_taxes] => Array
        (
        )

    [transfer_data] => 
    [webhooks_delivered_at] => 
)

[21-Jul-2025 12:23:52 UTC] Invoice creation failed: No line items in the invoice, nothing to process.
[21-Jul-2025 12:23:52 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php:217
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(43): process_stripe_invoice_created_to_qbo_invoice()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-invoice-created-to-qbo-invoice.php on line 217
[21-Jul-2025 12:27:26 UTC] Stripe Webhook Received: invoice.created (ID: evt_1RnIoTCDiOqgoJOU0nkd7Aip)
[21-Jul-2025 12:28:03 UTC] Stripe Webhook Received: invoice.created (ID: evt_1RnIoTCDiOqgoJOU0nkd7Aip)
[21-Jul-2025 12:28:26 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[21-Jul-2025 12:28:26 UTC] Starting invoice creation process for event: evt_1RnIoTCDiOqgoJOU0nkd7Aip
[21-Jul-2025 12:28:26 UTC] Fetching Stripe invoice: in_1RnIoTCDiOqgoJOUQCQB1Ct8
[21-Jul-2025 12:28:26 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RnIoTCDiOqgoJOUQCQB1Ct8
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 45600
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 45600
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 1
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 1
            [liability] => Array
                (
                    [type] => self
                )

            [provider] => stripe
            [status] => complete
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1753100845
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => Array
        (
            [city] => testt
            [country] => US
            [line1] => rwrwr
            [line2] => fsf
            [postal_code] => 95014
            [state] => CO
        )

    [customer_email] => ratulbinhasan.integration@gmail.com
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => Array
        (
            [address] => Array
                (
                    [city] => testt
                    [country] => US
                    [line1] => rwrwr
                    [line2] => fsf
                    [postal_code] => 95014
                    [state] => CO
                )

            [name] => testt
            [phone] => 
        )

    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1755692891
    [effective_at] => 1753100891
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TaWtKajJsT0dtdWpCem9wWTdxWDZGRHc4emNJdUNYLDE0MzY0MTcwNg0200St3jbD4D?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TaWtKajJsT0dtdWpCem9wWTdxWDZGRHc4emNJdUNYLDE0MzY0MTcwNg0200St3jbD4D/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RnIoyCDiOqgoJOUrk6dPNsF
                            [object] => line_item
                            [amount] => 45600
                            [amount_excluding_tax] => 45600
                            [currency] => usd
                            [description] => hhhhh
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RnIoTCDiOqgoJOUQCQB1Ct8
                            [invoice_item] => ii_1RnIoyCDiOqgoJOUAybCknvD
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1RnIoyCDiOqgoJOUAybCknvD
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1753100876
                                    [start] => 1753100876
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RnIoxCDiOqgoJOUZAybF2nz
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1753100875
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SgnRUcSHsgRwfE
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 2400
                                    [unit_amount_decimal] => 2400
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RnIoxCDiOqgoJOUZAybF2nz
                                            [product] => prod_SgnRUcSHsgRwfE
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 2400
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 19
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 0
                                            [inclusive] => 
                                            [tax_rate] => txr_1RlPxVCDiOqgoJOUtbT35WCR
                                            [taxability_reason] => not_collecting
                                            [taxable_amount] => 0
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 0
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1RlPxVCDiOqgoJOUtbT35WCR
                                                )

                                            [taxability_reason] => not_collecting
                                            [taxable_amount] => 0
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 2400
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1RnIoTCDiOqgoJOUQCQB1Ct8/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0016
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RnIpECDiOqgoJOU1etnjqwg
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1753100845
    [period_start] => 1753100845
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => open
    [status_transitions] => Array
        (
            [finalized_at] => 1753100891
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 45600
    [subtotal_excluding_tax] => 45600
    [tax] => 0
    [test_clock] => 
    [total] => 45600
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 45600
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 0
                    [inclusive] => 
                    [tax_rate] => txr_1RlPxVCDiOqgoJOUtbT35WCR
                    [taxability_reason] => not_collecting
                    [taxable_amount] => 0
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 0
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1RlPxVCDiOqgoJOUtbT35WCR
                        )

                    [taxability_reason] => not_collecting
                    [taxable_amount] => 0
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 
)

[21-Jul-2025 12:28:27 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 72
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-20T01:49:53-07:00
                                            [LastUpdatedTime] => 2025-07-20T01:49:53-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt(ratulbinhasan.integration@gmail.com)
                                    [DisplayName] => testt(ratulbinhasan.integration@gmail.com)
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 00209983ece7696ea041089f54f9433e7aaf36
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratulbinhasan.integration@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-21T05:28:27.715-07:00
        )

)

[21-Jul-2025 12:28:27 UTC] Using QBO customer ID: 72
[21-Jul-2025 12:28:29 UTC] Found matching tax code: 6 for rate: 0%
[21-Jul-2025 12:28:29 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 72
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 456
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 32
                                )

                            [UnitPrice] => 24
                            [Qty] => 19
                            [TaxCodeRef] => Array
                                (
                                    [value] => 6
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-21
    [DueDate] => 2025-08-20
    [TotalAmt] => 456
    [PrivateNote] => Stripe Invoice ID: in_1RnIoTCDiOqgoJOUQCQB1Ct8
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [GlobalTaxCalculation] => TaxExcluded
)

[21-Jul-2025 12:28:30 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 228
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-21T05:28:30-07:00
                            [LastModifiedByRef] => Array
                                (
                                    [value] => 9341455021033327
                                )

                            [LastUpdatedTime] => 2025-07-21T05:28:30-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-07-21
                    [CurrencyRef] => Array
                        (
                            [value] => AUD
                            [name] => Australian Dollar
                        )

                    [ExchangeRate] => 1
                    [PrivateNote] => Stripe Invoice ID: in_1RnIoTCDiOqgoJOUQCQB1Ct8
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 456
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 32
                                                    [name] => hhhhh
                                                )

                                            [UnitPrice] => 24
                                            [Qty] => 19
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 81
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => 6
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 456
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0
                                                    [NetAmountTaxable] => 456
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 72
                            [name] => testt(ratulbinhasan.integration@gmail.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 88
                            [Line1] => 2500 Garcia Ave
                            [Line2] => Sydney NSW  2050
                        )

                    [DueDate] => 2025-08-20
                    [GlobalTaxCalculation] => TaxExcluded
                    [TotalAmt] => 456
                    [HomeTotalAmt] => 456
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 456
                    [HomeBalance] => 456
                )

            [time] => 2025-07-21T05:28:29.565-07:00
        )

)

[21-Jul-2025 12:28:30 UTC] Invoice created successfully in QBO. Invoice ID: 228
[21-Jul-2025 12:28:30 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[21-Jul-2025 12:29:03 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[21-Jul-2025 12:29:03 UTC] Starting invoice creation process for event: evt_1RnIoTCDiOqgoJOU0nkd7Aip
[21-Jul-2025 12:29:03 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[21-Jul-2025 12:29:03 UTC] Invoice already processed. QBO Invoice ID: 228
[21-Jul-2025 12:33:59 UTC] Stripe Webhook Received: invoice.created (ID: evt_1RnIuoCDiOqgoJOUrNFxyjvQ)
[21-Jul-2025 12:34:59 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[21-Jul-2025 12:34:59 UTC] Starting invoice creation process for event: evt_1RnIuoCDiOqgoJOUrNFxyjvQ
[21-Jul-2025 12:34:59 UTC] Fetching Stripe invoice: in_1RnIuoCDiOqgoJOUJGSa78nI
[21-Jul-2025 12:34:59 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RnIuoCDiOqgoJOUJGSa78nI
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 6600
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 6600
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 1
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 1
            [liability] => Array
                (
                    [type] => self
                )

            [provider] => stripe
            [status] => complete
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1753101238
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_address] => Array
        (
            [city] => testt
            [country] => US
            [line1] => rwrwr
            [line2] => fsf
            [postal_code] => 95014
            [state] => CO
        )

    [customer_email] => ratulbinhasan.integration@gmail.com
    [customer_name] => testt
    [customer_phone] => 
    [customer_shipping] => Array
        (
            [address] => Array
                (
                    [city] => testt
                    [country] => US
                    [line1] => rwrwr
                    [line2] => fsf
                    [postal_code] => 95014
                    [state] => CO
                )

            [name] => testt
            [phone] => 
        )

    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1755693262
    [effective_at] => 1753101262
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TaWtQbXVrU2RMbGdDSVZhYlRCWXlyNG5KT1NkWnJjLDE0MzY0MjA5OQ02006FTSVRTk?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TaWtQbXVrU2RMbGdDSVZhYlRCWXlyNG5KT1NkWnJjLDE0MzY0MjA5OQ02006FTSVRTk/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RnIv1CDiOqgoJOUUaL7Eeon
                            [object] => line_item
                            [amount] => 6600
                            [amount_excluding_tax] => 6600
                            [currency] => usd
                            [description] => llll
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RnIuoCDiOqgoJOUJGSa78nI
                            [invoice_item] => ii_1RnIv1CDiOqgoJOUM2C6IpFZ
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1RnIv1CDiOqgoJOUM2C6IpFZ
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1753101251
                                    [start] => 1753101251
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RlPu2CDiOqgoJOUqYL6qJsw
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1752651442
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SgnUhRleVQlEod
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 6600
                                    [unit_amount_decimal] => 6600
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RlPu2CDiOqgoJOUqYL6qJsw
                                            [product] => prod_SgnUhRleVQlEod
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 6600
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 1
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 0
                                            [inclusive] => 
                                            [tax_rate] => txr_1RlPxVCDiOqgoJOUtbT35WCR
                                            [taxability_reason] => not_collecting
                                            [taxable_amount] => 0
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 0
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1RlPxVCDiOqgoJOUtbT35WCR
                                                )

                                            [taxability_reason] => not_collecting
                                            [taxable_amount] => 0
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 6600
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1RnIuoCDiOqgoJOUJGSa78nI/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => RPYUF7UP-0017
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RnIvCCDiOqgoJOU17hfXMQm
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1753101238
    [period_start] => 1753101238
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => open
    [status_transitions] => Array
        (
            [finalized_at] => 1753101262
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 6600
    [subtotal_excluding_tax] => 6600
    [tax] => 0
    [test_clock] => 
    [total] => 6600
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 6600
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 0
                    [inclusive] => 
                    [tax_rate] => txr_1RlPxVCDiOqgoJOUtbT35WCR
                    [taxability_reason] => not_collecting
                    [taxable_amount] => 0
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 0
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1RlPxVCDiOqgoJOUtbT35WCR
                        )

                    [taxability_reason] => not_collecting
                    [taxable_amount] => 0
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 
)

[21-Jul-2025 12:35:00 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 456
                                    [BalanceWithJobs] => 456
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 72
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-20T01:49:53-07:00
                                            [LastUpdatedTime] => 2025-07-21T05:28:30-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt(ratulbinhasan.integration@gmail.com)
                                    [DisplayName] => testt(ratulbinhasan.integration@gmail.com)
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 00209983ece7696ea041089f54f9433e7aaf36
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratulbinhasan.integration@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-21T05:35:00.380-07:00
        )

)

[21-Jul-2025 12:35:00 UTC] Using QBO customer ID: 72
[21-Jul-2025 12:35:00 UTC] Found matching tax code: 6 for rate: 0%
[21-Jul-2025 12:35:00 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 72
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 66
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 30
                                )

                            [UnitPrice] => 66
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => 6
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-21
    [DueDate] => 2025-08-20
    [TotalAmt] => 66
    [PrivateNote] => Stripe Invoice ID: in_1RnIuoCDiOqgoJOUJGSa78nI
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [GlobalTaxCalculation] => TaxExcluded
)

[21-Jul-2025 12:35:01 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 229
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-21T05:35:02-07:00
                            [LastModifiedByRef] => Array
                                (
                                    [value] => 9341455021033327
                                )

                            [LastUpdatedTime] => 2025-07-21T05:35:02-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-07-21
                    [CurrencyRef] => Array
                        (
                            [value] => AUD
                            [name] => Australian Dollar
                        )

                    [ExchangeRate] => 1
                    [PrivateNote] => Stripe Invoice ID: in_1RnIuoCDiOqgoJOUJGSa78nI
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 66
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 30
                                                    [name] => llll
                                                )

                                            [UnitPrice] => 66
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 81
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => 6
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 66
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0
                                                    [NetAmountTaxable] => 66
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 72
                            [name] => testt(ratulbinhasan.integration@gmail.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 89
                            [Line1] => 2500 Garcia Ave
                            [Line2] => Sydney NSW  2050
                        )

                    [DueDate] => 2025-08-20
                    [GlobalTaxCalculation] => TaxExcluded
                    [TotalAmt] => 66
                    [HomeTotalAmt] => 66
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 66
                    [HomeBalance] => 66
                )

            [time] => 2025-07-21T05:35:01.100-07:00
        )

)

[21-Jul-2025 12:35:01 UTC] Invoice created successfully in QBO. Invoice ID: 229
[21-Jul-2025 12:35:01 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[21-Jul-2025 12:46:46 UTC] Stripe Webhook Received: refund.created (ID: evt_3Rn0xOCDiOqgoJOU1oEZRoCe)
[21-Jul-2025 12:46:46 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[21-Jul-2025 12:46:46 UTC] Starting refund receipt creation process for event: evt_3Rn0xOCDiOqgoJOU1oEZRoCe
[21-Jul-2025 12:46:46 UTC] Refund details:
[21-Jul-2025 12:46:46 UTC]  - ID: re_3Rn0xOCDiOqgoJOU18MZQnPh
[21-Jul-2025 12:46:46 UTC]  - Amount: 51
[21-Jul-2025 12:46:46 UTC]  - Currency: USD
[21-Jul-2025 12:46:46 UTC]  - Charge ID: ch_3Rn0xOCDiOqgoJOU14259SDC
[21-Jul-2025 12:46:46 UTC]  - Payment Intent ID: pi_3Rn0xOCDiOqgoJOU1K3HdICA
[21-Jul-2025 12:46:46 UTC] Accounts verified successfully
[21-Jul-2025 12:46:46 UTC] Fetching payment intent details for ID: pi_3Rn0xOCDiOqgoJOU1K3HdICA
[21-Jul-2025 12:46:47 UTC] Successfully retrieved payment intent details
[21-Jul-2025 12:46:47 UTC] Payment intent retrieved successfully
[21-Jul-2025 12:46:47 UTC] Fetching charge details for ID: ch_3Rn0xOCDiOqgoJOU14259SDC
[21-Jul-2025 12:46:47 UTC] Successfully retrieved charge details
[21-Jul-2025 12:46:47 UTC] Fetching customer details for ID: cus_SYxhIfsEqHRWWB
[21-Jul-2025 12:46:47 UTC] Fetching Stripe customer: cus_SYxhIfsEqHRWWB
[21-Jul-2025 12:46:47 UTC] Customer details from Stripe:
[21-Jul-2025 12:46:47 UTC]  - Name: testt
[21-Jul-2025 12:46:47 UTC]  - Email: ratulbinhasan.integration@gmail.com
[21-Jul-2025 12:46:48 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 522
                                    [BalanceWithJobs] => 522
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 72
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-20T01:49:53-07:00
                                            [LastUpdatedTime] => 2025-07-21T05:35:02-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt(ratulbinhasan.integration@gmail.com)
                                    [DisplayName] => testt(ratulbinhasan.integration@gmail.com)
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 00209983ece7696ea041089f54f9433e7aaf36
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratulbinhasan.integration@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-21T05:46:48.389-07:00
        )

)

[21-Jul-2025 12:46:48 UTC] Using QBO customer ID: 72
[21-Jul-2025 12:46:49 UTC] Using simple refund line item with product: Refund
[21-Jul-2025 12:46:50 UTC] Using payment method: card (QBO ID: 3)
[21-Jul-2025 12:46:50 UTC] Using deposit account ID: 108
[21-Jul-2025 12:46:50 UTC] Prepared refund receipt data:
[21-Jul-2025 12:46:50 UTC] Array
(
    [CustomerRef] => Array
        (
            [value] => 72
        )

    [TotalAmt] => 51
    [TxnDate] => 2025-07-21
    [PaymentMethodRef] => Array
        (
            [value] => 3
        )

    [PaymentRefNum] => re_3Rn0xOCDiOqgoJOU18MZQnPh
    [PrivateNote] => Stripe Refund for Charge: ch_3Rn0xOCDiOqgoJOU14259SDC (Payment Intent: pi_3Rn0xOCDiOqgoJOU1K3HdICA)
    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 51
                    [Description] => Refund
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 33
                                )

                            [UnitPrice] => 51
                            [Qty] => 1
                        )

                )

        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [DepositToAccountRef] => Array
        (
            [value] => 108
        )

)

[21-Jul-2025 12:46:50 UTC] QBO API response:
[21-Jul-2025 12:46:50 UTC] Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => A business validation error has occurred while processing your request
                                    [Detail] => Business Validation Error: Make sure all your transactions have a GST rate before you save.
                                    [code] => 6000
                                    [element] => 
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-21T05:46:50.682-07:00
        )

)

[21-Jul-2025 12:46:50 UTC] Refund receipt creation failed: Failed to create refund receipt in QuickBooks
[21-Jul-2025 12:46:50 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[21-Jul-2025 12:53:52 UTC] Stripe Webhook Received: refund.created (ID: evt_3Rn0xOCDiOqgoJOU1RwTSwou)
[21-Jul-2025 12:53:52 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[21-Jul-2025 12:53:52 UTC] Starting refund receipt creation process for event: evt_3Rn0xOCDiOqgoJOU1RwTSwou
[21-Jul-2025 12:53:52 UTC] Refund details:
[21-Jul-2025 12:53:52 UTC]  - ID: re_3Rn0xOCDiOqgoJOU1Lfhfd4j
[21-Jul-2025 12:53:52 UTC]  - Amount: 51
[21-Jul-2025 12:53:52 UTC]  - Currency: USD
[21-Jul-2025 12:53:52 UTC]  - Charge ID: ch_3Rn0xOCDiOqgoJOU14259SDC
[21-Jul-2025 12:53:52 UTC]  - Payment Intent ID: pi_3Rn0xOCDiOqgoJOU1K3HdICA
[21-Jul-2025 12:53:52 UTC] Accounts verified successfully
[21-Jul-2025 12:53:52 UTC] Fetching payment intent details for ID: pi_3Rn0xOCDiOqgoJOU1K3HdICA
[21-Jul-2025 12:53:52 UTC] Successfully retrieved payment intent details
[21-Jul-2025 12:53:52 UTC] Payment intent retrieved successfully
[21-Jul-2025 12:53:52 UTC] Fetching charge details for ID: ch_3Rn0xOCDiOqgoJOU14259SDC
[21-Jul-2025 12:53:53 UTC] Successfully retrieved charge details
[21-Jul-2025 12:53:53 UTC] Fetching customer details for ID: cus_SYxhIfsEqHRWWB
[21-Jul-2025 12:53:53 UTC] Fetching Stripe customer: cus_SYxhIfsEqHRWWB
[21-Jul-2025 12:53:53 UTC] Customer details from Stripe:
[21-Jul-2025 12:53:53 UTC]  - Name: testt
[21-Jul-2025 12:53:53 UTC]  - Email: ratulbinhasan.integration@gmail.com
[21-Jul-2025 12:53:54 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 67.27
                                    [BalanceWithJobs] => 67.27
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 105
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-15T23:59:14-07:00
                                            [LastUpdatedTime] => 2025-07-20T10:59:57-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt testt
                                    [DisplayName] => testt testt
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098127805f7fa6e41dea97e908749fd2b9e
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratulbinhasan.integration@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-21T05:53:54.122-07:00
        )

)

[21-Jul-2025 12:53:54 UTC] Using QBO customer ID: 105
[21-Jul-2025 12:53:54 UTC] Using simple refund line item with product: Refund
[21-Jul-2025 12:53:54 UTC] Using payment method: card (QBO ID: 1)
[21-Jul-2025 12:53:55 UTC] Using deposit account ID: 4
[21-Jul-2025 12:53:55 UTC] Prepared refund receipt data:
[21-Jul-2025 12:53:55 UTC] Array
(
    [CustomerRef] => Array
        (
            [value] => 105
        )

    [TotalAmt] => 51
    [TxnDate] => 2025-07-21
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [PaymentRefNum] => re_3Rn0xOCDiOqgoJOU1Lfhfd4j
    [PrivateNote] => Stripe Refund for Charge: ch_3Rn0xOCDiOqgoJOU14259SDC (Payment Intent: pi_3Rn0xOCDiOqgoJOU1K3HdICA)
    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 51
                    [Description] => Refund
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 28
                                )

                            [UnitPrice] => 51
                            [Qty] => 1
                        )

                )

        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[21-Jul-2025 12:53:56 UTC] QBO API response:
[21-Jul-2025 12:53:56 UTC] Array
(
    [code] => 200
    [body] => Array
        (
            [RefundReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 692
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-21T05:53:56-07:00
                            [LastUpdatedTime] => 2025-07-21T05:53:56-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1283
                    [TxnDate] => 2025-07-21
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Refund for Charge: ch_3Rn0xOCDiOqgoJOU14259SDC (Payment Intent: pi_3Rn0xOCDiOqgoJOU1K3HdICA)
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => Refund
                                    [Amount] => 51
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 28
                                                    [name] => Refund
                                                )

                                            [UnitPrice] => 51
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => NON
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 51
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 105
                            [name] => testt testt
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 204
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 51
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-21T05:53:55.488-07:00
        )

)

[21-Jul-2025 12:53:56 UTC] Refund receipt created successfully in QBO. Refund Receipt ID: 692
[21-Jul-2025 12:53:56 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[21-Jul-2025 13:01:52 UTC] Stripe Webhook Received: refund.created (ID: evt_3Rn1oWCDiOqgoJOU05KcstsT)
[21-Jul-2025 13:01:52 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[21-Jul-2025 13:01:52 UTC] Starting refund receipt creation process for event: evt_3Rn1oWCDiOqgoJOU05KcstsT
[21-Jul-2025 13:01:52 UTC] Refund details:
[21-Jul-2025 13:01:52 UTC]  - ID: re_3Rn1oWCDiOqgoJOU0tblbkaM
[21-Jul-2025 13:01:52 UTC]  - Amount: 73.26
[21-Jul-2025 13:01:52 UTC]  - Currency: USD
[21-Jul-2025 13:01:52 UTC]  - Charge ID: ch_3Rn1oWCDiOqgoJOU0iGHNSU5
[21-Jul-2025 13:01:52 UTC]  - Payment Intent ID: pi_3Rn1oWCDiOqgoJOU0jM56sTE
[21-Jul-2025 13:01:52 UTC] Accounts verified successfully
[21-Jul-2025 13:01:52 UTC] Fetching payment intent details for ID: pi_3Rn1oWCDiOqgoJOU0jM56sTE
[21-Jul-2025 13:01:52 UTC] Successfully retrieved payment intent details
[21-Jul-2025 13:01:52 UTC] Payment intent retrieved successfully
[21-Jul-2025 13:01:52 UTC] Fetching charge details for ID: ch_3Rn1oWCDiOqgoJOU0iGHNSU5
[21-Jul-2025 13:01:53 UTC] Successfully retrieved charge details
[21-Jul-2025 13:01:53 UTC] Fetching customer details for ID: cus_SYxhIfsEqHRWWB
[21-Jul-2025 13:01:53 UTC] Fetching Stripe customer: cus_SYxhIfsEqHRWWB
[21-Jul-2025 13:01:53 UTC] Customer details from Stripe:
[21-Jul-2025 13:01:53 UTC]  - Name: testt
[21-Jul-2025 13:01:53 UTC]  - Email: ratulbinhasan.integration@gmail.com
[21-Jul-2025 13:01:54 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 67.27
                                    [BalanceWithJobs] => 67.27
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 105
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-15T23:59:14-07:00
                                            [LastUpdatedTime] => 2025-07-20T10:59:57-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt testt
                                    [DisplayName] => testt testt
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098127805f7fa6e41dea97e908749fd2b9e
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratulbinhasan.integration@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-21T06:01:54.332-07:00
        )

)

[21-Jul-2025 13:01:54 UTC] Using QBO customer ID: 105
[21-Jul-2025 13:01:54 UTC] Using simple refund line item with product: Refund
[21-Jul-2025 13:01:55 UTC] Using payment method: card (QBO ID: 1)
[21-Jul-2025 13:01:55 UTC] Using deposit account ID: 4
[21-Jul-2025 13:01:55 UTC] Prepared refund receipt data:
[21-Jul-2025 13:01:55 UTC] Array
(
    [CustomerRef] => Array
        (
            [value] => 105
        )

    [TotalAmt] => 73.26
    [TxnDate] => 2025-07-21
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [PaymentRefNum] => re_3Rn1oWCDiOqgoJOU0tblbkaM
    [PrivateNote] => Stripe Refund for Charge: ch_3Rn1oWCDiOqgoJOU0iGHNSU5 (Payment Intent: pi_3Rn1oWCDiOqgoJOU0jM56sTE)
    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 73.26
                    [Description] => Refund
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 28
                                )

                            [UnitPrice] => 73.26
                            [Qty] => 1
                        )

                )

        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[21-Jul-2025 13:01:56 UTC] QBO API response:
[21-Jul-2025 13:01:56 UTC] Array
(
    [code] => 200
    [body] => Array
        (
            [RefundReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 693
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-21T06:01:56-07:00
                            [LastUpdatedTime] => 2025-07-21T06:01:56-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1284
                    [TxnDate] => 2025-07-21
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Refund for Charge: ch_3Rn1oWCDiOqgoJOU0iGHNSU5 (Payment Intent: pi_3Rn1oWCDiOqgoJOU0jM56sTE)
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => Refund
                                    [Amount] => 73.26
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 28
                                                    [name] => Refund
                                                )

                                            [UnitPrice] => 73.26
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => NON
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 73.26
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 105
                            [name] => testt testt
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 205
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 73.26
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-21T06:01:55.695-07:00
        )

)

[21-Jul-2025 13:01:56 UTC] Refund receipt created successfully in QBO. Refund Receipt ID: 693
[21-Jul-2025 13:01:56 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[21-Jul-2025 13:40:08 UTC] Stripe Webhook Received: refund.created (ID: evt_3RnJuPCDiOqgoJOU0aNt3TqO)
[21-Jul-2025 13:40:08 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[21-Jul-2025 13:40:08 UTC] Starting refund receipt creation process for event: evt_3RnJuPCDiOqgoJOU0aNt3TqO
[21-Jul-2025 13:40:08 UTC] Refund details:
[21-Jul-2025 13:40:08 UTC]  - ID: re_3RnJuPCDiOqgoJOU0NqaLkfJ
[21-Jul-2025 13:40:08 UTC]  - Amount: 73.26
[21-Jul-2025 13:40:08 UTC]  - Currency: USD
[21-Jul-2025 13:40:08 UTC]  - Charge ID: ch_3RnJuPCDiOqgoJOU0Y9bHTJE
[21-Jul-2025 13:40:08 UTC]  - Payment Intent ID: pi_3RnJuPCDiOqgoJOU0ROFQK9w
[21-Jul-2025 13:40:08 UTC] Accounts verified successfully
[21-Jul-2025 13:40:08 UTC] Fetching payment intent details for ID: pi_3RnJuPCDiOqgoJOU0ROFQK9w
[21-Jul-2025 13:40:09 UTC] Successfully retrieved payment intent details
[21-Jul-2025 13:40:09 UTC] Payment intent retrieved successfully
[21-Jul-2025 13:40:09 UTC] Fetching charge details for ID: ch_3RnJuPCDiOqgoJOU0Y9bHTJE
[21-Jul-2025 13:40:09 UTC] Successfully retrieved charge details
[21-Jul-2025 13:40:09 UTC] Fetching customer details for ID: cus_SYxhIfsEqHRWWB
[21-Jul-2025 13:40:09 UTC] Fetching Stripe customer: cus_SYxhIfsEqHRWWB
[21-Jul-2025 13:40:09 UTC] Customer details from Stripe:
[21-Jul-2025 13:40:09 UTC]  - Name: testt
[21-Jul-2025 13:40:09 UTC]  - Email: ratulbinhasan.integration@gmail.com
[21-Jul-2025 13:40:10 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 67.27
                                    [BalanceWithJobs] => 67.27
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 105
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-15T23:59:14-07:00
                                            [LastUpdatedTime] => 2025-07-20T10:59:57-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt testt
                                    [DisplayName] => testt testt
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098127805f7fa6e41dea97e908749fd2b9e
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratulbinhasan.integration@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-21T06:40:10.437-07:00
        )

)

[21-Jul-2025 13:40:10 UTC] Using QBO customer ID: 105
[21-Jul-2025 13:40:10 UTC] Using simple refund line item with product: Refund
[21-Jul-2025 13:40:11 UTC] Using payment method: card (QBO ID: 1)
[21-Jul-2025 13:40:11 UTC] Using deposit account ID: 4
[21-Jul-2025 13:40:11 UTC] Prepared refund receipt data:
[21-Jul-2025 13:40:11 UTC] Array
(
    [CustomerRef] => Array
        (
            [value] => 105
        )

    [TotalAmt] => 73.26
    [TxnDate] => 2025-07-21
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [PaymentRefNum] => re_3RnJuPCDiOqgoJOU0NqaLkfJ
    [PrivateNote] => Stripe Refund for Charge: ch_3RnJuPCDiOqgoJOU0Y9bHTJE (Payment Intent: pi_3RnJuPCDiOqgoJOU0ROFQK9w)
    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 73.26
                    [Description] => Refund
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 28
                                )

                            [UnitPrice] => 73.26
                            [Qty] => 1
                        )

                )

        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[21-Jul-2025 13:40:12 UTC] QBO API response:
[21-Jul-2025 13:40:12 UTC] Array
(
    [code] => 200
    [body] => Array
        (
            [RefundReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 694
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-21T06:40:12-07:00
                            [LastUpdatedTime] => 2025-07-21T06:40:12-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1285
                    [TxnDate] => 2025-07-21
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Refund for Charge: ch_3RnJuPCDiOqgoJOU0Y9bHTJE (Payment Intent: pi_3RnJuPCDiOqgoJOU0ROFQK9w)
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => Refund
                                    [Amount] => 73.26
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 28
                                                    [name] => Refund
                                                )

                                            [UnitPrice] => 73.26
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => NON
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 73.26
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 105
                            [name] => testt testt
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 206
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 73.26
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-21T06:40:11.784-07:00
        )

)

[21-Jul-2025 13:40:12 UTC] Refund receipt created successfully in QBO. Refund Receipt ID: 694
[21-Jul-2025 13:40:12 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[21-Jul-2025 13:57:17 UTC] Stripe Webhook Received: refund.created (ID: evt_3RnKBiCDiOqgoJOU0eN0SBea)
[21-Jul-2025 13:57:17 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[21-Jul-2025 13:57:17 UTC] Starting refund receipt creation process for event: evt_3RnKBiCDiOqgoJOU0eN0SBea
[21-Jul-2025 13:57:17 UTC] Refund details:
[21-Jul-2025 13:57:17 UTC]  - ID: re_3RnKBiCDiOqgoJOU0RRX58rf
[21-Jul-2025 13:57:17 UTC]  - Amount: 132
[21-Jul-2025 13:57:17 UTC]  - Currency: USD
[21-Jul-2025 13:57:17 UTC]  - Charge ID: ch_3RnKBiCDiOqgoJOU0GpytjyV
[21-Jul-2025 13:57:17 UTC]  - Payment Intent ID: pi_3RnKBiCDiOqgoJOU0jMPYczG
[21-Jul-2025 13:57:17 UTC] Accounts verified successfully
[21-Jul-2025 13:57:17 UTC] Fetching payment intent details for ID: pi_3RnKBiCDiOqgoJOU0jMPYczG
[21-Jul-2025 13:57:18 UTC] Successfully retrieved payment intent details
[21-Jul-2025 13:57:18 UTC] Payment intent retrieved successfully
[21-Jul-2025 13:57:18 UTC] Fetching charge details for ID: ch_3RnKBiCDiOqgoJOU0GpytjyV
[21-Jul-2025 13:57:18 UTC] Successfully retrieved charge details
[21-Jul-2025 13:57:18 UTC] Fetching customer details for ID: cus_SYxhIfsEqHRWWB
[21-Jul-2025 13:57:18 UTC] Fetching Stripe customer: cus_SYxhIfsEqHRWWB
[21-Jul-2025 13:57:18 UTC] Customer details from Stripe:
[21-Jul-2025 13:57:18 UTC]  - Name: testt
[21-Jul-2025 13:57:18 UTC]  - Email: ratulbinhasan.integration@gmail.com
[21-Jul-2025 13:57:19 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 67.27
                                    [BalanceWithJobs] => 67.27
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 105
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-15T23:59:14-07:00
                                            [LastUpdatedTime] => 2025-07-20T10:59:57-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt testt
                                    [DisplayName] => testt testt
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098127805f7fa6e41dea97e908749fd2b9e
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratulbinhasan.integration@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-21T06:57:19.500-07:00
        )

)

[21-Jul-2025 13:57:19 UTC] Using QBO customer ID: 105
[21-Jul-2025 13:57:20 UTC] Using simple refund line item with product: Refund
[21-Jul-2025 13:57:20 UTC] Using payment method: card (QBO ID: 1)
[21-Jul-2025 13:57:20 UTC] Using deposit account ID: 4
[21-Jul-2025 13:57:20 UTC] Prepared refund receipt data:
[21-Jul-2025 13:57:20 UTC] Array
(
    [CustomerRef] => Array
        (
            [value] => 105
        )

    [TotalAmt] => 132
    [TxnDate] => 2025-07-21
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [PaymentRefNum] => re_3RnKBiCDiOqgoJOU0RRX58rf
    [PrivateNote] => Stripe Refund for Charge: ch_3RnKBiCDiOqgoJOU0GpytjyV (Payment Intent: pi_3RnKBiCDiOqgoJOU0jMPYczG)
    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 132
                    [Description] => Refund
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 28
                                )

                            [UnitPrice] => 132
                            [Qty] => 1
                        )

                )

        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[21-Jul-2025 13:57:21 UTC] QBO API response:
[21-Jul-2025 13:57:21 UTC] Array
(
    [code] => 200
    [body] => Array
        (
            [RefundReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 695
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-21T06:57:21-07:00
                            [LastUpdatedTime] => 2025-07-21T06:57:21-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1286
                    [TxnDate] => 2025-07-21
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Refund for Charge: ch_3RnKBiCDiOqgoJOU0GpytjyV (Payment Intent: pi_3RnKBiCDiOqgoJOU0jMPYczG)
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => Refund
                                    [Amount] => 132
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 28
                                                    [name] => Refund
                                                )

                                            [UnitPrice] => 132
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => NON
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 132
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 105
                            [name] => testt testt
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 207
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 132
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-21T06:57:21.116-07:00
        )

)

[21-Jul-2025 13:57:21 UTC] Refund receipt created successfully in QBO. Refund Receipt ID: 695
[21-Jul-2025 13:57:21 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[21-Jul-2025 14:08:17 UTC] Stripe Webhook Received: refund.created (ID: evt_3RnKMFCDiOqgoJOU1JsxwlwD)
[21-Jul-2025 14:08:17 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[21-Jul-2025 14:08:17 UTC] Starting refund receipt creation process for event: evt_3RnKMFCDiOqgoJOU1JsxwlwD
[21-Jul-2025 14:08:17 UTC] Refund details:
[21-Jul-2025 14:08:17 UTC]  - ID: re_3RnKMFCDiOqgoJOU1yHkOSGH
[21-Jul-2025 14:08:17 UTC]  - Amount: 88
[21-Jul-2025 14:08:17 UTC]  - Currency: USD
[21-Jul-2025 14:08:17 UTC]  - Charge ID: ch_3RnKMFCDiOqgoJOU12p6vkD3
[21-Jul-2025 14:08:17 UTC]  - Payment Intent ID: pi_3RnKMFCDiOqgoJOU1Jx2PSnD
[21-Jul-2025 14:08:17 UTC] Accounts verified successfully
[21-Jul-2025 14:08:17 UTC] Fetching payment intent details for ID: pi_3RnKMFCDiOqgoJOU1Jx2PSnD
[21-Jul-2025 14:08:17 UTC] Successfully retrieved payment intent details
[21-Jul-2025 14:08:17 UTC] Payment intent retrieved successfully
[21-Jul-2025 14:08:17 UTC] Fetching charge details for ID: ch_3RnKMFCDiOqgoJOU12p6vkD3
[21-Jul-2025 14:08:17 UTC] Successfully retrieved charge details
[21-Jul-2025 14:08:17 UTC] Fetching customer details for ID: cus_SYxhIfsEqHRWWB
[21-Jul-2025 14:08:17 UTC] Fetching Stripe customer: cus_SYxhIfsEqHRWWB
[21-Jul-2025 14:08:18 UTC] Customer details from Stripe:
[21-Jul-2025 14:08:18 UTC]  - Name: testt
[21-Jul-2025 14:08:18 UTC]  - Email: ratulbinhasan.integration@gmail.com
[21-Jul-2025 14:08:19 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 67.27
                                    [BalanceWithJobs] => 67.27
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 105
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-15T23:59:14-07:00
                                            [LastUpdatedTime] => 2025-07-20T10:59:57-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt testt
                                    [DisplayName] => testt testt
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098127805f7fa6e41dea97e908749fd2b9e
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratulbinhasan.integration@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-21T07:08:18.913-07:00
        )

)

[21-Jul-2025 14:08:19 UTC] Using QBO customer ID: 105
[21-Jul-2025 14:08:19 UTC] Using simple refund line item with product: Refund
[21-Jul-2025 14:08:19 UTC] Using payment method: card (QBO ID: 1)
[21-Jul-2025 14:08:20 UTC] Using deposit account ID: 4
[21-Jul-2025 14:08:20 UTC] Prepared refund receipt data:
[21-Jul-2025 14:08:20 UTC] Array
(
    [CustomerRef] => Array
        (
            [value] => 105
        )

    [TotalAmt] => 88
    [TxnDate] => 2025-07-21
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [PaymentRefNum] => re_3RnKMFCDiOqgoJOU1yHkOSGH
    [PrivateNote] => Stripe Refund for Charge: ch_3RnKMFCDiOqgoJOU12p6vkD3 (Payment Intent: pi_3RnKMFCDiOqgoJOU1Jx2PSnD)
    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 88
                    [Description] => Refund
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 28
                                )

                            [UnitPrice] => 88
                            [Qty] => 1
                        )

                )

        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[21-Jul-2025 14:08:21 UTC] QBO API response:
[21-Jul-2025 14:08:21 UTC] Array
(
    [code] => 200
    [body] => Array
        (
            [RefundReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 696
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-21T07:08:21-07:00
                            [LastUpdatedTime] => 2025-07-21T07:08:21-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1287
                    [TxnDate] => 2025-07-21
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Refund for Charge: ch_3RnKMFCDiOqgoJOU12p6vkD3 (Payment Intent: pi_3RnKMFCDiOqgoJOU1Jx2PSnD)
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => Refund
                                    [Amount] => 88
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 28
                                                    [name] => Refund
                                                )

                                            [UnitPrice] => 88
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => NON
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 88
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 105
                            [name] => testt testt
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 208
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 88
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-21T07:08:20.409-07:00
        )

)

[21-Jul-2025 14:08:21 UTC] Refund receipt created successfully in QBO. Refund Receipt ID: 696
[21-Jul-2025 14:08:21 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[21-Jul-2025 14:31:34 UTC] Stripe Webhook Received: refund.created (ID: evt_3RnKh5CDiOqgoJOU10Oah9WW)
[21-Jul-2025 14:31:34 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[21-Jul-2025 14:31:34 UTC] Starting refund receipt creation process for event: evt_3RnKh5CDiOqgoJOU10Oah9WW
[21-Jul-2025 14:31:34 UTC] Refund details:
[21-Jul-2025 14:31:34 UTC]  - ID: re_3RnKh5CDiOqgoJOU1fqo29jb
[21-Jul-2025 14:31:34 UTC]  - Amount: 11
[21-Jul-2025 14:31:34 UTC]  - Currency: USD
[21-Jul-2025 14:31:34 UTC]  - Charge ID: ch_3RnKh5CDiOqgoJOU1nDQ1J5T
[21-Jul-2025 14:31:34 UTC]  - Payment Intent ID: pi_3RnKh5CDiOqgoJOU1YC0RmcX
[21-Jul-2025 14:31:34 UTC] Accounts verified successfully
[21-Jul-2025 14:31:34 UTC] Fetching payment intent details for ID: pi_3RnKh5CDiOqgoJOU1YC0RmcX
[21-Jul-2025 14:31:34 UTC] Successfully retrieved payment intent details
[21-Jul-2025 14:31:34 UTC] Payment intent retrieved successfully
[21-Jul-2025 14:31:34 UTC] Fetching charge details for ID: ch_3RnKh5CDiOqgoJOU1nDQ1J5T
[21-Jul-2025 14:31:34 UTC] Successfully retrieved charge details
[21-Jul-2025 14:31:34 UTC] No customer email from payment intent, trying charge
[21-Jul-2025 14:31:34 UTC] Customer details from charge:
[21-Jul-2025 14:31:34 UTC]  - Name: ffff ffff
[21-Jul-2025 14:31:34 UTC]  - Email: ratuddll@testtt.com
[21-Jul-2025 14:31:35 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 107
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-19T09:32:07-07:00
                                            [LastUpdatedTime] => 2025-07-19T09:32:07-07:00
                                        )

                                    [GivenName] => dsd fsfsf
                                    [FamilyName] => dsd fsfsf
                                    [FullyQualifiedName] => dsd fsfsf(ratuddll@testtt.com)
                                    [DisplayName] => dsd fsfsf(ratuddll@testtt.com)
                                    [PrintOnCheckName] => dsd fsfsf dsd fsfsf
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098fca0813f1de74d7a869cb3c3abb3348a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratuddll@testtt.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-21T07:31:35.750-07:00
        )

)

[21-Jul-2025 14:31:35 UTC] Using QBO customer ID: 107
[21-Jul-2025 14:31:36 UTC] Using simple refund line item with product: Refund
[21-Jul-2025 14:31:36 UTC] Using payment method: card (QBO ID: 1)
[21-Jul-2025 14:31:36 UTC] Using deposit account ID: 4
[21-Jul-2025 14:31:36 UTC] Prepared refund receipt data:
[21-Jul-2025 14:31:36 UTC] Array
(
    [CustomerRef] => Array
        (
            [value] => 107
        )

    [TotalAmt] => 11
    [TxnDate] => 2025-07-21
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [PaymentRefNum] => re_3RnKh5CDiOqgoJOU1fqo29jb
    [PrivateNote] => Stripe Refund for Charge: ch_3RnKh5CDiOqgoJOU1nDQ1J5T (Payment Intent: pi_3RnKh5CDiOqgoJOU1YC0RmcX)
    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 11
                    [Description] => Refund
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 28
                                )

                            [UnitPrice] => 11
                            [Qty] => 1
                        )

                )

        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[21-Jul-2025 14:31:38 UTC] QBO API response:
[21-Jul-2025 14:31:38 UTC] Array
(
    [code] => 200
    [body] => Array
        (
            [RefundReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 697
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-21T07:31:37-07:00
                            [LastUpdatedTime] => 2025-07-21T07:31:37-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1288
                    [TxnDate] => 2025-07-21
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Refund for Charge: ch_3RnKh5CDiOqgoJOU1nDQ1J5T (Payment Intent: pi_3RnKh5CDiOqgoJOU1YC0RmcX)
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => Refund
                                    [Amount] => 11
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 28
                                                    [name] => Refund
                                                )

                                            [UnitPrice] => 11
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => NON
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 11
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 107
                            [name] => dsd fsfsf(ratuddll@testtt.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 209
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 11
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-21T07:31:37.162-07:00
        )

)

[21-Jul-2025 14:31:38 UTC] Refund receipt created successfully in QBO. Refund Receipt ID: 697
[21-Jul-2025 14:31:38 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[21-Jul-2025 17:07:06 UTC] Stripe Webhook Received: refund.created (ID: evt_3RnKh5CDiOqgoJOU10Oah9WW)
[21-Jul-2025 17:07:06 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[21-Jul-2025 17:07:06 UTC] Starting refund receipt creation process for event: evt_3RnKh5CDiOqgoJOU10Oah9WW
[21-Jul-2025 17:07:06 UTC] Refund details:
[21-Jul-2025 17:07:06 UTC]  - ID: re_3RnKh5CDiOqgoJOU1fqo29jb
[21-Jul-2025 17:07:06 UTC]  - Amount: 11
[21-Jul-2025 17:07:06 UTC]  - Currency: USD
[21-Jul-2025 17:07:06 UTC]  - Charge ID: ch_3RnKh5CDiOqgoJOU1nDQ1J5T
[21-Jul-2025 17:07:06 UTC]  - Payment Intent ID: pi_3RnKh5CDiOqgoJOU1YC0RmcX
[21-Jul-2025 17:07:06 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[21-Jul-2025 17:07:06 UTC] Refund already processed. QBO Refund Receipt ID: 697
[21-Jul-2025 17:09:25 UTC] Stripe Webhook Received: refund.created (ID: evt_3RnKh5CDiOqgoJOU10Oah9WW)
[21-Jul-2025 17:09:25 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[21-Jul-2025 17:09:25 UTC] Starting refund receipt creation process for event: evt_3RnKh5CDiOqgoJOU10Oah9WW
[21-Jul-2025 17:09:25 UTC] Refund details:
[21-Jul-2025 17:09:25 UTC]  - ID: re_3RnKh5CDiOqgoJOU1fqo29jb
[21-Jul-2025 17:09:25 UTC]  - Amount: 11
[21-Jul-2025 17:09:25 UTC]  - Currency: USD
[21-Jul-2025 17:09:25 UTC]  - Charge ID: ch_3RnKh5CDiOqgoJOU1nDQ1J5T
[21-Jul-2025 17:09:25 UTC]  - Payment Intent ID: pi_3RnKh5CDiOqgoJOU1YC0RmcX
[21-Jul-2025 17:09:25 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[21-Jul-2025 17:09:25 UTC] Refund already processed. QBO Refund Receipt ID: 697
[21-Jul-2025 17:12:17 UTC] Stripe Webhook Received: refund.created (ID: evt_3RnKh5CDiOqgoJOU10Oah9WW)
[21-Jul-2025 17:12:17 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[21-Jul-2025 17:12:17 UTC] Starting refund receipt creation process for event: evt_3RnKh5CDiOqgoJOU10Oah9WW
[21-Jul-2025 17:12:17 UTC] Refund details:
[21-Jul-2025 17:12:17 UTC]  - ID: re_3RnKh5CDiOqgoJOU1fqo29jb
[21-Jul-2025 17:12:17 UTC]  - Amount: 11
[21-Jul-2025 17:12:17 UTC]  - Currency: USD
[21-Jul-2025 17:12:17 UTC]  - Charge ID: ch_3RnKh5CDiOqgoJOU1nDQ1J5T
[21-Jul-2025 17:12:17 UTC]  - Payment Intent ID: pi_3RnKh5CDiOqgoJOU1YC0RmcX
[21-Jul-2025 17:12:17 UTC] Accounts verified successfully
[21-Jul-2025 17:12:17 UTC] Fetching payment intent details for ID: pi_3RnKh5CDiOqgoJOU1YC0RmcX
[21-Jul-2025 17:12:18 UTC] Successfully retrieved payment intent details
[21-Jul-2025 17:12:18 UTC] Payment intent retrieved successfully
[21-Jul-2025 17:12:18 UTC] Fetching charge details for ID: ch_3RnKh5CDiOqgoJOU1nDQ1J5T
[21-Jul-2025 17:12:18 UTC] Successfully retrieved charge details
[21-Jul-2025 17:12:18 UTC] No customer email from payment intent, trying charge
[21-Jul-2025 17:12:18 UTC] Customer details from charge:
[21-Jul-2025 17:12:18 UTC]  - Name: ffff ffff
[21-Jul-2025 17:12:18 UTC]  - Email: ratuddll@testtt.com
[21-Jul-2025 17:12:19 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 107
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-19T09:32:07-07:00
                                            [LastUpdatedTime] => 2025-07-19T09:32:07-07:00
                                        )

                                    [GivenName] => dsd fsfsf
                                    [FamilyName] => dsd fsfsf
                                    [FullyQualifiedName] => dsd fsfsf(ratuddll@testtt.com)
                                    [DisplayName] => dsd fsfsf(ratuddll@testtt.com)
                                    [PrintOnCheckName] => dsd fsfsf dsd fsfsf
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098fca0813f1de74d7a869cb3c3abb3348a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratuddll@testtt.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-21T10:12:19.583-07:00
        )

)

[21-Jul-2025 17:12:19 UTC] Using QBO customer ID: 107
[21-Jul-2025 17:12:20 UTC] Using simple refund line item with product: Refund
[21-Jul-2025 17:12:20 UTC] Using payment method: card (QBO ID: 1)
[21-Jul-2025 17:12:20 UTC] Using deposit account ID: 4
[21-Jul-2025 17:12:20 UTC] Prepared refund receipt data:
[21-Jul-2025 17:12:20 UTC] Array
(
    [CustomerRef] => Array
        (
            [value] => 107
        )

    [TotalAmt] => 11
    [TxnDate] => 2025-07-21
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [PaymentRefNum] => re_3RnKh5CDiOqgoJOU1fqo29jb
    [PrivateNote] => Stripe Refund for Charge: ch_3RnKh5CDiOqgoJOU1nDQ1J5T (Payment Intent: pi_3RnKh5CDiOqgoJOU1YC0RmcX)
    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 11
                    [Description] => Refund
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 28
                                )

                            [UnitPrice] => 11
                            [Qty] => 1
                        )

                )

        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[21-Jul-2025 17:12:21 UTC] QBO API response:
[21-Jul-2025 17:12:21 UTC] Array
(
    [code] => 200
    [body] => Array
        (
            [RefundReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 698
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-21T10:12:21-07:00
                            [LastUpdatedTime] => 2025-07-21T10:12:21-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1289
                    [TxnDate] => 2025-07-21
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Refund for Charge: ch_3RnKh5CDiOqgoJOU1nDQ1J5T (Payment Intent: pi_3RnKh5CDiOqgoJOU1YC0RmcX)
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => Refund
                                    [Amount] => 11
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 28
                                                    [name] => Refund
                                                )

                                            [UnitPrice] => 11
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => NON
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 11
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 107
                            [name] => dsd fsfsf(ratuddll@testtt.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 210
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 11
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-21T10:12:21.028-07:00
        )

)

[21-Jul-2025 17:12:21 UTC] Refund receipt created successfully in QBO. Refund Receipt ID: 698
[21-Jul-2025 17:12:21 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[21-Jul-2025 17:18:41 UTC] Stripe Webhook Received: refund.created (ID: evt_3RnKh5CDiOqgoJOU10Oah9WW)
[21-Jul-2025 17:18:41 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[21-Jul-2025 17:18:41 UTC] Starting refund receipt creation process for event: evt_3RnKh5CDiOqgoJOU10Oah9WW
[21-Jul-2025 17:18:41 UTC] Refund details:
[21-Jul-2025 17:18:41 UTC]  - ID: re_3RnKh5CDiOqgoJOU1fqo29jb
[21-Jul-2025 17:18:41 UTC]  - Amount: 11
[21-Jul-2025 17:18:41 UTC]  - Currency: USD
[21-Jul-2025 17:18:41 UTC]  - Charge ID: ch_3RnKh5CDiOqgoJOU1nDQ1J5T
[21-Jul-2025 17:18:41 UTC]  - Payment Intent ID: pi_3RnKh5CDiOqgoJOU1YC0RmcX
[21-Jul-2025 17:18:41 UTC] Accounts verified successfully
[21-Jul-2025 17:18:41 UTC] Fetching payment intent details for ID: pi_3RnKh5CDiOqgoJOU1YC0RmcX
[21-Jul-2025 17:18:41 UTC] Successfully retrieved payment intent details
[21-Jul-2025 17:18:41 UTC] Payment intent retrieved successfully
[21-Jul-2025 17:18:41 UTC] Fetching charge details for ID: ch_3RnKh5CDiOqgoJOU1nDQ1J5T
[21-Jul-2025 17:18:42 UTC] Successfully retrieved charge details
[21-Jul-2025 17:18:42 UTC] No customer email from payment intent, trying charge
[21-Jul-2025 17:18:42 UTC] Customer details from charge:
[21-Jul-2025 17:18:42 UTC]  - Name: ffff ffff
[21-Jul-2025 17:18:42 UTC]  - Email: ratuddll@testtt.com
[21-Jul-2025 17:18:42 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 73
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-20T03:00:38-07:00
                                            [LastUpdatedTime] => 2025-07-20T03:00:38-07:00
                                        )

                                    [GivenName] => dsd fsfsf
                                    [FamilyName] => dsd fsfsf
                                    [FullyQualifiedName] => dsd fsfsf(ratuddll@testtt.com)
                                    [DisplayName] => dsd fsfsf(ratuddll@testtt.com)
                                    [PrintOnCheckName] => dsd fsfsf dsd fsfsf
                                    [Active] => 1
                                    [V4IDPseudonym] => 002099b3353d0d0dab467597cb929c8e625195
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratuddll@testtt.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-21T10:18:42.661-07:00
        )

)

[21-Jul-2025 17:18:42 UTC] Using QBO customer ID: 73
[21-Jul-2025 17:18:43 UTC] Using simple refund line item with product: Refund
[21-Jul-2025 17:18:43 UTC] Using payment method: card (QBO ID: 3)
[21-Jul-2025 17:18:43 UTC] Using deposit account ID: 108
[21-Jul-2025 17:18:43 UTC] Prepared refund receipt data:
[21-Jul-2025 17:18:43 UTC] Array
(
    [CustomerRef] => Array
        (
            [value] => 73
        )

    [TotalAmt] => 11
    [TxnDate] => 2025-07-21
    [PaymentMethodRef] => Array
        (
            [value] => 3
        )

    [PaymentRefNum] => re_3RnKh5CDiOqgoJOU1fqo29jb
    [PrivateNote] => Stripe Refund for Charge: ch_3RnKh5CDiOqgoJOU1nDQ1J5T (Payment Intent: pi_3RnKh5CDiOqgoJOU1YC0RmcX)
    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 11
                    [Description] => Refund
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 33
                                )

                            [UnitPrice] => 11
                            [Qty] => 1
                        )

                )

        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [DepositToAccountRef] => Array
        (
            [value] => 108
        )

)

[21-Jul-2025 17:18:44 UTC] QBO API response:
[21-Jul-2025 17:18:44 UTC] Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => A business validation error has occurred while processing your request
                                    [Detail] => Business Validation Error: Make sure all your transactions have a GST rate before you save.
                                    [code] => 6000
                                    [element] => 
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-21T10:18:44.215-07:00
        )

)

[21-Jul-2025 17:18:44 UTC] Refund receipt creation failed: Failed to create refund receipt in QuickBooks
[21-Jul-2025 17:18:44 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[21-Jul-2025 17:26:47 UTC] Stripe Webhook Received: refund.created (ID: evt_3RnKh5CDiOqgoJOU10Oah9WW)
[21-Jul-2025 17:26:47 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[21-Jul-2025 17:26:47 UTC] Starting refund receipt creation process for event: evt_3RnKh5CDiOqgoJOU10Oah9WW
[21-Jul-2025 17:26:47 UTC] Refund details:
[21-Jul-2025 17:26:47 UTC]  - ID: re_3RnKh5CDiOqgoJOU1fqo29jb
[21-Jul-2025 17:26:47 UTC]  - Amount: 11
[21-Jul-2025 17:26:47 UTC]  - Currency: USD
[21-Jul-2025 17:26:47 UTC]  - Charge ID: ch_3RnKh5CDiOqgoJOU1nDQ1J5T
[21-Jul-2025 17:26:47 UTC]  - Payment Intent ID: pi_3RnKh5CDiOqgoJOU1YC0RmcX
[21-Jul-2025 17:26:47 UTC] Accounts verified successfully
[21-Jul-2025 17:26:47 UTC] Fetching payment intent details for ID: pi_3RnKh5CDiOqgoJOU1YC0RmcX
[21-Jul-2025 17:26:48 UTC] Successfully retrieved payment intent details
[21-Jul-2025 17:26:48 UTC] Payment intent retrieved successfully
[21-Jul-2025 17:26:48 UTC] Fetching charge details for ID: ch_3RnKh5CDiOqgoJOU1nDQ1J5T
[21-Jul-2025 17:26:48 UTC] Successfully retrieved charge details
[21-Jul-2025 17:26:48 UTC] No customer email from payment intent, trying charge
[21-Jul-2025 17:26:48 UTC] Customer details from charge:
[21-Jul-2025 17:26:48 UTC]  - Name: ffff ffff
[21-Jul-2025 17:26:48 UTC]  - Email: ratuddll@testtt.com
[21-Jul-2025 17:26:49 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 73
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-20T03:00:38-07:00
                                            [LastUpdatedTime] => 2025-07-20T03:00:38-07:00
                                        )

                                    [GivenName] => dsd fsfsf
                                    [FamilyName] => dsd fsfsf
                                    [FullyQualifiedName] => dsd fsfsf(ratuddll@testtt.com)
                                    [DisplayName] => dsd fsfsf(ratuddll@testtt.com)
                                    [PrintOnCheckName] => dsd fsfsf dsd fsfsf
                                    [Active] => 1
                                    [V4IDPseudonym] => 002099b3353d0d0dab467597cb929c8e625195
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratuddll@testtt.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-21T10:26:49.109-07:00
        )

)

[21-Jul-2025 17:26:49 UTC] Using QBO customer ID: 73
[21-Jul-2025 17:26:50 UTC] Applied tax exempt code for non-USA account: 7
[21-Jul-2025 17:26:50 UTC] Using refund line item with product: Refund
[21-Jul-2025 17:26:50 UTC] Using payment method: card (QBO ID: 3)
[21-Jul-2025 17:26:50 UTC] Using deposit account ID: 108
[21-Jul-2025 17:26:50 UTC] Prepared refund receipt data:
[21-Jul-2025 17:26:50 UTC] Array
(
    [CustomerRef] => Array
        (
            [value] => 73
        )

    [TotalAmt] => 11
    [TxnDate] => 2025-07-21
    [PaymentMethodRef] => Array
        (
            [value] => 3
        )

    [PaymentRefNum] => re_3RnKh5CDiOqgoJOU1fqo29jb
    [PrivateNote] => Stripe Refund for Charge: ch_3RnKh5CDiOqgoJOU1nDQ1J5T (Payment Intent: pi_3RnKh5CDiOqgoJOU1YC0RmcX)
    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 11
                    [Description] => Refund
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 33
                                )

                            [UnitPrice] => 11
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => 7
                                )

                        )

                )

        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [DepositToAccountRef] => Array
        (
            [value] => 108
        )

    [TxnTaxDetail] => Array
        (
            [TaxCodeRef] => Array
                (
                    [value] => 7
                )

        )

)

[21-Jul-2025 17:26:51 UTC] QBO API response:
[21-Jul-2025 17:26:51 UTC] Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Request has invalid or unsupported property
                                    [Detail] => Property Name:failed to parse json object; a property specified is unsupported or invalid
                                    [code] => 2010
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-21T10:26:51.074-07:00
        )

)

[21-Jul-2025 17:26:51 UTC] Refund receipt creation failed: Failed to create refund receipt in QuickBooks
[21-Jul-2025 17:26:51 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[21-Jul-2025 17:29:45 UTC] Stripe Webhook Received: refund.created (ID: evt_3RnKh5CDiOqgoJOU10Oah9WW)
[21-Jul-2025 17:29:45 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[21-Jul-2025 17:29:45 UTC] Starting refund receipt creation process for event: evt_3RnKh5CDiOqgoJOU10Oah9WW
[21-Jul-2025 17:29:45 UTC] Refund details:
[21-Jul-2025 17:29:45 UTC]  - ID: re_3RnKh5CDiOqgoJOU1fqo29jb
[21-Jul-2025 17:29:45 UTC]  - Amount: 11
[21-Jul-2025 17:29:45 UTC]  - Currency: USD
[21-Jul-2025 17:29:45 UTC]  - Charge ID: ch_3RnKh5CDiOqgoJOU1nDQ1J5T
[21-Jul-2025 17:29:45 UTC]  - Payment Intent ID: pi_3RnKh5CDiOqgoJOU1YC0RmcX
[21-Jul-2025 17:29:45 UTC] Accounts verified successfully
[21-Jul-2025 17:29:45 UTC] Fetching payment intent details for ID: pi_3RnKh5CDiOqgoJOU1YC0RmcX
[21-Jul-2025 17:29:46 UTC] Successfully retrieved payment intent details
[21-Jul-2025 17:29:46 UTC] Payment intent retrieved successfully
[21-Jul-2025 17:29:46 UTC] Fetching charge details for ID: ch_3RnKh5CDiOqgoJOU1nDQ1J5T
[21-Jul-2025 17:29:46 UTC] Successfully retrieved charge details
[21-Jul-2025 17:29:46 UTC] No customer email from payment intent, trying charge
[21-Jul-2025 17:29:46 UTC] Customer details from charge:
[21-Jul-2025 17:29:46 UTC]  - Name: ffff ffff
[21-Jul-2025 17:29:46 UTC]  - Email: ratuddll@testtt.com
[21-Jul-2025 17:29:47 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 73
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-20T03:00:38-07:00
                                            [LastUpdatedTime] => 2025-07-20T03:00:38-07:00
                                        )

                                    [GivenName] => dsd fsfsf
                                    [FamilyName] => dsd fsfsf
                                    [FullyQualifiedName] => dsd fsfsf(ratuddll@testtt.com)
                                    [DisplayName] => dsd fsfsf(ratuddll@testtt.com)
                                    [PrintOnCheckName] => dsd fsfsf dsd fsfsf
                                    [Active] => 1
                                    [V4IDPseudonym] => 002099b3353d0d0dab467597cb929c8e625195
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratuddll@testtt.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-21T10:29:46.990-07:00
        )

)

[21-Jul-2025 17:29:47 UTC] Using QBO customer ID: 73
[21-Jul-2025 17:29:47 UTC] Using simple refund line item with product: Refund
[21-Jul-2025 17:29:47 UTC] Using payment method: card (QBO ID: 3)
[21-Jul-2025 17:29:48 UTC] Using deposit account ID: 108
[21-Jul-2025 17:29:48 UTC] Prepared refund receipt data:
[21-Jul-2025 17:29:48 UTC] Array
(
    [CustomerRef] => Array
        (
            [value] => 73
        )

    [TotalAmt] => 11
    [TxnDate] => 2025-07-21
    [PaymentMethodRef] => Array
        (
            [value] => 3
        )

    [PaymentRefNum] => re_3RnKh5CDiOqgoJOU1fqo29jb
    [PrivateNote] => Stripe Refund for Charge: ch_3RnKh5CDiOqgoJOU1nDQ1J5T (Payment Intent: pi_3RnKh5CDiOqgoJOU1YC0RmcX)
    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 11
                    [Description] => Refund
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 33
                                )

                            [UnitPrice] => 11
                            [Qty] => 1
                        )

                )

        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [DepositToAccountRef] => Array
        (
            [value] => 108
        )

)

[21-Jul-2025 17:29:48 UTC] QBO API response:
[21-Jul-2025 17:29:48 UTC] Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => A business validation error has occurred while processing your request
                                    [Detail] => Business Validation Error: Make sure all your transactions have a GST rate before you save.
                                    [code] => 6000
                                    [element] => 
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-21T10:29:48.336-07:00
        )

)

[21-Jul-2025 17:29:48 UTC] Refund receipt creation failed: Failed to create refund receipt in QuickBooks
[21-Jul-2025 17:29:48 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[21-Jul-2025 17:36:55 UTC] Stripe Webhook Received: refund.created (ID: evt_3RnKh5CDiOqgoJOU10Oah9WW)
[21-Jul-2025 17:36:55 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[21-Jul-2025 17:36:55 UTC] Starting refund receipt creation process for event: evt_3RnKh5CDiOqgoJOU10Oah9WW
[21-Jul-2025 17:36:55 UTC] Refund details:
[21-Jul-2025 17:36:55 UTC]  - ID: re_3RnKh5CDiOqgoJOU1fqo29jb
[21-Jul-2025 17:36:55 UTC]  - Amount: 11
[21-Jul-2025 17:36:55 UTC]  - Currency: USD
[21-Jul-2025 17:36:55 UTC]  - Charge ID: ch_3RnKh5CDiOqgoJOU1nDQ1J5T
[21-Jul-2025 17:36:55 UTC]  - Payment Intent ID: pi_3RnKh5CDiOqgoJOU1YC0RmcX
[21-Jul-2025 17:36:55 UTC] Accounts verified successfully
[21-Jul-2025 17:36:55 UTC] Fetching payment intent details for ID: pi_3RnKh5CDiOqgoJOU1YC0RmcX
[21-Jul-2025 17:36:55 UTC] Successfully retrieved payment intent details
[21-Jul-2025 17:36:55 UTC] Payment intent retrieved successfully
[21-Jul-2025 17:36:55 UTC] Fetching charge details for ID: ch_3RnKh5CDiOqgoJOU1nDQ1J5T
[21-Jul-2025 17:36:55 UTC] Successfully retrieved charge details
[21-Jul-2025 17:36:55 UTC] No customer email from payment intent, trying charge
[21-Jul-2025 17:36:55 UTC] Customer details from charge:
[21-Jul-2025 17:36:55 UTC]  - Name: ffff ffff
[21-Jul-2025 17:36:55 UTC]  - Email: ratuddll@testtt.com
[21-Jul-2025 17:36:56 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 73
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-20T03:00:38-07:00
                                            [LastUpdatedTime] => 2025-07-20T03:00:38-07:00
                                        )

                                    [GivenName] => dsd fsfsf
                                    [FamilyName] => dsd fsfsf
                                    [FullyQualifiedName] => dsd fsfsf(ratuddll@testtt.com)
                                    [DisplayName] => dsd fsfsf(ratuddll@testtt.com)
                                    [PrintOnCheckName] => dsd fsfsf dsd fsfsf
                                    [Active] => 1
                                    [V4IDPseudonym] => 002099b3353d0d0dab467597cb929c8e625195
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratuddll@testtt.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-21T10:36:56.242-07:00
        )

)

[21-Jul-2025 17:36:56 UTC] Using QBO customer ID: 73
[21-Jul-2025 17:36:56 UTC] Could not determine QuickBooks company country, assuming non-US
[21-Jul-2025 17:36:56 UTC] Account type: International
[21-Jul-2025 17:36:56 UTC] Tax exempt ID from settings: 7
[21-Jul-2025 17:36:57 UTC] Applied tax code ref: 7 for non-US account
[21-Jul-2025 17:36:57 UTC] Using refund line item with product: Refund
[21-Jul-2025 17:36:57 UTC] Using payment method: card (QBO ID: 3)
[21-Jul-2025 17:36:57 UTC] Using deposit account ID: 108
[21-Jul-2025 17:36:57 UTC] Prepared refund receipt data:
[21-Jul-2025 17:36:57 UTC] Array
(
    [CustomerRef] => Array
        (
            [value] => 73
        )

    [TotalAmt] => 11
    [TxnDate] => 2025-07-21
    [PaymentMethodRef] => Array
        (
            [value] => 3
        )

    [PaymentRefNum] => re_3RnKh5CDiOqgoJOU1fqo29jb
    [PrivateNote] => Stripe Refund for Charge: ch_3RnKh5CDiOqgoJOU1nDQ1J5T (Payment Intent: pi_3RnKh5CDiOqgoJOU1YC0RmcX)
    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 11
                    [Description] => Refund
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 33
                                )

                            [UnitPrice] => 11
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => 7
                                )

                        )

                )

        )

    [DepositToAccountRef] => Array
        (
            [value] => 108
        )

)

[21-Jul-2025 17:36:58 UTC] QBO API response:
[21-Jul-2025 17:36:58 UTC] Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => A business validation error has occurred while processing your request
                                    [Detail] => Business Validation Error: Were sorry, QuickBooks encountered an error while calculating tax. Try reselecting the tax rate or reentering the product/service item and saving the form again.
                                    [code] => 6000
                                    [element] => 
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-21T10:36:58.056-07:00
        )

)

[21-Jul-2025 17:36:58 UTC] Refund receipt creation failed: Failed to create refund receipt in QuickBooks: A business validation error has occurred while processing your request
[21-Jul-2025 17:36:58 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[21-Jul-2025 17:37:48 UTC] Stripe Webhook Received: refund.created (ID: evt_3RnKh5CDiOqgoJOU10Oah9WW)
[21-Jul-2025 17:37:48 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[21-Jul-2025 17:37:48 UTC] Starting refund receipt creation process for event: evt_3RnKh5CDiOqgoJOU10Oah9WW
[21-Jul-2025 17:37:48 UTC] Refund details:
[21-Jul-2025 17:37:48 UTC]  - ID: re_3RnKh5CDiOqgoJOU1fqo29jb
[21-Jul-2025 17:37:48 UTC]  - Amount: 11
[21-Jul-2025 17:37:48 UTC]  - Currency: USD
[21-Jul-2025 17:37:48 UTC]  - Charge ID: ch_3RnKh5CDiOqgoJOU1nDQ1J5T
[21-Jul-2025 17:37:48 UTC]  - Payment Intent ID: pi_3RnKh5CDiOqgoJOU1YC0RmcX
[21-Jul-2025 17:37:48 UTC] Accounts verified successfully
[21-Jul-2025 17:37:48 UTC] Fetching payment intent details for ID: pi_3RnKh5CDiOqgoJOU1YC0RmcX
[21-Jul-2025 17:37:49 UTC] Successfully retrieved payment intent details
[21-Jul-2025 17:37:49 UTC] Payment intent retrieved successfully
[21-Jul-2025 17:37:49 UTC] Fetching charge details for ID: ch_3RnKh5CDiOqgoJOU1nDQ1J5T
[21-Jul-2025 17:37:49 UTC] Successfully retrieved charge details
[21-Jul-2025 17:37:49 UTC] No customer email from payment intent, trying charge
[21-Jul-2025 17:37:49 UTC] Customer details from charge:
[21-Jul-2025 17:37:49 UTC]  - Name: ffff ffff
[21-Jul-2025 17:37:49 UTC]  - Email: ratuddll@testtt.com
[21-Jul-2025 17:37:50 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 73
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-20T03:00:38-07:00
                                            [LastUpdatedTime] => 2025-07-20T03:00:38-07:00
                                        )

                                    [GivenName] => dsd fsfsf
                                    [FamilyName] => dsd fsfsf
                                    [FullyQualifiedName] => dsd fsfsf(ratuddll@testtt.com)
                                    [DisplayName] => dsd fsfsf(ratuddll@testtt.com)
                                    [PrintOnCheckName] => dsd fsfsf dsd fsfsf
                                    [Active] => 1
                                    [V4IDPseudonym] => 002099b3353d0d0dab467597cb929c8e625195
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratuddll@testtt.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-21T10:37:50.045-07:00
        )

)

[21-Jul-2025 17:37:50 UTC] Using QBO customer ID: 73
[21-Jul-2025 17:37:50 UTC] Could not determine QuickBooks company country, assuming non-US
[21-Jul-2025 17:37:50 UTC] Account type: International
[21-Jul-2025 17:37:50 UTC] Tax exempt ID from settings: 6
[21-Jul-2025 17:37:50 UTC] Applied tax code ref: 6 for non-US account
[21-Jul-2025 17:37:50 UTC] Using refund line item with product: Refund
[21-Jul-2025 17:37:51 UTC] Using payment method: card (QBO ID: 3)
[21-Jul-2025 17:37:51 UTC] Using deposit account ID: 108
[21-Jul-2025 17:37:51 UTC] Prepared refund receipt data:
[21-Jul-2025 17:37:51 UTC] Array
(
    [CustomerRef] => Array
        (
            [value] => 73
        )

    [TotalAmt] => 11
    [TxnDate] => 2025-07-21
    [PaymentMethodRef] => Array
        (
            [value] => 3
        )

    [PaymentRefNum] => re_3RnKh5CDiOqgoJOU1fqo29jb
    [PrivateNote] => Stripe Refund for Charge: ch_3RnKh5CDiOqgoJOU1nDQ1J5T (Payment Intent: pi_3RnKh5CDiOqgoJOU1YC0RmcX)
    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 11
                    [Description] => Refund
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 33
                                )

                            [UnitPrice] => 11
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => 6
                                )

                        )

                )

        )

    [DepositToAccountRef] => Array
        (
            [value] => 108
        )

)

[21-Jul-2025 17:37:52 UTC] QBO API response:
[21-Jul-2025 17:37:52 UTC] Array
(
    [code] => 200
    [body] => Array
        (
            [RefundReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 230
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-21T10:37:52-07:00
                            [LastUpdatedTime] => 2025-07-21T10:37:52-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-07-21
                    [CurrencyRef] => Array
                        (
                            [value] => AUD
                            [name] => Australian Dollar
                        )

                    [ExchangeRate] => 1
                    [PrivateNote] => Stripe Refund for Charge: ch_3RnKh5CDiOqgoJOU1nDQ1J5T (Payment Intent: pi_3RnKh5CDiOqgoJOU1YC0RmcX)
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => Refund
                                    [Amount] => 11
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 33
                                                    [name] => Refund
                                                )

                                            [UnitPrice] => 11
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 81
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => 6
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 11
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0
                                                    [NetAmountTaxable] => 11
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 73
                            [name] => dsd fsfsf(ratuddll@testtt.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 90
                            [Line1] => 2500 Garcia Ave
                            [Line2] => Sydney NSW  2050
                        )

                    [GlobalTaxCalculation] => TaxExcluded
                    [TotalAmt] => 11
                    [HomeTotalAmt] => 11
                    [PrintStatus] => NotSet
                    [Balance] => 0
                    [HomeBalance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 3
                            [name] => Credit Card
                        )

                    [DepositToAccountRef] => Array
                        (
                            [value] => 108
                            [name] => Undeposited Funds
                        )

                )

            [time] => 2025-07-21T10:37:51.686-07:00
        )

)

[21-Jul-2025 17:37:52 UTC] Refund receipt created successfully in QBO. Refund Receipt ID: 230
[21-Jul-2025 17:37:52 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[21-Jul-2025 17:46:44 UTC] Stripe Webhook Received: refund.created (ID: evt_3RnKh5CDiOqgoJOU10Oah9WW)
[21-Jul-2025 17:46:44 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[21-Jul-2025 17:46:44 UTC] Starting refund receipt creation process for event: evt_3RnKh5CDiOqgoJOU10Oah9WW
[21-Jul-2025 17:46:44 UTC] Refund details:
[21-Jul-2025 17:46:44 UTC]  - ID: re_3RnKh5CDiOqgoJOU1fqo29jb
[21-Jul-2025 17:46:44 UTC]  - Amount: 11
[21-Jul-2025 17:46:44 UTC]  - Currency: USD
[21-Jul-2025 17:46:44 UTC]  - Charge ID: ch_3RnKh5CDiOqgoJOU1nDQ1J5T
[21-Jul-2025 17:46:44 UTC]  - Payment Intent ID: pi_3RnKh5CDiOqgoJOU1YC0RmcX
[21-Jul-2025 17:46:44 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[21-Jul-2025 17:46:44 UTC] Refund already processed. QBO Refund Receipt ID: 230
[21-Jul-2025 17:47:43 UTC] Stripe Webhook Received: refund.created (ID: evt_3RnKh5CDiOqgoJOU10Oah9WW)
[21-Jul-2025 17:47:43 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[21-Jul-2025 17:47:43 UTC] Starting refund receipt creation process for event: evt_3RnKh5CDiOqgoJOU10Oah9WW
[21-Jul-2025 17:47:43 UTC] Refund details:
[21-Jul-2025 17:47:43 UTC]  - ID: re_3RnKh5CDiOqgoJOU1fqo29jb
[21-Jul-2025 17:47:43 UTC]  - Amount: 11
[21-Jul-2025 17:47:43 UTC]  - Currency: USD
[21-Jul-2025 17:47:43 UTC]  - Charge ID: ch_3RnKh5CDiOqgoJOU1nDQ1J5T
[21-Jul-2025 17:47:43 UTC]  - Payment Intent ID: pi_3RnKh5CDiOqgoJOU1YC0RmcX
[21-Jul-2025 17:47:43 UTC] Accounts verified successfully
[21-Jul-2025 17:47:43 UTC] Fetching payment intent details for ID: pi_3RnKh5CDiOqgoJOU1YC0RmcX
[21-Jul-2025 17:47:43 UTC] Successfully retrieved payment intent details
[21-Jul-2025 17:47:43 UTC] Payment intent retrieved successfully
[21-Jul-2025 17:47:43 UTC] Fetching charge details for ID: ch_3RnKh5CDiOqgoJOU1nDQ1J5T
[21-Jul-2025 17:47:43 UTC] Successfully retrieved charge details
[21-Jul-2025 17:47:43 UTC] No customer email from payment intent, trying charge
[21-Jul-2025 17:47:43 UTC] Customer details from charge:
[21-Jul-2025 17:47:43 UTC]  - Name: ffff ffff
[21-Jul-2025 17:47:43 UTC]  - Email: ratuddll@testtt.com
[21-Jul-2025 17:47:44 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 107
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-19T09:32:07-07:00
                                            [LastUpdatedTime] => 2025-07-19T09:32:07-07:00
                                        )

                                    [GivenName] => dsd fsfsf
                                    [FamilyName] => dsd fsfsf
                                    [FullyQualifiedName] => dsd fsfsf(ratuddll@testtt.com)
                                    [DisplayName] => dsd fsfsf(ratuddll@testtt.com)
                                    [PrintOnCheckName] => dsd fsfsf dsd fsfsf
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098fca0813f1de74d7a869cb3c3abb3348a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratuddll@testtt.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-21T10:47:44.713-07:00
        )

)

[21-Jul-2025 17:47:44 UTC] Using QBO customer ID: 107
[21-Jul-2025 17:47:45 UTC] Could not determine QuickBooks company country, assuming non-US
[21-Jul-2025 17:47:45 UTC] Account type: International
[21-Jul-2025 17:47:45 UTC] Tax exempt ID from settings: 6
[21-Jul-2025 17:47:45 UTC] Applied tax code ref: 6 for non-US account
[21-Jul-2025 17:47:45 UTC] Using refund line item with product: Refund
[21-Jul-2025 17:47:46 UTC] Using payment method: card (QBO ID: 1)
[21-Jul-2025 17:47:46 UTC] Using deposit account ID: 4
[21-Jul-2025 17:47:46 UTC] Prepared refund receipt data:
[21-Jul-2025 17:47:46 UTC] Array
(
    [CustomerRef] => Array
        (
            [value] => 107
        )

    [TotalAmt] => 11
    [TxnDate] => 2025-07-21
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [PaymentRefNum] => re_3RnKh5CDiOqgoJOU1fqo29jb
    [PrivateNote] => Stripe Refund for Charge: ch_3RnKh5CDiOqgoJOU1nDQ1J5T (Payment Intent: pi_3RnKh5CDiOqgoJOU1YC0RmcX)
    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 11
                    [Description] => Refund
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 28
                                )

                            [UnitPrice] => 11
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => 6
                                )

                        )

                )

        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[21-Jul-2025 17:47:46 UTC] QBO API response:
[21-Jul-2025 17:47:46 UTC] Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Invalid Line TaxCode in the request
                                    [Detail] => Valid line TaxCodes for US should be TAX or NON. Supplied value: 6
                                    [code] => 6100
                                    [element] => Line.SalesItemLineDetail.TaxCodeRef
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-21T10:47:46.892-07:00
        )

)

[21-Jul-2025 17:47:46 UTC] Refund receipt creation failed: Failed to create refund receipt in QuickBooks: Invalid Line TaxCode in the request
[21-Jul-2025 17:47:46 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[21-Jul-2025 17:51:51 UTC] Stripe Webhook Received: refund.created (ID: evt_3RnKh5CDiOqgoJOU10Oah9WW)
[21-Jul-2025 17:51:51 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[21-Jul-2025 17:51:51 UTC] Starting refund receipt creation process for event: evt_3RnKh5CDiOqgoJOU10Oah9WW
[21-Jul-2025 17:51:51 UTC] Refund details:
[21-Jul-2025 17:51:51 UTC]  - ID: re_3RnKh5CDiOqgoJOU1fqo29jb
[21-Jul-2025 17:51:51 UTC]  - Amount: 11
[21-Jul-2025 17:51:51 UTC]  - Currency: USD
[21-Jul-2025 17:51:51 UTC]  - Charge ID: ch_3RnKh5CDiOqgoJOU1nDQ1J5T
[21-Jul-2025 17:51:51 UTC]  - Payment Intent ID: pi_3RnKh5CDiOqgoJOU1YC0RmcX
[21-Jul-2025 17:51:51 UTC] Accounts verified successfully
[21-Jul-2025 17:51:51 UTC] Fetching payment intent details for ID: pi_3RnKh5CDiOqgoJOU1YC0RmcX
[21-Jul-2025 17:51:52 UTC] Successfully retrieved payment intent details
[21-Jul-2025 17:51:52 UTC] Payment intent retrieved successfully
[21-Jul-2025 17:51:52 UTC] Fetching charge details for ID: ch_3RnKh5CDiOqgoJOU1nDQ1J5T
[21-Jul-2025 17:51:52 UTC] Successfully retrieved charge details
[21-Jul-2025 17:51:52 UTC] No customer email from payment intent, trying charge
[21-Jul-2025 17:51:52 UTC] Customer details from charge:
[21-Jul-2025 17:51:52 UTC]  - Name: ffff ffff
[21-Jul-2025 17:51:52 UTC]  - Email: ratuddll@testtt.com
[21-Jul-2025 17:51:53 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 107
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-19T09:32:07-07:00
                                            [LastUpdatedTime] => 2025-07-19T09:32:07-07:00
                                        )

                                    [GivenName] => dsd fsfsf
                                    [FamilyName] => dsd fsfsf
                                    [FullyQualifiedName] => dsd fsfsf(ratuddll@testtt.com)
                                    [DisplayName] => dsd fsfsf(ratuddll@testtt.com)
                                    [PrintOnCheckName] => dsd fsfsf dsd fsfsf
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098fca0813f1de74d7a869cb3c3abb3348a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratuddll@testtt.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-21T10:51:53.218-07:00
        )

)

[21-Jul-2025 17:51:53 UTC] Using QBO customer ID: 107
[21-Jul-2025 17:51:53 UTC] Could not determine QuickBooks company country, assuming non-US
[21-Jul-2025 17:51:53 UTC] Account type: International
[21-Jul-2025 17:51:53 UTC] Tax exempt ID from settings: 6
[21-Jul-2025 17:51:54 UTC] Applied tax code ref: 6 for non-US account
[21-Jul-2025 17:51:54 UTC] Applied tax code ref: 6 for non-US account
[21-Jul-2025 17:51:54 UTC] Using refund line item with product: Refund
[21-Jul-2025 17:51:54 UTC] Using payment method: card (QBO ID: 1)
[21-Jul-2025 17:51:54 UTC] Using deposit account ID: 4
[21-Jul-2025 17:51:54 UTC] Prepared refund receipt data:
[21-Jul-2025 17:51:54 UTC] Array
(
    [CustomerRef] => Array
        (
            [value] => 107
        )

    [TotalAmt] => 11
    [TxnDate] => 2025-07-21
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [PaymentRefNum] => re_3RnKh5CDiOqgoJOU1fqo29jb
    [PrivateNote] => Stripe Refund for Charge: ch_3RnKh5CDiOqgoJOU1nDQ1J5T (Payment Intent: pi_3RnKh5CDiOqgoJOU1YC0RmcX)
    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 11
                    [Description] => Refund
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 28
                                )

                            [UnitPrice] => 11
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => 6
                                )

                        )

                )

        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[21-Jul-2025 17:51:55 UTC] QBO API response:
[21-Jul-2025 17:51:55 UTC] Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Invalid Line TaxCode in the request
                                    [Detail] => Valid line TaxCodes for US should be TAX or NON. Supplied value: 6
                                    [code] => 6100
                                    [element] => Line.SalesItemLineDetail.TaxCodeRef
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-21T10:51:55.356-07:00
        )

)

[21-Jul-2025 17:51:55 UTC] Refund receipt creation failed: Failed to create refund receipt in QuickBooks: Invalid Line TaxCode in the request
[21-Jul-2025 17:51:55 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[21-Jul-2025 17:52:51 UTC] Stripe Webhook Received: refund.created (ID: evt_3RnKh5CDiOqgoJOU10Oah9WW)
[21-Jul-2025 17:52:51 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[21-Jul-2025 17:52:51 UTC] Starting refund receipt creation process for event: evt_3RnKh5CDiOqgoJOU10Oah9WW
[21-Jul-2025 17:52:51 UTC] Refund details:
[21-Jul-2025 17:52:51 UTC]  - ID: re_3RnKh5CDiOqgoJOU1fqo29jb
[21-Jul-2025 17:52:51 UTC]  - Amount: 11
[21-Jul-2025 17:52:51 UTC]  - Currency: USD
[21-Jul-2025 17:52:51 UTC]  - Charge ID: ch_3RnKh5CDiOqgoJOU1nDQ1J5T
[21-Jul-2025 17:52:51 UTC]  - Payment Intent ID: pi_3RnKh5CDiOqgoJOU1YC0RmcX
[21-Jul-2025 17:52:51 UTC] Accounts verified successfully
[21-Jul-2025 17:52:51 UTC] Fetching payment intent details for ID: pi_3RnKh5CDiOqgoJOU1YC0RmcX
[21-Jul-2025 17:52:51 UTC] Successfully retrieved payment intent details
[21-Jul-2025 17:52:51 UTC] Payment intent retrieved successfully
[21-Jul-2025 17:52:51 UTC] Fetching charge details for ID: ch_3RnKh5CDiOqgoJOU1nDQ1J5T
[21-Jul-2025 17:52:51 UTC] Successfully retrieved charge details
[21-Jul-2025 17:52:51 UTC] No customer email from payment intent, trying charge
[21-Jul-2025 17:52:51 UTC] Customer details from charge:
[21-Jul-2025 17:52:51 UTC]  - Name: ffff ffff
[21-Jul-2025 17:52:51 UTC]  - Email: ratuddll@testtt.com
[21-Jul-2025 17:52:52 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 107
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-19T09:32:07-07:00
                                            [LastUpdatedTime] => 2025-07-19T09:32:07-07:00
                                        )

                                    [GivenName] => dsd fsfsf
                                    [FamilyName] => dsd fsfsf
                                    [FullyQualifiedName] => dsd fsfsf(ratuddll@testtt.com)
                                    [DisplayName] => dsd fsfsf(ratuddll@testtt.com)
                                    [PrintOnCheckName] => dsd fsfsf dsd fsfsf
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098fca0813f1de74d7a869cb3c3abb3348a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratuddll@testtt.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-21T10:52:52.200-07:00
        )

)

[21-Jul-2025 17:52:52 UTC] Using QBO customer ID: 107
[21-Jul-2025 17:52:52 UTC] Could not determine QuickBooks company country, assuming non-US
[21-Jul-2025 17:52:52 UTC] Account type: International
[21-Jul-2025 17:52:52 UTC] Tax exempt ID from settings: 6
[21-Jul-2025 17:52:53 UTC] Applied tax code ref: 5 for non-US account
[21-Jul-2025 17:52:53 UTC] Using refund line item with product: Refund
[21-Jul-2025 17:52:53 UTC] Using payment method: card (QBO ID: 1)
[21-Jul-2025 17:52:53 UTC] Using deposit account ID: 4
[21-Jul-2025 17:52:53 UTC] Prepared refund receipt data:
[21-Jul-2025 17:52:53 UTC] Array
(
    [CustomerRef] => Array
        (
            [value] => 107
        )

    [TotalAmt] => 11
    [TxnDate] => 2025-07-21
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [PaymentRefNum] => re_3RnKh5CDiOqgoJOU1fqo29jb
    [PrivateNote] => Stripe Refund for Charge: ch_3RnKh5CDiOqgoJOU1nDQ1J5T (Payment Intent: pi_3RnKh5CDiOqgoJOU1YC0RmcX)
    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 11
                    [Description] => Refund
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 28
                                )

                            [UnitPrice] => 11
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                        )

                )

        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[21-Jul-2025 17:52:54 UTC] QBO API response:
[21-Jul-2025 17:52:54 UTC] Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Invalid Line TaxCode in the request
                                    [Detail] => Valid line TaxCodes for US should be TAX or NON. Supplied value: 5
                                    [code] => 6100
                                    [element] => Line.SalesItemLineDetail.TaxCodeRef
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-21T10:52:54.242-07:00
        )

)

[21-Jul-2025 17:52:54 UTC] Refund receipt creation failed: Failed to create refund receipt in QuickBooks: Invalid Line TaxCode in the request
[21-Jul-2025 17:52:54 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[21-Jul-2025 17:53:57 UTC] Stripe Webhook Received: refund.created (ID: evt_3RnKh5CDiOqgoJOU10Oah9WW)
[21-Jul-2025 17:53:57 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[21-Jul-2025 17:53:57 UTC] Starting refund receipt creation process for event: evt_3RnKh5CDiOqgoJOU10Oah9WW
[21-Jul-2025 17:53:57 UTC] Refund details:
[21-Jul-2025 17:53:57 UTC]  - ID: re_3RnKh5CDiOqgoJOU1fqo29jb
[21-Jul-2025 17:53:57 UTC]  - Amount: 11
[21-Jul-2025 17:53:57 UTC]  - Currency: USD
[21-Jul-2025 17:53:57 UTC]  - Charge ID: ch_3RnKh5CDiOqgoJOU1nDQ1J5T
[21-Jul-2025 17:53:57 UTC]  - Payment Intent ID: pi_3RnKh5CDiOqgoJOU1YC0RmcX
[21-Jul-2025 17:53:57 UTC] Accounts verified successfully
[21-Jul-2025 17:53:57 UTC] Fetching payment intent details for ID: pi_3RnKh5CDiOqgoJOU1YC0RmcX
[21-Jul-2025 17:53:57 UTC] Successfully retrieved payment intent details
[21-Jul-2025 17:53:57 UTC] Payment intent retrieved successfully
[21-Jul-2025 17:53:57 UTC] Fetching charge details for ID: ch_3RnKh5CDiOqgoJOU1nDQ1J5T
[21-Jul-2025 17:53:58 UTC] Successfully retrieved charge details
[21-Jul-2025 17:53:58 UTC] No customer email from payment intent, trying charge
[21-Jul-2025 17:53:58 UTC] Customer details from charge:
[21-Jul-2025 17:53:58 UTC]  - Name: ffff ffff
[21-Jul-2025 17:53:58 UTC]  - Email: ratuddll@testtt.com
[21-Jul-2025 17:53:58 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 107
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-19T09:32:07-07:00
                                            [LastUpdatedTime] => 2025-07-19T09:32:07-07:00
                                        )

                                    [GivenName] => dsd fsfsf
                                    [FamilyName] => dsd fsfsf
                                    [FullyQualifiedName] => dsd fsfsf(ratuddll@testtt.com)
                                    [DisplayName] => dsd fsfsf(ratuddll@testtt.com)
                                    [PrintOnCheckName] => dsd fsfsf dsd fsfsf
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098fca0813f1de74d7a869cb3c3abb3348a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratuddll@testtt.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-21T10:53:58.794-07:00
        )

)

[21-Jul-2025 17:53:58 UTC] Using QBO customer ID: 107
[21-Jul-2025 17:53:59 UTC] Could not determine QuickBooks company country, assuming non-US
[21-Jul-2025 17:53:59 UTC] Account type: International
[21-Jul-2025 17:53:59 UTC] Tax exempt ID from settings: 7
[21-Jul-2025 17:53:59 UTC] Applied tax code ref: 5 for non-US account
[21-Jul-2025 17:53:59 UTC] Applied tax code ref: 5 for non-US account
[21-Jul-2025 17:53:59 UTC] Using refund line item with product: Refund
[21-Jul-2025 17:54:00 UTC] Using payment method: card (QBO ID: 1)
[21-Jul-2025 17:54:00 UTC] Using deposit account ID: 4
[21-Jul-2025 17:54:00 UTC] Prepared refund receipt data:
[21-Jul-2025 17:54:00 UTC] Array
(
    [CustomerRef] => Array
        (
            [value] => 107
        )

    [TotalAmt] => 11
    [TxnDate] => 2025-07-21
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [PaymentRefNum] => re_3RnKh5CDiOqgoJOU1fqo29jb
    [PrivateNote] => Stripe Refund for Charge: ch_3RnKh5CDiOqgoJOU1nDQ1J5T (Payment Intent: pi_3RnKh5CDiOqgoJOU1YC0RmcX)
    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 11
                    [Description] => Refund
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 28
                                )

                            [UnitPrice] => 11
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                        )

                )

        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[21-Jul-2025 17:54:00 UTC] QBO API response:
[21-Jul-2025 17:54:00 UTC] Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Invalid Line TaxCode in the request
                                    [Detail] => Valid line TaxCodes for US should be TAX or NON. Supplied value: 5
                                    [code] => 6100
                                    [element] => Line.SalesItemLineDetail.TaxCodeRef
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-21T10:54:00.904-07:00
        )

)

[21-Jul-2025 17:54:00 UTC] Refund receipt creation failed: Failed to create refund receipt in QuickBooks: Invalid Line TaxCode in the request
[21-Jul-2025 17:54:00 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[21-Jul-2025 17:56:44 UTC] Stripe Webhook Received: refund.created (ID: evt_3RnKh5CDiOqgoJOU10Oah9WW)
[21-Jul-2025 17:56:44 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[21-Jul-2025 17:56:44 UTC] Starting refund receipt creation process for event: evt_3RnKh5CDiOqgoJOU10Oah9WW
[21-Jul-2025 17:56:44 UTC] Refund details:
[21-Jul-2025 17:56:44 UTC]  - ID: re_3RnKh5CDiOqgoJOU1fqo29jb
[21-Jul-2025 17:56:44 UTC]  - Amount: 11
[21-Jul-2025 17:56:44 UTC]  - Currency: USD
[21-Jul-2025 17:56:44 UTC]  - Charge ID: ch_3RnKh5CDiOqgoJOU1nDQ1J5T
[21-Jul-2025 17:56:44 UTC]  - Payment Intent ID: pi_3RnKh5CDiOqgoJOU1YC0RmcX
[21-Jul-2025 17:56:44 UTC] Accounts verified successfully
[21-Jul-2025 17:56:44 UTC] Fetching payment intent details for ID: pi_3RnKh5CDiOqgoJOU1YC0RmcX
[21-Jul-2025 17:56:45 UTC] Successfully retrieved payment intent details
[21-Jul-2025 17:56:45 UTC] Payment intent retrieved successfully
[21-Jul-2025 17:56:45 UTC] Fetching charge details for ID: ch_3RnKh5CDiOqgoJOU1nDQ1J5T
[21-Jul-2025 17:56:45 UTC] Successfully retrieved charge details
[21-Jul-2025 17:56:45 UTC] No customer email from payment intent, trying charge
[21-Jul-2025 17:56:45 UTC] Customer details from charge:
[21-Jul-2025 17:56:45 UTC]  - Name: ffff ffff
[21-Jul-2025 17:56:45 UTC]  - Email: ratuddll@testtt.com
[21-Jul-2025 17:56:46 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 107
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-19T09:32:07-07:00
                                            [LastUpdatedTime] => 2025-07-19T09:32:07-07:00
                                        )

                                    [GivenName] => dsd fsfsf
                                    [FamilyName] => dsd fsfsf
                                    [FullyQualifiedName] => dsd fsfsf(ratuddll@testtt.com)
                                    [DisplayName] => dsd fsfsf(ratuddll@testtt.com)
                                    [PrintOnCheckName] => dsd fsfsf dsd fsfsf
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098fca0813f1de74d7a869cb3c3abb3348a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratuddll@testtt.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-21T10:56:46.482-07:00
        )

)

[21-Jul-2025 17:56:46 UTC] Using QBO customer ID: 107
[21-Jul-2025 17:56:47 UTC] Company info API response: Array
(
    [code] => 200
    [body] => Array
        (
            [CompanyInfo] => Array
                (
                    [CompanyName] => Sandbox Company_US_1
                    [LegalName] => Sandbox Company_US_1
                    [CompanyAddr] => Array
                        (
                            [Id] => 1
                            [Line1] => 123 Sierra Way
                            [City] => San Pablo
                            [CountrySubDivisionCode] => CA
                            [PostalCode] => 87999
                            [Lat] => 36.6788345
                            [Long] => -5.4464622
                        )

                    [CustomerCommunicationAddr] => Array
                        (
                            [Id] => 1
                            [Line1] => 123 Sierra Way
                            [City] => San Pablo
                            [CountrySubDivisionCode] => CA
                            [PostalCode] => 87999
                            [Lat] => 36.6788345
                            [Long] => -5.4464622
                        )

                    [LegalAddr] => Array
                        (
                            [Id] => 1
                            [Line1] => 123 Sierra Way
                            [City] => San Pablo
                            [CountrySubDivisionCode] => CA
                            [PostalCode] => 87999
                            [Lat] => 36.6788345
                            [Long] => -5.4464622
                        )

                    [CustomerCommunicationEmailAddr] => Array
                        (
                            [Address] => ratulbinhasan@gmail.com
                        )

                    [PrimaryPhone] => Array
                        (
                        )

                    [CompanyStartDate] => 2017-07-31
                    [FiscalYearStartMonth] => January
                    [Country] => US
                    [Email] => Array
                        (
                            [Address] => ratulbinhasan@gmail.com
                        )

                    [WebAddr] => Array
                        (
                        )

                    [SupportedLanguages] => en
                    [DefaultTimeZone] => America/Los_Angeles
                    [NameValue] => Array
                        (
                            [0] => Array
                                (
                                    [Name] => NeoEnabled
                                    [Value] => true
                                )

                            [1] => Array
                                (
                                    [Name] => NonTracking
                                    [Value] => false
                                )

                            [2] => Array
                                (
                                    [Name] => IsQbdtMigrated
                                    [Value] => false
                                )

                            [3] => Array
                                (
                                    [Name] => CompanyType
                                    [Value] => Other
                                )

                            [4] => Array
                                (
                                    [Name] => SubscriptionStatus
                                    [Value] => SUBSCRIBED
                                )

                            [5] => Array
                                (
                                    [Name] => OfferingSku
                                    [Value] => QuickBooks Online Plus
                                )

                            [6] => Array
                                (
                                    [Name] => PayrollFeature
                                    [Value] => false
                                )

                            [7] => Array
                                (
                                    [Name] => AccountantFeature
                                    [Value] => false
                                )

                            [8] => Array
                                (
                                    [Name] => QBOIndustryType
                                    [Value] => Landscaping Services
                                )

                            [9] => Array
                                (
                                    [Name] => ItemCategoriesFeature
                                    [Value] => false
                                )

                            [10] => Array
                                (
                                    [Name] => AssignedTime
                                    [Value] => 2017-07-31T13:14:33-07:00
                                )

                        )

                    [domain] => QBO
                    [sparse] => 
                    [Id] => 1
                    [SyncToken] => 11
                    [MetaData] => Array
                        (
                            [CreateTime] => 2017-07-31T01:06:02-07:00
                            [LastUpdatedTime] => 2025-07-10T08:58:44-07:00
                        )

                )

            [time] => 2025-07-21T10:56:47.114-07:00
        )

)

[21-Jul-2025 17:56:47 UTC] QuickBooks company country: US
[21-Jul-2025 17:56:47 UTC] Account type: US
[21-Jul-2025 17:56:47 UTC] Tax exempt ID from settings: 7
[21-Jul-2025 17:56:47 UTC] Applied NON tax code for US account
[21-Jul-2025 17:56:47 UTC] Using refund line item with product: Refund
[21-Jul-2025 17:56:47 UTC] Using payment method: card (QBO ID: 1)
[21-Jul-2025 17:56:48 UTC] Using deposit account ID: 4
[21-Jul-2025 17:56:48 UTC] Prepared refund receipt data:
[21-Jul-2025 17:56:48 UTC] Array
(
    [CustomerRef] => Array
        (
            [value] => 107
        )

    [TotalAmt] => 11
    [TxnDate] => 2025-07-21
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [PaymentRefNum] => re_3RnKh5CDiOqgoJOU1fqo29jb
    [PrivateNote] => Stripe Refund for Charge: ch_3RnKh5CDiOqgoJOU1nDQ1J5T (Payment Intent: pi_3RnKh5CDiOqgoJOU1YC0RmcX)
    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 11
                    [Description] => Refund
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 28
                                )

                            [UnitPrice] => 11
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => NON
                                )

                        )

                )

        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[21-Jul-2025 17:56:49 UTC] QBO API response:
[21-Jul-2025 17:56:49 UTC] Array
(
    [code] => 200
    [body] => Array
        (
            [RefundReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 699
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-21T10:56:49-07:00
                            [LastUpdatedTime] => 2025-07-21T10:56:49-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1290
                    [TxnDate] => 2025-07-21
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Refund for Charge: ch_3RnKh5CDiOqgoJOU1nDQ1J5T (Payment Intent: pi_3RnKh5CDiOqgoJOU1YC0RmcX)
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => Refund
                                    [Amount] => 11
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 28
                                                    [name] => Refund
                                                )

                                            [UnitPrice] => 11
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => NON
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 11
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 107
                            [name] => dsd fsfsf(ratuddll@testtt.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 211
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 11
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-21T10:56:48.413-07:00
        )

)

[21-Jul-2025 17:56:49 UTC] Refund receipt created successfully in QBO. Refund Receipt ID: 699
[21-Jul-2025 17:56:49 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[21-Jul-2025 18:01:40 UTC] Stripe Webhook Received: refund.created (ID: evt_3RnKh5CDiOqgoJOU10Oah9WW)
[21-Jul-2025 18:01:40 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[21-Jul-2025 18:01:40 UTC] Starting refund receipt creation process for event: evt_3RnKh5CDiOqgoJOU10Oah9WW
[21-Jul-2025 18:01:40 UTC] Refund details:
[21-Jul-2025 18:01:40 UTC]  - ID: re_3RnKh5CDiOqgoJOU1fqo29jb
[21-Jul-2025 18:01:40 UTC]  - Amount: 11
[21-Jul-2025 18:01:40 UTC]  - Currency: USD
[21-Jul-2025 18:01:40 UTC]  - Charge ID: ch_3RnKh5CDiOqgoJOU1nDQ1J5T
[21-Jul-2025 18:01:40 UTC]  - Payment Intent ID: pi_3RnKh5CDiOqgoJOU1YC0RmcX
[21-Jul-2025 18:01:40 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[21-Jul-2025 18:01:40 UTC] Refund already processed. QBO Refund Receipt ID: 699
[21-Jul-2025 18:02:17 UTC] Stripe Webhook Received: refund.created (ID: evt_3RnKh5CDiOqgoJOU10Oah9WW)
[21-Jul-2025 18:02:17 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[21-Jul-2025 18:02:17 UTC] Starting refund receipt creation process for event: evt_3RnKh5CDiOqgoJOU10Oah9WW
[21-Jul-2025 18:02:17 UTC] Refund details:
[21-Jul-2025 18:02:17 UTC]  - ID: re_3RnKh5CDiOqgoJOU1fqo29jb
[21-Jul-2025 18:02:17 UTC]  - Amount: 11
[21-Jul-2025 18:02:17 UTC]  - Currency: USD
[21-Jul-2025 18:02:17 UTC]  - Charge ID: ch_3RnKh5CDiOqgoJOU1nDQ1J5T
[21-Jul-2025 18:02:17 UTC]  - Payment Intent ID: pi_3RnKh5CDiOqgoJOU1YC0RmcX
[21-Jul-2025 18:02:17 UTC] Accounts verified successfully
[21-Jul-2025 18:02:17 UTC] Fetching payment intent details for ID: pi_3RnKh5CDiOqgoJOU1YC0RmcX
[21-Jul-2025 18:02:17 UTC] Successfully retrieved payment intent details
[21-Jul-2025 18:02:17 UTC] Payment intent retrieved successfully
[21-Jul-2025 18:02:17 UTC] Fetching charge details for ID: ch_3RnKh5CDiOqgoJOU1nDQ1J5T
[21-Jul-2025 18:02:17 UTC] Successfully retrieved charge details
[21-Jul-2025 18:02:17 UTC] No customer email from payment intent, trying charge
[21-Jul-2025 18:02:17 UTC] Customer details from charge:
[21-Jul-2025 18:02:17 UTC]  - Name: ffff ffff
[21-Jul-2025 18:02:17 UTC]  - Email: ratuddll@testtt.com
[21-Jul-2025 18:02:18 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 73
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-20T03:00:38-07:00
                                            [LastUpdatedTime] => 2025-07-20T03:00:38-07:00
                                        )

                                    [GivenName] => dsd fsfsf
                                    [FamilyName] => dsd fsfsf
                                    [FullyQualifiedName] => dsd fsfsf(ratuddll@testtt.com)
                                    [DisplayName] => dsd fsfsf(ratuddll@testtt.com)
                                    [PrintOnCheckName] => dsd fsfsf dsd fsfsf
                                    [Active] => 1
                                    [V4IDPseudonym] => 002099b3353d0d0dab467597cb929c8e625195
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratuddll@testtt.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-21T11:02:18.085-07:00
        )

)

[21-Jul-2025 18:02:18 UTC] Using QBO customer ID: 73
[21-Jul-2025 18:02:18 UTC] Company info API response: Array
(
    [code] => 200
    [body] => Array
        (
            [CompanyInfo] => Array
                (
                    [CompanyName] => Sandbox Company_AU_4
                    [LegalName] => Sandbox Company_AU_4
                    [CompanyAddr] => Array
                        (
                            [Id] => 1
                            [Line1] => 2500 Garcia Ave
                            [City] => Sydney
                            [Country] => AU
                            [CountrySubDivisionCode] => NSW
                            [PostalCode] => 2050
                            [Lat] => -33.88883879999999
                            [Long] => 151.182562
                        )

                    [CustomerCommunicationAddr] => Array
                        (
                            [Id] => 1
                            [Line1] => 2500 Garcia Ave
                            [City] => Sydney
                            [Country] => AU
                            [CountrySubDivisionCode] => NSW
                            [PostalCode] => 2050
                            [Lat] => -33.88883879999999
                            [Long] => 151.182562
                        )

                    [LegalAddr] => Array
                        (
                            [Id] => 1
                            [Line1] => 2500 Garcia Ave
                            [City] => Sydney
                            [Country] => AU
                            [CountrySubDivisionCode] => NSW
                            [PostalCode] => 2050
                            [Lat] => -33.88883879999999
                            [Long] => 151.182562
                        )

                    [CustomerCommunicationEmailAddr] => Array
                        (
                            [Address] => donotreply@intuit.com
                        )

                    [PrimaryPhone] => Array
                        (
                            [FreeFormNumber] => (02) 1234 5555
                        )

                    [CompanyStartDate] => 2025-07-16
                    [FiscalYearStartMonth] => July
                    [Country] => AU
                    [Email] => Array
                        (
                            [Address] => donotreply@intuit.com
                        )

                    [WebAddr] => Array
                        (
                        )

                    [SupportedLanguages] => en
                    [DefaultTimeZone] => Australia/Sydney
                    [NameValue] => Array
                        (
                            [0] => Array
                                (
                                    [Name] => NeoEnabled
                                    [Value] => true
                                )

                            [1] => Array
                                (
                                    [Name] => NonTracking
                                    [Value] => false
                                )

                            [2] => Array
                                (
                                    [Name] => IsQbdtMigrated
                                    [Value] => false
                                )

                            [3] => Array
                                (
                                    [Name] => IndustryType
                                    [Value] => Party planning services
                                )

                            [4] => Array
                                (
                                    [Name] => CompanyType
                                    [Value] => Sole Proprietor
                                )

                            [5] => Array
                                (
                                    [Name] => IndustryCode
                                    [Value] => 812990
                                )

                            [6] => Array
                                (
                                    [Name] => SubscriptionStatus
                                    [Value] => SUBSCRIBED
                                )

                            [7] => Array
                                (
                                    [Name] => OfferingSku
                                    [Value] => QuickBooks Online Plus
                                )

                            [8] => Array
                                (
                                    [Name] => PayrollFeature
                                    [Value] => false
                                )

                            [9] => Array
                                (
                                    [Name] => AccountantFeature
                                    [Value] => false
                                )

                            [10] => Array
                                (
                                    [Name] => QBOIndustryType
                                    [Value] => Event Planning
                                )

                            [11] => Array
                                (
                                    [Name] => ItemCategoriesFeature
                                    [Value] => true
                                )

                            [12] => Array
                                (
                                    [Name] => AssignedTime
                                    [Value] => 2025-07-16T06:30:23-07:00
                                )

                        )

                    [domain] => QBO
                    [sparse] => 
                    [Id] => 1
                    [SyncToken] => 14
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-16T05:30:22-07:00
                            [LastUpdatedTime] => 2025-07-16T05:30:23-07:00
                        )

                )

            [time] => 2025-07-21T11:02:18.412-07:00
        )

)

[21-Jul-2025 18:02:18 UTC] QuickBooks company country: AU
[21-Jul-2025 18:02:18 UTC] Account type: International
[21-Jul-2025 18:02:18 UTC] Tax exempt ID from settings: 8
[21-Jul-2025 18:02:18 UTC] Applied tax code ref: 8 for non-US account
[21-Jul-2025 18:02:18 UTC] Using refund line item with product: Refund
[21-Jul-2025 18:02:19 UTC] Using payment method: card (QBO ID: 3)
[21-Jul-2025 18:02:19 UTC] Using deposit account ID: 108
[21-Jul-2025 18:02:19 UTC] Prepared refund receipt data:
[21-Jul-2025 18:02:19 UTC] Array
(
    [CustomerRef] => Array
        (
            [value] => 73
        )

    [TotalAmt] => 11
    [TxnDate] => 2025-07-21
    [PaymentMethodRef] => Array
        (
            [value] => 3
        )

    [PaymentRefNum] => re_3RnKh5CDiOqgoJOU1fqo29jb
    [PrivateNote] => Stripe Refund for Charge: ch_3RnKh5CDiOqgoJOU1nDQ1J5T (Payment Intent: pi_3RnKh5CDiOqgoJOU1YC0RmcX)
    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 11
                    [Description] => Refund
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 33
                                )

                            [UnitPrice] => 11
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => 8
                                )

                        )

                )

        )

    [DepositToAccountRef] => Array
        (
            [value] => 108
        )

)

[21-Jul-2025 18:02:20 UTC] QBO API response:
[21-Jul-2025 18:02:20 UTC] Array
(
    [code] => 200
    [body] => Array
        (
            [RefundReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 231
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-21T11:02:20-07:00
                            [LastUpdatedTime] => 2025-07-21T11:02:20-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-07-21
                    [CurrencyRef] => Array
                        (
                            [value] => AUD
                            [name] => Australian Dollar
                        )

                    [ExchangeRate] => 1
                    [PrivateNote] => Stripe Refund for Charge: ch_3RnKh5CDiOqgoJOU1nDQ1J5T (Payment Intent: pi_3RnKh5CDiOqgoJOU1YC0RmcX)
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => Refund
                                    [Amount] => 11
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 33
                                                    [name] => Refund
                                                )

                                            [UnitPrice] => 11
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 81
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => 8
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 11
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0
                                                    [NetAmountTaxable] => 11
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 73
                            [name] => dsd fsfsf(ratuddll@testtt.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 91
                            [Line1] => 2500 Garcia Ave
                            [Line2] => Sydney NSW  2050
                        )

                    [GlobalTaxCalculation] => TaxExcluded
                    [TotalAmt] => 11
                    [HomeTotalAmt] => 11
                    [PrintStatus] => NotSet
                    [Balance] => 0
                    [HomeBalance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 3
                            [name] => Credit Card
                        )

                    [DepositToAccountRef] => Array
                        (
                            [value] => 108
                            [name] => Undeposited Funds
                        )

                )

            [time] => 2025-07-21T11:02:19.841-07:00
        )

)

[21-Jul-2025 18:02:20 UTC] Refund receipt created successfully in QBO. Refund Receipt ID: 231
[21-Jul-2025 18:02:20 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[22-Jul-2025 06:23:59 UTC] Stripe Webhook Received: credit_note.created (ID: evt_1RnZcICDiOqgoJOU3bmIj7oY)
[22-Jul-2025 06:23:59 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[22-Jul-2025 06:23:59 UTC] Starting credit note creation process for event: evt_1RnZcICDiOqgoJOU3bmIj7oY
[22-Jul-2025 06:23:59 UTC] Fetching Stripe credit note: cn_1RnZcHCDiOqgoJOUz6HAW6Yq
[22-Jul-2025 06:23:59 UTC] Fetched Stripe credit note: Array
(
    [id] => cn_1RnZcHCDiOqgoJOUz6HAW6Yq
    [object] => credit_note
    [amount] => 6600
    [amount_shipping] => 0
    [created] => 1753165436
    [currency] => usd
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_balance_transaction] => 
    [discount_amount] => 0
    [discount_amounts] => Array
        (
        )

    [effective_at] => 1753165436
    [invoice] => in_1RnIuoCDiOqgoJOUJGSa78nI
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => cnli_1RnZcHCDiOqgoJOUWrRY0tCU
                            [object] => credit_note_line_item
                            [amount] => 6600
                            [amount_excluding_tax] => 6600
                            [description] => llll
                            [discount_amount] => 0
                            [discount_amounts] => Array
                                (
                                )

                            [invoice_line_item] => il_1RnIv1CDiOqgoJOUUaL7Eeon
                            [livemode] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [quantity] => 1
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 0
                                            [inclusive] => 
                                            [tax_rate] => txr_1RlPxVCDiOqgoJOUtbT35WCR
                                            [taxability_reason] => not_collecting
                                            [taxable_amount] => 0
                                        )

                                )

                            [tax_rates] => Array
                                (
                                    [0] => Array
                                        (
                                            [id] => txr_1RlPxVCDiOqgoJOUtbT35WCR
                                            [object] => tax_rate
                                            [active] => 
                                            [country] => US
                                            [created] => 1752651657
                                            [description] => 
                                            [display_name] => Sales Tax
                                            [effective_percentage] => 0
                                            [flat_amount] => 
                                            [inclusive] => 
                                            [jurisdiction] => California
                                            [jurisdiction_level] => multiple
                                            [livemode] => 
                                            [metadata] => Array
                                                (
                                                )

                                            [percentage] => 9.125
                                            [rate_type] => percentage
                                            [state] => CA
                                            [tax_type] => sales_tax
                                        )

                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 0
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1RlPxVCDiOqgoJOUtbT35WCR
                                                )

                                            [taxability_reason] => not_collecting
                                            [taxable_amount] => 0
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoice_line_item
                            [unit_amount] => 6600
                            [unit_amount_decimal] => 6600
                            [unit_amount_excluding_tax] => 6600
                        )

                )

            [has_more] => 
            [url] => /v1/credit_notes/cn_1RnZcHCDiOqgoJOUz6HAW6Yq/lines
        )

    [livemode] => 
    [memo] => 
    [metadata] => Array
        (
        )

    [number] => RPYUF7UP-0017-CN-01
    [out_of_band_amount] => 
    [pdf] => https://pay.stripe.com/credit_notes/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TajFmR3QwN0ZxM1gwVlM1bDVTaGo1NnNWUUVkZTcyLDE0MzcwNjIzOQ0200EjDmA3kQ/pdf?s=ap
    [post_payment_amount] => 0
    [pre_payment_amount] => 6600
    [pretax_credit_amounts] => Array
        (
        )

    [reason] => order_change
    [refund] => 
    [refunds] => Array
        (
        )

    [shipping_cost] => 
    [status] => issued
    [subtotal] => 6600
    [subtotal_excluding_tax] => 6600
    [tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 0
                    [inclusive] => 
                    [tax_rate] => txr_1RlPxVCDiOqgoJOUtbT35WCR
                    [taxability_reason] => not_collecting
                    [taxable_amount] => 0
                )

        )

    [total] => 6600
    [total_excluding_tax] => 6600
    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 0
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1RlPxVCDiOqgoJOUtbT35WCR
                        )

                    [taxability_reason] => not_collecting
                    [taxable_amount] => 0
                    [type] => tax_rate_details
                )

        )

    [type] => pre_payment
    [voided_at] => 
)

[22-Jul-2025 06:23:59 UTC] Fetching Stripe invoice: in_1RnIuoCDiOqgoJOUJGSa78nI
[22-Jul-2025 06:24:00 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 67.27
                                    [BalanceWithJobs] => 67.27
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 105
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-15T23:59:14-07:00
                                            [LastUpdatedTime] => 2025-07-20T10:59:57-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt testt
                                    [DisplayName] => testt testt
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098127805f7fa6e41dea97e908749fd2b9e
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratulbinhasan.integration@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-21T23:24:00.465-07:00
        )

)

[22-Jul-2025 06:24:00 UTC] Using QBO customer ID: 105
[22-Jul-2025 06:24:01 UTC] Credit memo data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 105
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 66
                    [Description] => llll
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 32
                                )

                            [UnitPrice] => 66
                            [Qty] => 1
                        )

                )

        )

    [TxnDate] => 2025-07-22
    [TotalAmt] => 66
    [PrivateNote] => Stripe Credit Note ID: cn_1RnZcHCDiOqgoJOUz6HAW6Yq
    [DocNumber] => RPYUF7UP-0017-CN-01
    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 0
        )

)

[22-Jul-2025 06:24:01 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [CreditMemo] => Array
                (
                    [RemainingCredit] => 66
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 700
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-21T23:24:02-07:00
                            [LastUpdatedTime] => 2025-07-21T23:24:02-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => RPYUF7UP-0017-CN-01
                    [TxnDate] => 2025-07-22
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Credit Note ID: cn_1RnZcHCDiOqgoJOUz6HAW6Yq
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => llll
                                    [Amount] => 66
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 32
                                                    [name] => llll
                                                )

                                            [UnitPrice] => 66
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-09020802-V1-00120000
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 66
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 66
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 66
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 66
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 66
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 105
                            [name] => testt testt
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 212
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 66
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 66
                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-21T23:24:01.712-07:00
        )

)

[22-Jul-2025 06:24:01 UTC] Credit memo created successfully in QBO. Credit Memo ID: 700
[22-Jul-2025 06:24:01 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[22-Jul-2025 06:32:18 UTC] Stripe Webhook Received: credit_note.created (ID: evt_1RnZkLCDiOqgoJOUnNWPEB3S)
[22-Jul-2025 06:32:18 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[22-Jul-2025 06:32:18 UTC] Starting credit note creation process for event: evt_1RnZkLCDiOqgoJOUnNWPEB3S
[22-Jul-2025 06:32:18 UTC] Fetching Stripe credit note: cn_1RnZkKCDiOqgoJOUFS6VSeXu
[22-Jul-2025 06:32:18 UTC] Fetched Stripe credit note: Array
(
    [id] => cn_1RnZkKCDiOqgoJOUFS6VSeXu
    [object] => credit_note
    [amount] => 7326
    [amount_shipping] => 0
    [created] => 1753165936
    [currency] => usd
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_balance_transaction] => 
    [discount_amount] => 0
    [discount_amounts] => Array
        (
        )

    [effective_at] => 1753165936
    [invoice] => in_1RnZgICDiOqgoJOUCmMUxbsv
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => cnli_1RnZkKCDiOqgoJOUMc0p6x0b
                            [object] => credit_note_line_item
                            [amount] => 6600
                            [amount_excluding_tax] => 6600
                            [description] => llll
                            [discount_amount] => 0
                            [discount_amounts] => Array
                                (
                                )

                            [invoice_line_item] => il_1RnZgICDiOqgoJOUbwJVcRKe
                            [livemode] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [quantity] => 1
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 726
                                            [inclusive] => 
                                            [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                                            [taxability_reason] => 
                                            [taxable_amount] => 6600
                                        )

                                )

                            [tax_rates] => Array
                                (
                                    [0] => Array
                                        (
                                            [id] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                                            [object] => tax_rate
                                            [active] => 1
                                            [country] => US
                                            [created] => 1752935198
                                            [description] => 
                                            [display_name] => Sales tax
                                            [effective_percentage] => 11
                                            [flat_amount] => 
                                            [inclusive] => 
                                            [jurisdiction] => 
                                            [jurisdiction_level] => 
                                            [livemode] => 
                                            [metadata] => Array
                                                (
                                                )

                                            [percentage] => 11
                                            [rate_type] => percentage
                                            [state] => AL
                                            [tax_type] => 
                                        )

                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 726
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 6600
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoice_line_item
                            [unit_amount] => 6600
                            [unit_amount_decimal] => 6600
                            [unit_amount_excluding_tax] => 6600
                        )

                )

            [has_more] => 
            [url] => /v1/credit_notes/cn_1RnZkKCDiOqgoJOUFS6VSeXu/lines
        )

    [livemode] => 
    [memo] => 
    [metadata] => Array
        (
        )

    [number] => RPYUF7UP-0020-CN-01
    [out_of_band_amount] => 
    [pdf] => https://pay.stripe.com/credit_notes/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TajFuQnV3aWlyVEJmWGt3ZmtTZ0xKNUNnejZsN2ZPLDE0MzcwNjczOA0200qdLeH6Hp/pdf?s=ap
    [post_payment_amount] => 0
    [pre_payment_amount] => 7326
    [pretax_credit_amounts] => Array
        (
        )

    [reason] => product_unsatisfactory
    [refund] => 
    [refunds] => Array
        (
        )

    [shipping_cost] => 
    [status] => issued
    [subtotal] => 6600
    [subtotal_excluding_tax] => 6600
    [tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 726
                    [inclusive] => 
                    [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                    [taxability_reason] => 
                    [taxable_amount] => 6600
                )

        )

    [total] => 7326
    [total_excluding_tax] => 6600
    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 726
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 6600
                    [type] => tax_rate_details
                )

        )

    [type] => pre_payment
    [voided_at] => 
)

[22-Jul-2025 06:32:18 UTC] Fetching Stripe invoice: in_1RnZgICDiOqgoJOUCmMUxbsv
[22-Jul-2025 06:32:19 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 1.27
                                    [BalanceWithJobs] => 1.27
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 105
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-15T23:59:14-07:00
                                            [LastUpdatedTime] => 2025-07-21T23:24:02-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt testt
                                    [DisplayName] => testt testt
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098127805f7fa6e41dea97e908749fd2b9e
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratulbinhasan.integration@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-21T23:32:19.708-07:00
        )

)

[22-Jul-2025 06:32:19 UTC] Using QBO customer ID: 105
[22-Jul-2025 06:32:20 UTC] Credit memo data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 105
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 66
                    [Description] => llll
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 32
                                )

                            [UnitPrice] => 66
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-22
    [TotalAmt] => 73.26
    [PrivateNote] => Stripe Credit Note ID: cn_1RnZkKCDiOqgoJOUFS6VSeXu
    [DocNumber] => RPYUF7UP-0020-CN-01
    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 7.26
        )

)

[22-Jul-2025 06:32:21 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [CreditMemo] => Array
                (
                    [RemainingCredit] => 73.26
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 701
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-21T23:32:21-07:00
                            [LastUpdatedTime] => 2025-07-21T23:32:21-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => RPYUF7UP-0020-CN-01
                    [TxnDate] => 2025-07-22
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Credit Note ID: cn_1RnZkKCDiOqgoJOUFS6VSeXu
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => llll
                                    [Amount] => 66
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 32
                                                    [name] => llll
                                                )

                                            [UnitPrice] => 66
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-09020802-V1-00120000
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 66
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 7.26
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0.58
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 66
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 4.77
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 66
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 1.15
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 66
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0.76
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 66
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 105
                            [name] => testt testt
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 213
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 73.26
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 73.26
                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-21T23:32:20.520-07:00
        )

)

[22-Jul-2025 06:32:21 UTC] Credit memo created successfully in QBO. Credit Memo ID: 701
[22-Jul-2025 06:32:21 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[22-Jul-2025 06:58:08 UTC] Stripe Webhook Received: credit_note.created (ID: evt_1RnZkLCDiOqgoJOUnNWPEB3S)
[22-Jul-2025 06:58:08 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[22-Jul-2025 06:58:08 UTC] Starting credit note creation process for event: evt_1RnZkLCDiOqgoJOUnNWPEB3S
[22-Jul-2025 06:58:08 UTC] Fetching Stripe credit note: cn_1RnZkKCDiOqgoJOUFS6VSeXu
[22-Jul-2025 06:58:08 UTC] Fetched Stripe credit note: Array
(
    [id] => cn_1RnZkKCDiOqgoJOUFS6VSeXu
    [object] => credit_note
    [amount] => 7326
    [amount_shipping] => 0
    [created] => 1753165936
    [currency] => usd
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_balance_transaction] => 
    [discount_amount] => 0
    [discount_amounts] => Array
        (
        )

    [effective_at] => 1753165936
    [invoice] => in_1RnZgICDiOqgoJOUCmMUxbsv
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => cnli_1RnZkKCDiOqgoJOUMc0p6x0b
                            [object] => credit_note_line_item
                            [amount] => 6600
                            [amount_excluding_tax] => 6600
                            [description] => llll
                            [discount_amount] => 0
                            [discount_amounts] => Array
                                (
                                )

                            [invoice_line_item] => il_1RnZgICDiOqgoJOUbwJVcRKe
                            [livemode] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [quantity] => 1
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 726
                                            [inclusive] => 
                                            [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                                            [taxability_reason] => 
                                            [taxable_amount] => 6600
                                        )

                                )

                            [tax_rates] => Array
                                (
                                    [0] => Array
                                        (
                                            [id] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                                            [object] => tax_rate
                                            [active] => 1
                                            [country] => US
                                            [created] => 1752935198
                                            [description] => 
                                            [display_name] => Sales tax
                                            [effective_percentage] => 11
                                            [flat_amount] => 
                                            [inclusive] => 
                                            [jurisdiction] => 
                                            [jurisdiction_level] => 
                                            [livemode] => 
                                            [metadata] => Array
                                                (
                                                )

                                            [percentage] => 11
                                            [rate_type] => percentage
                                            [state] => AL
                                            [tax_type] => 
                                        )

                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 726
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 6600
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoice_line_item
                            [unit_amount] => 6600
                            [unit_amount_decimal] => 6600
                            [unit_amount_excluding_tax] => 6600
                        )

                )

            [has_more] => 
            [url] => /v1/credit_notes/cn_1RnZkKCDiOqgoJOUFS6VSeXu/lines
        )

    [livemode] => 
    [memo] => 
    [metadata] => Array
        (
        )

    [number] => RPYUF7UP-0020-CN-01
    [out_of_band_amount] => 
    [pdf] => https://pay.stripe.com/credit_notes/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TajFuQnV3aWlyVEJmWGt3ZmtTZ0xKNUNnejZsN2ZPLDE0MzcwODI4OA0200Zw2q6KGC/pdf?s=ap
    [post_payment_amount] => 0
    [pre_payment_amount] => 7326
    [pretax_credit_amounts] => Array
        (
        )

    [reason] => product_unsatisfactory
    [refund] => 
    [refunds] => Array
        (
        )

    [shipping_cost] => 
    [status] => issued
    [subtotal] => 6600
    [subtotal_excluding_tax] => 6600
    [tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 726
                    [inclusive] => 
                    [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                    [taxability_reason] => 
                    [taxable_amount] => 6600
                )

        )

    [total] => 7326
    [total_excluding_tax] => 6600
    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 726
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 6600
                    [type] => tax_rate_details
                )

        )

    [type] => pre_payment
    [voided_at] => 
)

[22-Jul-2025 06:58:09 UTC] Fetching Stripe invoice: in_1RnZgICDiOqgoJOUCmMUxbsv
[22-Jul-2025 06:58:10 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => -71.99
                                    [BalanceWithJobs] => -71.99
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 105
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-15T23:59:14-07:00
                                            [LastUpdatedTime] => 2025-07-21T23:32:21-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt testt
                                    [DisplayName] => testt testt
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098127805f7fa6e41dea97e908749fd2b9e
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratulbinhasan.integration@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-21T23:58:10.391-07:00
        )

)

[22-Jul-2025 06:58:10 UTC] Using QBO customer ID: 105
[22-Jul-2025 06:58:10 UTC] Credit memo data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 105
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 66
                    [Description] => llll
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 32
                                )

                            [UnitPrice] => 66
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-22
    [TotalAmt] => 73.26
    [PrivateNote] => Stripe Credit Note ID: cn_1RnZkKCDiOqgoJOUFS6VSeXu
    [DocNumber] => RPYUF7UP-0020-CN-01
    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 7.26
        )

)

[22-Jul-2025 06:58:12 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [CreditMemo] => Array
                (
                    [RemainingCredit] => 73.26
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 702
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-21T23:58:12-07:00
                            [LastUpdatedTime] => 2025-07-21T23:58:12-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => RPYUF7UP-0020-CN-01
                    [TxnDate] => 2025-07-22
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Credit Note ID: cn_1RnZkKCDiOqgoJOUFS6VSeXu
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => llll
                                    [Amount] => 66
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 32
                                                    [name] => llll
                                                )

                                            [UnitPrice] => 66
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-09020802-V1-00120000
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 66
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 7.26
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0.58
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 66
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 4.77
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 66
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 1.15
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 66
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0.76
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 66
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 105
                            [name] => testt testt
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 214
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 73.26
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 73.26
                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-21T23:58:11.396-07:00
        )

)

[22-Jul-2025 06:58:12 UTC] Credit memo created successfully in QBO. Credit Memo ID: 702
[22-Jul-2025 06:58:12 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[22-Jul-2025 07:03:52 UTC] Stripe Webhook Received: credit_note.created (ID: evt_1RnZkLCDiOqgoJOUnNWPEB3S)
[22-Jul-2025 07:03:52 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[22-Jul-2025 07:03:52 UTC] Starting credit note creation process for event: evt_1RnZkLCDiOqgoJOUnNWPEB3S
[22-Jul-2025 07:03:52 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[22-Jul-2025 07:03:52 UTC] Credit note already processed. QBO Credit Memo ID: 702
[22-Jul-2025 07:05:10 UTC] Stripe Webhook Received: credit_note.created (ID: evt_1RnZkLCDiOqgoJOUnNWPEB3S)
[22-Jul-2025 07:05:10 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[22-Jul-2025 07:05:10 UTC] Starting credit note creation process for event: evt_1RnZkLCDiOqgoJOUnNWPEB3S
[22-Jul-2025 07:05:10 UTC] Fetching Stripe credit note: cn_1RnZkKCDiOqgoJOUFS6VSeXu
[22-Jul-2025 07:05:10 UTC] Fetched Stripe credit note: Array
(
    [id] => cn_1RnZkKCDiOqgoJOUFS6VSeXu
    [object] => credit_note
    [amount] => 7326
    [amount_shipping] => 0
    [created] => 1753165936
    [currency] => usd
    [customer] => cus_SYxhIfsEqHRWWB
    [customer_balance_transaction] => 
    [discount_amount] => 0
    [discount_amounts] => Array
        (
        )

    [effective_at] => 1753165936
    [invoice] => in_1RnZgICDiOqgoJOUCmMUxbsv
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => cnli_1RnZkKCDiOqgoJOUMc0p6x0b
                            [object] => credit_note_line_item
                            [amount] => 6600
                            [amount_excluding_tax] => 6600
                            [description] => llll
                            [discount_amount] => 0
                            [discount_amounts] => Array
                                (
                                )

                            [invoice_line_item] => il_1RnZgICDiOqgoJOUbwJVcRKe
                            [livemode] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [quantity] => 1
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 726
                                            [inclusive] => 
                                            [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                                            [taxability_reason] => 
                                            [taxable_amount] => 6600
                                        )

                                )

                            [tax_rates] => Array
                                (
                                    [0] => Array
                                        (
                                            [id] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                                            [object] => tax_rate
                                            [active] => 1
                                            [country] => US
                                            [created] => 1752935198
                                            [description] => 
                                            [display_name] => Sales tax
                                            [effective_percentage] => 11
                                            [flat_amount] => 
                                            [inclusive] => 
                                            [jurisdiction] => 
                                            [jurisdiction_level] => 
                                            [livemode] => 
                                            [metadata] => Array
                                                (
                                                )

                                            [percentage] => 11
                                            [rate_type] => percentage
                                            [state] => AL
                                            [tax_type] => 
                                        )

                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 726
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 6600
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoice_line_item
                            [unit_amount] => 6600
                            [unit_amount_decimal] => 6600
                            [unit_amount_excluding_tax] => 6600
                        )

                )

            [has_more] => 
            [url] => /v1/credit_notes/cn_1RnZkKCDiOqgoJOUFS6VSeXu/lines
        )

    [livemode] => 
    [memo] => 
    [metadata] => Array
        (
        )

    [number] => RPYUF7UP-0020-CN-01
    [out_of_band_amount] => 
    [pdf] => https://pay.stripe.com/credit_notes/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TajFuQnV3aWlyVEJmWGt3ZmtTZ0xKNUNnejZsN2ZPLDE0MzcwODcxMA02004npiK6wN/pdf?s=ap
    [post_payment_amount] => 0
    [pre_payment_amount] => 7326
    [pretax_credit_amounts] => Array
        (
        )

    [reason] => product_unsatisfactory
    [refund] => 
    [refunds] => Array
        (
        )

    [shipping_cost] => 
    [status] => issued
    [subtotal] => 6600
    [subtotal_excluding_tax] => 6600
    [tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 726
                    [inclusive] => 
                    [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                    [taxability_reason] => 
                    [taxable_amount] => 6600
                )

        )

    [total] => 7326
    [total_excluding_tax] => 6600
    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 726
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 6600
                    [type] => tax_rate_details
                )

        )

    [type] => pre_payment
    [voided_at] => 
)

[22-Jul-2025 07:05:10 UTC] Fetching Stripe invoice: in_1RnZgICDiOqgoJOUCmMUxbsv
[22-Jul-2025 07:05:11 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 522
                                    [BalanceWithJobs] => 522
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 72
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-20T01:49:53-07:00
                                            [LastUpdatedTime] => 2025-07-21T05:35:02-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt(ratulbinhasan.integration@gmail.com)
                                    [DisplayName] => testt(ratulbinhasan.integration@gmail.com)
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 00209983ece7696ea041089f54f9433e7aaf36
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratulbinhasan.integration@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-22T00:05:11.738-07:00
        )

)

[22-Jul-2025 07:05:11 UTC] Using QBO customer ID: 72
[22-Jul-2025 07:05:12 UTC] Credit memo data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 72
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 66
                    [Description] => llll
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 30
                                )

                            [UnitPrice] => 66
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => 11
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-22
    [TotalAmt] => 73.26
    [PrivateNote] => Stripe Credit Note ID: cn_1RnZkKCDiOqgoJOUFS6VSeXu
    [DocNumber] => RPYUF7UP-0020-CN-01
    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => 11
                )

            [TotalTax] => 7.26
        )

)

[22-Jul-2025 07:05:12 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [CreditMemo] => Array
                (
                    [RemainingCredit] => 73.26
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 232
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-22T00:05:13-07:00
                            [LastUpdatedTime] => 2025-07-22T00:05:13-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [DocNumber] => RPYUF7UP-0020-CN-01
                    [TxnDate] => 2025-07-22
                    [CurrencyRef] => Array
                        (
                            [value] => AUD
                            [name] => Australian Dollar
                        )

                    [ExchangeRate] => 1
                    [PrivateNote] => Stripe Credit Note ID: cn_1RnZkKCDiOqgoJOUFS6VSeXu
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => llll
                                    [Amount] => 66
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 30
                                                    [name] => llll
                                                )

                                            [UnitPrice] => 66
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 81
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => 11
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 66
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 7.26
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 7.26
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 21
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 11
                                                    [NetAmountTaxable] => 66
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 72
                            [name] => testt(ratulbinhasan.integration@gmail.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 92
                            [Line1] => 2500 Garcia Ave
                            [Line2] => Sydney NSW  2050
                        )

                    [GlobalTaxCalculation] => TaxExcluded
                    [TotalAmt] => 73.26
                    [HomeTotalAmt] => 73.26
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 73.26
                    [HomeBalance] => 73.26
                )

            [time] => 2025-07-22T00:05:12.527-07:00
        )

)

[22-Jul-2025 07:05:12 UTC] Credit memo created successfully in QBO. Credit Memo ID: 232
[22-Jul-2025 07:05:12 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[24-Jul-2025 08:16:30 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RoKKFCDiOqgoJOU1arwbXaP)
[24-Jul-2025 08:16:30 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[24-Jul-2025 08:16:30 UTC] Starting sales receipt creation process for event: evt_3RoKKFCDiOqgoJOU1arwbXaP
[24-Jul-2025 08:16:31 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                )

            [time] => 2025-07-24T01:16:31.433-07:00
        )

)

[24-Jul-2025 08:16:32 UTC] Using QBO customer ID: 127
[24-Jul-2025 08:16:32 UTC] Found checkout session: cs_test_a1vW735KmUaq2e988xmu0dUXLwLHPYHrSYXLGFOCZ5Ad2seubaPp690Xqa
[24-Jul-2025 08:16:32 UTC] Session tax amount: $1.92
[24-Jul-2025 08:16:32 UTC] Session subtotal: $24
[24-Jul-2025 08:16:32 UTC] Calculated tax percentage from session: 8%
[24-Jul-2025 08:16:32 UTC] Found checkout session line items: 1
[24-Jul-2025 08:16:32 UTC] Line item: hhhhh, Subtotal: 24, Tax: 1.92, Total: 25.92
[24-Jul-2025 08:16:33 UTC] Total line items amount: 24, Total tax: 1.92
[24-Jul-2025 08:16:34 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 127
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 24
                    [Description] => hhhhh
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 34
                                )

                            [UnitPrice] => 24
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-24
    [TotalAmt] => 25.92
    [PrivateNote] => Stripe Payment Intent ID: pi_3RoKKFCDiOqgoJOU1RK4CLcQ
    [PaymentRefNum] => ch_3RoKKFCDiOqgoJOU1FdOjXE5
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 1.92
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[24-Jul-2025 08:16:35 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 735
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-24T01:16:35-07:00
                            [LastUpdatedTime] => 2025-07-24T01:16:35-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1320
                    [TxnDate] => 2025-07-24
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3RoKKFCDiOqgoJOU1RK4CLcQ
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => hhhhh
                                    [Amount] => 24
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 34
                                                    [name] => hhhhh
                                                )

                                            [UnitPrice] => 24
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-09020802-V1-00120000
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 24
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 1.92
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0.15
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 24
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 1.26
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 24
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0.31
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 24
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0.2
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 24
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 127
                            [name] => ttt tttt(ytyvdft@testtt.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 246
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 25.92
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3RoKKFCDiOqgoJOU1FdOjXE5
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-24T01:16:34.509-07:00
        )

)

[24-Jul-2025 08:16:35 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 735
[24-Jul-2025 08:16:35 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[24-Jul-2025 08:26:29 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RoKTuCDiOqgoJOU04NZty9H)
[24-Jul-2025 08:26:29 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[24-Jul-2025 08:26:29 UTC] Starting sales receipt creation process for event: evt_3RoKTuCDiOqgoJOU04NZty9H
[24-Jul-2025 08:26:30 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 78.81
                                    [BalanceWithJobs] => 78.81
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 117
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-23T06:58:25-07:00
                                            [LastUpdatedTime] => 2025-07-23T06:58:29-07:00
                                        )

                                    [GivenName] => nnn nnn
                                    [FamilyName] => nnn nnn
                                    [FullyQualifiedName] => nnn nnn(nnnn@nnn.com)
                                    [DisplayName] => nnn nnn(nnnn@nnn.com)
                                    [PrintOnCheckName] => nnn nnn nnn nnn
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020980b4c4b9d17dd4fc18ab5235f059bbd8a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => nnnn@nnn.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-24T01:26:30.143-07:00
        )

)

[24-Jul-2025 08:26:30 UTC] Using QBO customer ID: 117
[24-Jul-2025 08:26:30 UTC] Found checkout session: cs_test_a1SEmhj0788HXkt1mkoCyywFu0ElntN9XJyFQ1yONdIaZaS72aIF2lxGoh
[24-Jul-2025 08:26:30 UTC] Session tax amount: $7.92
[24-Jul-2025 08:26:30 UTC] Session subtotal: $99
[24-Jul-2025 08:26:30 UTC] Calculated tax percentage from session: 8%
[24-Jul-2025 08:26:30 UTC] Found checkout session line items: 1
[24-Jul-2025 08:26:30 UTC] Line item: gggg, Subtotal: 99, Tax: 7.92, Total: 106.92
[24-Jul-2025 08:26:31 UTC] Using default 'Stripe Payment' item
[24-Jul-2025 08:26:31 UTC] Total line items amount: 99, Total tax: 7.92
[24-Jul-2025 08:26:32 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 117
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 99
                    [Description] => gggg
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 33
                                )

                            [UnitPrice] => 99
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-24
    [TotalAmt] => 106.92
    [PrivateNote] => Stripe Payment Intent ID: pi_3RoKTuCDiOqgoJOU0fZQI2dp
    [PaymentRefNum] => ch_3RoKTuCDiOqgoJOU0shx800Q
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 7.92
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[24-Jul-2025 08:26:33 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 737
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-24T01:26:33-07:00
                            [LastUpdatedTime] => 2025-07-24T01:26:33-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1322
                    [TxnDate] => 2025-07-24
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3RoKTuCDiOqgoJOU0fZQI2dp
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => gggg
                                    [Amount] => 99
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 33
                                                    [name] => Stripe Payment
                                                )

                                            [UnitPrice] => 99
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-09020802-V1-00120000
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 99
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 7.92
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0.62
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 5.21
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 1.26
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0.83
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 117
                            [name] => nnn nnn(nnnn@nnn.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 248
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 106.92
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3RoKTuCDiOqgoJOU0shx800Q
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-24T01:26:33.055-07:00
        )

)

[24-Jul-2025 08:26:33 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 737
[24-Jul-2025 08:26:33 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[24-Jul-2025 08:38:43 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RoKfkCDiOqgoJOU1cL0otai)
[24-Jul-2025 08:38:43 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[24-Jul-2025 08:38:43 UTC] Starting sales receipt creation process for event: evt_3RoKfkCDiOqgoJOU1cL0otai
[24-Jul-2025 08:38:44 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 78.81
                                    [BalanceWithJobs] => 78.81
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 117
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-23T06:58:25-07:00
                                            [LastUpdatedTime] => 2025-07-23T06:58:29-07:00
                                        )

                                    [GivenName] => nnn nnn
                                    [FamilyName] => nnn nnn
                                    [FullyQualifiedName] => nnn nnn(nnnn@nnn.com)
                                    [DisplayName] => nnn nnn(nnnn@nnn.com)
                                    [PrintOnCheckName] => nnn nnn nnn nnn
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020980b4c4b9d17dd4fc18ab5235f059bbd8a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => nnnn@nnn.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-24T01:38:44.709-07:00
        )

)

[24-Jul-2025 08:38:44 UTC] Using QBO customer ID: 117
[24-Jul-2025 08:38:44 UTC] No Checkout Session found for Payment Intent: pi_3RoKfkCDiOqgoJOU1qrUBpew
[24-Jul-2025 08:38:44 UTC] No line items found from checkout session, trying to get from invoice
[24-Jul-2025 08:38:45 UTC] Found invoice line items: 1
[24-Jul-2025 08:38:45 UTC] Using tax_percent from invoice: 11%
[24-Jul-2025 08:38:45 UTC] Using default 'Stripe Payment' item
[24-Jul-2025 08:38:47 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 117
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 88.11
                    [Description] => 1 × gggg (at $99.00 / day)
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 33
                                )

                            [UnitPrice] => 88.11
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-24
    [TotalAmt] => 109.89
    [PrivateNote] => Stripe Payment Intent ID: pi_3RoKfkCDiOqgoJOU1qrUBpew
    [PaymentRefNum] => ch_3RoKfkCDiOqgoJOU1oEiXplN
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 10.89
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[24-Jul-2025 08:38:48 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 739
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-24T01:38:49-07:00
                            [LastUpdatedTime] => 2025-07-24T01:38:49-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1324
                    [TxnDate] => 2025-07-24
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3RoKfkCDiOqgoJOU1qrUBpew
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => 1 × gggg (at $99.00 / day)
                                    [Amount] => 88.11
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 33
                                                    [name] => Stripe Payment
                                                )

                                            [UnitPrice] => 88.11
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-09020802-V1-00120000
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 88.11
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 10.89
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0.86
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 88.11
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 7.17
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 88.11
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 1.72
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 88.11
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 1.14
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 88.11
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 117
                            [name] => nnn nnn(nnnn@nnn.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 250
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 99
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3RoKfkCDiOqgoJOU1oEiXplN
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-24T01:38:48.582-07:00
        )

)

[24-Jul-2025 08:38:48 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 739
[24-Jul-2025 08:38:48 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[24-Jul-2025 09:05:01 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RoL5CCDiOqgoJOU1xYnXVya)
[24-Jul-2025 09:05:01 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[24-Jul-2025 09:05:01 UTC] Starting sales receipt creation process for event: evt_3RoL5CCDiOqgoJOU1xYnXVya
[24-Jul-2025 09:05:02 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 78.81
                                    [BalanceWithJobs] => 78.81
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 117
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-23T06:58:25-07:00
                                            [LastUpdatedTime] => 2025-07-23T06:58:29-07:00
                                        )

                                    [GivenName] => nnn nnn
                                    [FamilyName] => nnn nnn
                                    [FullyQualifiedName] => nnn nnn(nnnn@nnn.com)
                                    [DisplayName] => nnn nnn(nnnn@nnn.com)
                                    [PrintOnCheckName] => nnn nnn nnn nnn
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020980b4c4b9d17dd4fc18ab5235f059bbd8a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => nnnn@nnn.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-24T02:05:02.327-07:00
        )

)

[24-Jul-2025 09:05:02 UTC] Using QBO customer ID: 117
[24-Jul-2025 09:05:02 UTC] No Checkout Session found for Payment Intent: pi_3RoL5CCDiOqgoJOU1nJqKynJ
[24-Jul-2025 09:05:02 UTC] No line items found from checkout session, trying to get from invoice
[24-Jul-2025 09:05:03 UTC] Found invoice line items: 1
[24-Jul-2025 09:05:04 UTC] Using default 'Stripe Payment' item
[24-Jul-2025 09:05:05 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 117
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 99
                    [Description] => 1 × gggg (at $99.00 / day)
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 33
                                )

                            [UnitPrice] => 99
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => NON
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-24
    [TotalAmt] => 99
    [PrivateNote] => Stripe Payment Intent ID: pi_3RoL5CCDiOqgoJOU1nJqKynJ
    [PaymentRefNum] => ch_3RoL5CCDiOqgoJOU1T7Jzmnl
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[24-Jul-2025 09:05:06 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 740
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-24T02:05:06-07:00
                            [LastUpdatedTime] => 2025-07-24T02:05:06-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1325
                    [TxnDate] => 2025-07-24
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3RoL5CCDiOqgoJOU1nJqKynJ
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => 1 × gggg (at $99.00 / day)
                                    [Amount] => 99
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 33
                                                    [name] => Stripe Payment
                                                )

                                            [UnitPrice] => 99
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => NON
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 99
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 117
                            [name] => nnn nnn(nnnn@nnn.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 251
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 99
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3RoL5CCDiOqgoJOU1T7Jzmnl
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-24T02:05:05.365-07:00
        )

)

[24-Jul-2025 09:05:06 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 740
[24-Jul-2025 09:05:06 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[24-Jul-2025 09:26:21 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RoLPqCDiOqgoJOU0rQGt3pL)
[24-Jul-2025 09:26:21 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[24-Jul-2025 09:26:21 UTC] Starting sales receipt creation process for event: evt_3RoLPqCDiOqgoJOU0rQGt3pL
[24-Jul-2025 09:26:21 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753349181389
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[24-Jul-2025 09:26:21 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753349181462
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[24-Jul-2025 09:26:21 UTC] Sales receipt creation failed: Failed to find or create customer in QuickBooks
[24-Jul-2025 09:26:21 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:497
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(50): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 497
[24-Jul-2025 09:28:48 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RoLSDCDiOqgoJOU1XnIbXg0)
[24-Jul-2025 09:28:48 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[24-Jul-2025 09:28:48 UTC] Starting sales receipt creation process for event: evt_3RoLSDCDiOqgoJOU1XnIbXg0
[24-Jul-2025 09:28:48 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 78.81
                                    [BalanceWithJobs] => 78.81
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 117
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-23T06:58:25-07:00
                                            [LastUpdatedTime] => 2025-07-23T06:58:29-07:00
                                        )

                                    [GivenName] => nnn nnn
                                    [FamilyName] => nnn nnn
                                    [FullyQualifiedName] => nnn nnn(nnnn@nnn.com)
                                    [DisplayName] => nnn nnn(nnnn@nnn.com)
                                    [PrintOnCheckName] => nnn nnn nnn nnn
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020980b4c4b9d17dd4fc18ab5235f059bbd8a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => nnnn@nnn.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-24T02:28:48.817-07:00
        )

)

[24-Jul-2025 09:28:48 UTC] Using QBO customer ID: 117
[24-Jul-2025 09:28:49 UTC] No Checkout Session found for Payment Intent: pi_3RoLSDCDiOqgoJOU1599EmNk
[24-Jul-2025 09:28:49 UTC] No line items found from checkout session, trying to get from invoice
[24-Jul-2025 09:28:49 UTC] Found invoice line items: 1
[24-Jul-2025 09:28:49 UTC] Using tax_percent from invoice: 11%
[24-Jul-2025 09:28:50 UTC] Using default 'Stripe Payment' item
[24-Jul-2025 09:28:51 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 117
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 88.11
                    [Description] => 1 × gggg (at $99.00 / day)
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 33
                                )

                            [UnitPrice] => 88.11
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-24
    [TotalAmt] => 109.89
    [PrivateNote] => Stripe Payment Intent ID: pi_3RoLSDCDiOqgoJOU1599EmNk
    [PaymentRefNum] => ch_3RoLSDCDiOqgoJOU1obKwIgZ
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 10.89
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[24-Jul-2025 09:28:52 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 741
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-24T02:28:52-07:00
                            [LastUpdatedTime] => 2025-07-24T02:28:52-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1326
                    [TxnDate] => 2025-07-24
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3RoLSDCDiOqgoJOU1599EmNk
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => 1 × gggg (at $99.00 / day)
                                    [Amount] => 88.11
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 33
                                                    [name] => Stripe Payment
                                                )

                                            [UnitPrice] => 88.11
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-09020802-V1-00120000
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 88.11
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 10.89
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0.86
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 88.11
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 7.17
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 88.11
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 1.72
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 88.11
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 1.14
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 88.11
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 117
                            [name] => nnn nnn(nnnn@nnn.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 252
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 99
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3RoLSDCDiOqgoJOU1obKwIgZ
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-24T02:28:52.009-07:00
        )

)

[24-Jul-2025 09:28:52 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 741
[24-Jul-2025 09:28:52 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[24-Jul-2025 09:59:45 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RoLSDCDiOqgoJOU1XnIbXg0)
[24-Jul-2025 09:59:45 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[24-Jul-2025 09:59:45 UTC] Starting sales receipt creation process for event: evt_3RoLSDCDiOqgoJOU1XnIbXg0
[24-Jul-2025 09:59:45 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[24-Jul-2025 09:59:45 UTC] Payment intent already processed. QBO Sales Receipt ID: 741
[24-Jul-2025 10:01:41 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RoLSDCDiOqgoJOU1XnIbXg0)
[24-Jul-2025 10:01:41 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[24-Jul-2025 10:01:41 UTC] Starting sales receipt creation process for event: evt_3RoLSDCDiOqgoJOU1XnIbXg0
[24-Jul-2025 10:01:41 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 78.81
                                    [BalanceWithJobs] => 78.81
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 117
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-23T06:58:25-07:00
                                            [LastUpdatedTime] => 2025-07-23T06:58:29-07:00
                                        )

                                    [GivenName] => nnn nnn
                                    [FamilyName] => nnn nnn
                                    [FullyQualifiedName] => nnn nnn(nnnn@nnn.com)
                                    [DisplayName] => nnn nnn(nnnn@nnn.com)
                                    [PrintOnCheckName] => nnn nnn nnn nnn
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020980b4c4b9d17dd4fc18ab5235f059bbd8a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => nnnn@nnn.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-24T03:01:41.845-07:00
        )

)

[24-Jul-2025 10:01:41 UTC] Using QBO customer ID: 117
[24-Jul-2025 10:01:42 UTC] No Checkout Session found for Payment Intent: pi_3RoLSDCDiOqgoJOU1599EmNk
[24-Jul-2025 10:01:42 UTC] No line items found from checkout session, trying to get from invoice
[24-Jul-2025 10:01:42 UTC] Found invoice line items: 1
[24-Jul-2025 10:01:42 UTC] Regular invoice processing - found product data
[24-Jul-2025 10:01:42 UTC] Using tax_percent from invoice: 11%
[24-Jul-2025 10:01:43 UTC] Using default 'Stripe Payment' item
[24-Jul-2025 10:01:44 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 117
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 88.11
                    [Description] => 1 × gggg (at $99.00 / day)
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 33
                                )

                            [UnitPrice] => 88.11
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-24
    [TotalAmt] => 109.89
    [PrivateNote] => Stripe Payment Intent ID: pi_3RoLSDCDiOqgoJOU1599EmNk
    [PaymentRefNum] => ch_3RoLSDCDiOqgoJOU1obKwIgZ
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 10.89
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[24-Jul-2025 10:01:45 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 742
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-24T03:01:45-07:00
                            [LastUpdatedTime] => 2025-07-24T03:01:45-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1327
                    [TxnDate] => 2025-07-24
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3RoLSDCDiOqgoJOU1599EmNk
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => 1 × gggg (at $99.00 / day)
                                    [Amount] => 88.11
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 33
                                                    [name] => Stripe Payment
                                                )

                                            [UnitPrice] => 88.11
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-09020802-V1-00120000
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 88.11
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 10.89
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0.86
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 88.11
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 7.17
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 88.11
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 1.72
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 88.11
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 1.14
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 88.11
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 117
                            [name] => nnn nnn(nnnn@nnn.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 253
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 99
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3RoLSDCDiOqgoJOU1obKwIgZ
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-24T03:01:45.151-07:00
        )

)

[24-Jul-2025 10:01:45 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 742
[24-Jul-2025 10:01:45 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[24-Jul-2025 11:54:46 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RoLSDCDiOqgoJOU1XnIbXg0)
[24-Jul-2025 11:54:46 UTC] No line items found from checkout session, trying to get from invoice
[24-Jul-2025 11:54:46 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[24-Jul-2025 11:54:46 UTC] Starting sales receipt creation process for event: evt_3RoLSDCDiOqgoJOU1XnIbXg0
[24-Jul-2025 11:54:46 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[24-Jul-2025 11:54:46 UTC] Payment intent already processed. QBO Sales Receipt ID: 742
[24-Jul-2025 11:55:32 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RoLSDCDiOqgoJOU1XnIbXg0)
[24-Jul-2025 11:55:32 UTC] No line items found from checkout session, trying to get from invoice
[24-Jul-2025 11:55:32 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[24-Jul-2025 11:55:32 UTC] Starting sales receipt creation process for event: evt_3RoLSDCDiOqgoJOU1XnIbXg0
[24-Jul-2025 11:55:33 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 78.81
                                    [BalanceWithJobs] => 78.81
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 117
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-23T06:58:25-07:00
                                            [LastUpdatedTime] => 2025-07-23T06:58:29-07:00
                                        )

                                    [GivenName] => nnn nnn
                                    [FamilyName] => nnn nnn
                                    [FullyQualifiedName] => nnn nnn(nnnn@nnn.com)
                                    [DisplayName] => nnn nnn(nnnn@nnn.com)
                                    [PrintOnCheckName] => nnn nnn nnn nnn
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020980b4c4b9d17dd4fc18ab5235f059bbd8a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => nnnn@nnn.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-24T04:55:33.382-07:00
        )

)

[24-Jul-2025 11:55:33 UTC] Using QBO customer ID: 117
[24-Jul-2025 11:55:33 UTC] No Checkout Session found for Payment Intent: pi_3RoLSDCDiOqgoJOU1599EmNk
[24-Jul-2025 11:55:33 UTC] No line items found from checkout session, trying to get from invoice
[24-Jul-2025 11:55:34 UTC] Found invoice line items: 1
[24-Jul-2025 11:55:34 UTC] Using tax_percent from invoice: 11%
[24-Jul-2025 11:55:34 UTC] Using default 'Stripe Payment' item
[24-Jul-2025 11:55:36 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 117
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 88.11
                    [Description] => 1 × gggg (at $99.00 / day)
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 33
                                )

                            [UnitPrice] => 88.11
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-24
    [TotalAmt] => 109.89
    [PrivateNote] => Stripe Payment Intent ID: pi_3RoLSDCDiOqgoJOU1599EmNk
    [PaymentRefNum] => ch_3RoLSDCDiOqgoJOU1obKwIgZ
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 10.89
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[24-Jul-2025 11:55:37 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 743
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-24T04:55:37-07:00
                            [LastUpdatedTime] => 2025-07-24T04:55:37-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1328
                    [TxnDate] => 2025-07-24
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3RoLSDCDiOqgoJOU1599EmNk
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => 1 × gggg (at $99.00 / day)
                                    [Amount] => 88.11
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 33
                                                    [name] => Stripe Payment
                                                )

                                            [UnitPrice] => 88.11
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-09020802-V1-00120000
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 88.11
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 10.89
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0.86
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 88.11
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 7.17
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 88.11
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 1.72
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 88.11
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 1.14
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 88.11
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 117
                            [name] => nnn nnn(nnnn@nnn.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 254
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 99
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3RoLSDCDiOqgoJOU1obKwIgZ
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-24T04:55:36.778-07:00
        )

)

[24-Jul-2025 11:55:37 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 743
[24-Jul-2025 11:55:37 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[24-Jul-2025 13:27:51 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RoLSDCDiOqgoJOU1XnIbXg0)
[24-Jul-2025 13:27:51 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[24-Jul-2025 13:27:51 UTC] Starting sales receipt creation process for event: evt_3RoLSDCDiOqgoJOU1XnIbXg0
[24-Jul-2025 13:27:51 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[24-Jul-2025 13:27:51 UTC] Payment intent already processed. QBO Sales Receipt ID: 743
[24-Jul-2025 13:29:15 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RoLSDCDiOqgoJOU1XnIbXg0)
[24-Jul-2025 13:29:15 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[24-Jul-2025 13:29:15 UTC] Starting sales receipt creation process for event: evt_3RoLSDCDiOqgoJOU1XnIbXg0
[24-Jul-2025 13:29:16 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 78.81
                                    [BalanceWithJobs] => 78.81
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 117
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-23T06:58:25-07:00
                                            [LastUpdatedTime] => 2025-07-23T06:58:29-07:00
                                        )

                                    [GivenName] => nnn nnn
                                    [FamilyName] => nnn nnn
                                    [FullyQualifiedName] => nnn nnn(nnnn@nnn.com)
                                    [DisplayName] => nnn nnn(nnnn@nnn.com)
                                    [PrintOnCheckName] => nnn nnn nnn nnn
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020980b4c4b9d17dd4fc18ab5235f059bbd8a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => nnnn@nnn.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-24T06:29:15.901-07:00
        )

)

[24-Jul-2025 13:29:16 UTC] Using QBO customer ID: 117
[24-Jul-2025 13:29:16 UTC] No Checkout Session found for Payment Intent: pi_3RoLSDCDiOqgoJOU1599EmNk
[24-Jul-2025 13:29:16 UTC] No line items found from checkout session, trying to get from invoice
[24-Jul-2025 13:29:16 UTC] Found invoice line items: 1
[24-Jul-2025 13:29:16 UTC] Using tax_percent from invoice: 11%
[24-Jul-2025 13:29:17 UTC] Using default 'Stripe Payment' item
[24-Jul-2025 13:29:18 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 117
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 88.11
                    [Description] => 1 × gggg (at $99.00 / day)
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 33
                                )

                            [UnitPrice] => 88.11
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-24
    [TotalAmt] => 109.89
    [PrivateNote] => Stripe Payment Intent ID: pi_3RoLSDCDiOqgoJOU1599EmNk
    [PaymentRefNum] => ch_3RoLSDCDiOqgoJOU1obKwIgZ
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 10.89
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[24-Jul-2025 13:29:20 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 744
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-24T06:29:19-07:00
                            [LastUpdatedTime] => 2025-07-24T06:29:19-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1329
                    [TxnDate] => 2025-07-24
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3RoLSDCDiOqgoJOU1599EmNk
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => 1 × gggg (at $99.00 / day)
                                    [Amount] => 88.11
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 33
                                                    [name] => Stripe Payment
                                                )

                                            [UnitPrice] => 88.11
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-09020802-V1-00120000
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 88.11
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 10.89
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0.86
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 88.11
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 7.17
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 88.11
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 1.72
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 88.11
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 1.14
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 88.11
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 117
                            [name] => nnn nnn(nnnn@nnn.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 255
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 99
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3RoLSDCDiOqgoJOU1obKwIgZ
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-24T06:29:19.235-07:00
        )

)

[24-Jul-2025 13:29:20 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 744
[24-Jul-2025 13:29:20 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[24-Jul-2025 14:39:00 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RoLSDCDiOqgoJOU1XnIbXg0)
[24-Jul-2025 14:39:00 UTC] PHP Fatal error:  Cannot redeclare get_stripe_customer() (previously declared in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php:79) in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 650
[24-Jul-2025 14:41:06 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RoLSDCDiOqgoJOU1XnIbXg0)
[24-Jul-2025 14:41:06 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[24-Jul-2025 14:41:06 UTC] Starting sales receipt creation process for event: evt_3RoLSDCDiOqgoJOU1XnIbXg0
[24-Jul-2025 14:41:08 UTC] No Checkout Session found for Payment Intent: pi_3RoLSDCDiOqgoJOU1599EmNk
[24-Jul-2025 14:41:09 UTC] Using default 'Stripe Payment' item
[24-Jul-2025 14:41:11 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[24-Jul-2025 16:54:45 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RoLSDCDiOqgoJOU1XnIbXg0)
[24-Jul-2025 16:54:45 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[24-Jul-2025 16:54:45 UTC] Starting sales receipt creation process for event: evt_3RoLSDCDiOqgoJOU1XnIbXg0
[24-Jul-2025 16:54:45 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[24-Jul-2025 16:54:45 UTC] Payment intent already processed. QBO Sales Receipt ID: 745
[24-Jul-2025 16:57:24 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RoLSDCDiOqgoJOU1XnIbXg0)
[24-Jul-2025 16:57:24 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[24-Jul-2025 16:57:24 UTC] Starting sales receipt creation process for event: evt_3RoLSDCDiOqgoJOU1XnIbXg0
[24-Jul-2025 16:57:25 UTC] No Checkout Session found for Payment Intent: pi_3RoLSDCDiOqgoJOU1599EmNk
[24-Jul-2025 16:57:26 UTC] Using default 'Stripe Payment' item
[24-Jul-2025 16:57:29 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[24-Jul-2025 17:02:06 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RoLSDCDiOqgoJOU1XnIbXg0)
[24-Jul-2025 17:02:06 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[24-Jul-2025 17:02:06 UTC] Starting sales receipt creation process for event: evt_3RoLSDCDiOqgoJOU1XnIbXg0
[24-Jul-2025 17:02:06 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[24-Jul-2025 17:02:06 UTC] Payment intent already processed. QBO Sales Receipt ID: 746
[24-Jul-2025 17:04:35 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RoLSDCDiOqgoJOU1XnIbXg0)
[24-Jul-2025 17:04:35 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[24-Jul-2025 17:04:35 UTC] Starting sales receipt creation process for event: evt_3RoLSDCDiOqgoJOU1XnIbXg0
[24-Jul-2025 17:04:36 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 78.81
                                    [BalanceWithJobs] => 78.81
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 117
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-23T06:58:25-07:00
                                            [LastUpdatedTime] => 2025-07-23T06:58:29-07:00
                                        )

                                    [GivenName] => nnn nnn
                                    [FamilyName] => nnn nnn
                                    [FullyQualifiedName] => nnn nnn(nnnn@nnn.com)
                                    [DisplayName] => nnn nnn(nnnn@nnn.com)
                                    [PrintOnCheckName] => nnn nnn nnn nnn
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020980b4c4b9d17dd4fc18ab5235f059bbd8a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => nnnn@nnn.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-24T10:04:36.850-07:00
        )

)

[24-Jul-2025 17:04:36 UTC] Using QBO customer ID: 117
[24-Jul-2025 17:04:37 UTC] No Checkout Session found for Payment Intent: pi_3RoLSDCDiOqgoJOU1599EmNk
[24-Jul-2025 17:04:37 UTC] No line items found from checkout session, trying to get from invoice
[24-Jul-2025 17:04:37 UTC] Found invoice line items: 1
[24-Jul-2025 17:04:37 UTC] Using tax_percent from invoice: 11%
[24-Jul-2025 17:04:38 UTC] Using default 'Stripe Payment' item
[24-Jul-2025 17:04:40 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 117
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 88.11
                    [Description] => 1 × gggg (at $99.00 / day)
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 33
                                )

                            [UnitPrice] => 88.11
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-24
    [TotalAmt] => 109.89
    [PrivateNote] => Stripe Payment Intent ID: pi_3RoLSDCDiOqgoJOU1599EmNk
    [PaymentRefNum] => ch_3RoLSDCDiOqgoJOU1obKwIgZ
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 10.89
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[24-Jul-2025 17:04:40 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 747
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-24T10:04:41-07:00
                            [LastUpdatedTime] => 2025-07-24T10:04:41-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1332
                    [TxnDate] => 2025-07-24
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3RoLSDCDiOqgoJOU1599EmNk
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => 1 × gggg (at $99.00 / day)
                                    [Amount] => 88.11
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 33
                                                    [name] => Stripe Payment
                                                )

                                            [UnitPrice] => 88.11
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-09020802-V1-00120000
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 88.11
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 10.89
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0.86
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 88.11
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 7.17
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 88.11
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 1.72
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 88.11
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 1.14
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 88.11
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 117
                            [name] => nnn nnn(nnnn@nnn.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 258
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 99
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3RoLSDCDiOqgoJOU1obKwIgZ
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-24T10:04:40.372-07:00
        )

)

[24-Jul-2025 17:04:40 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 747
[24-Jul-2025 17:04:40 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[25-Jul-2025 09:27:28 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RohuTCDiOqgoJOU0Sv5PGPl)
[25-Jul-2025 09:27:28 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[25-Jul-2025 09:27:28 UTC] Starting sales receipt creation process for event: evt_3RohuTCDiOqgoJOU0Sv5PGPl
[25-Jul-2025 09:27:28 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753435648419
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[25-Jul-2025 09:27:28 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753435648605
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[25-Jul-2025 09:27:28 UTC] Sales receipt creation failed: Failed to find or create customer in QuickBooks
[25-Jul-2025 09:27:28 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:497
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(50): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 497
[25-Jul-2025 09:40:16 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Roi6rCDiOqgoJOU0jlGS0V9)
[25-Jul-2025 09:40:16 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[25-Jul-2025 09:40:16 UTC] Starting sales receipt creation process for event: evt_3Roi6rCDiOqgoJOU0jlGS0V9
[25-Jul-2025 09:40:16 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753436416373
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[25-Jul-2025 09:40:16 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753436416555
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[25-Jul-2025 09:40:16 UTC] Sales receipt creation failed: Failed to find or create customer in QuickBooks
[25-Jul-2025 09:40:16 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:497
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(50): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 497
[25-Jul-2025 10:05:47 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RoiVYCDiOqgoJOU1M4ngbLS)
[25-Jul-2025 10:05:47 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[25-Jul-2025 10:05:47 UTC] Starting sales receipt creation process for event: evt_3RoiVYCDiOqgoJOU1M4ngbLS
[25-Jul-2025 10:05:47 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753437947334
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[25-Jul-2025 10:05:47 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753437947513
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[25-Jul-2025 10:05:47 UTC] Sales receipt creation failed: Failed to find or create customer in QuickBooks
[25-Jul-2025 10:05:47 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:497
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(50): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 497
[25-Jul-2025 10:27:05 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RoiqBCDiOqgoJOU06nV4xPr)
[25-Jul-2025 10:27:05 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[25-Jul-2025 10:27:05 UTC] Starting sales receipt creation process for event: evt_3RoiqBCDiOqgoJOU06nV4xPr
[25-Jul-2025 10:27:06 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753439226185
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[25-Jul-2025 10:27:06 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753439226385
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[25-Jul-2025 10:27:06 UTC] Sales receipt creation failed: Failed to find or create customer in QuickBooks
[25-Jul-2025 10:27:06 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:497
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(50): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 497
[25-Jul-2025 10:29:22 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RoisNCDiOqgoJOU0DD0Dg3z)
[25-Jul-2025 10:29:22 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[25-Jul-2025 10:29:22 UTC] Starting sales receipt creation process for event: evt_3RoisNCDiOqgoJOU0DD0Dg3z
[25-Jul-2025 10:29:22 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753439362634
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[25-Jul-2025 10:29:22 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753439362832
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[25-Jul-2025 10:29:22 UTC] Sales receipt creation failed: Failed to find or create customer in QuickBooks
[25-Jul-2025 10:29:22 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:497
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(50): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 497
[26-Jul-2025 09:27:04 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rp4NdCDiOqgoJOU11ErK7cu)
[26-Jul-2025 09:27:04 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[26-Jul-2025 09:27:04 UTC] Starting sales receipt creation process for event: evt_3Rp4NdCDiOqgoJOU11ErK7cu
[26-Jul-2025 09:27:04 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753522024376
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[26-Jul-2025 09:27:04 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753522024567
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[26-Jul-2025 09:27:04 UTC] Sales receipt creation failed: Failed to find or create customer in QuickBooks
[26-Jul-2025 09:27:04 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:497
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(50): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 497
[26-Jul-2025 09:39:33 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rp4ZiCDiOqgoJOU0TxYCf7O)
[26-Jul-2025 09:39:33 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[26-Jul-2025 09:39:33 UTC] Starting sales receipt creation process for event: evt_3Rp4ZiCDiOqgoJOU0TxYCf7O
[26-Jul-2025 09:39:33 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753522773420
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[26-Jul-2025 09:39:33 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753522773605
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[26-Jul-2025 09:39:33 UTC] Sales receipt creation failed: Failed to find or create customer in QuickBooks
[26-Jul-2025 09:39:33 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:497
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(50): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 497
[26-Jul-2025 10:06:49 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rp506CDiOqgoJOU1176LhrL)
[26-Jul-2025 10:06:49 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[26-Jul-2025 10:06:49 UTC] Starting sales receipt creation process for event: evt_3Rp506CDiOqgoJOU1176LhrL
[26-Jul-2025 10:06:49 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753524409860
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[26-Jul-2025 10:06:50 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753524410056
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[26-Jul-2025 10:06:50 UTC] Sales receipt creation failed: Failed to find or create customer in QuickBooks
[26-Jul-2025 10:06:50 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:497
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(50): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 497
[26-Jul-2025 10:26:55 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rp5JZCDiOqgoJOU1DhBCt7C)
[26-Jul-2025 10:26:55 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[26-Jul-2025 10:26:55 UTC] Starting sales receipt creation process for event: evt_3Rp5JZCDiOqgoJOU1DhBCt7C
[26-Jul-2025 10:26:56 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753525616155
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[26-Jul-2025 10:26:56 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753525616332
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[26-Jul-2025 10:26:56 UTC] Sales receipt creation failed: Failed to find or create customer in QuickBooks
[26-Jul-2025 10:26:56 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:497
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(50): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 497
[26-Jul-2025 10:29:43 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rp5MGCDiOqgoJOU1enG5AcN)
[26-Jul-2025 10:29:43 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[26-Jul-2025 10:29:43 UTC] Starting sales receipt creation process for event: evt_3Rp5MGCDiOqgoJOU1enG5AcN
[26-Jul-2025 10:29:43 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753525783493
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[26-Jul-2025 10:29:43 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753525783697
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[26-Jul-2025 10:29:43 UTC] Sales receipt creation failed: Failed to find or create customer in QuickBooks
[26-Jul-2025 10:29:43 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:497
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(50): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 497
[27-Jul-2025 09:27:23 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RpQrUCDiOqgoJOU1x8WYPqK)
[27-Jul-2025 09:27:23 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[27-Jul-2025 09:27:23 UTC] Starting sales receipt creation process for event: evt_3RpQrUCDiOqgoJOU1x8WYPqK
[27-Jul-2025 09:27:24 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753608444160
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[27-Jul-2025 09:27:24 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753608444351
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[27-Jul-2025 09:27:24 UTC] Sales receipt creation failed: Failed to find or create customer in QuickBooks
[27-Jul-2025 09:27:24 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:497
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(50): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 497
[27-Jul-2025 09:39:43 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RpR3RCDiOqgoJOU0aHAVsWz)
[27-Jul-2025 09:39:43 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[27-Jul-2025 09:39:43 UTC] Starting sales receipt creation process for event: evt_3RpR3RCDiOqgoJOU0aHAVsWz
[27-Jul-2025 09:39:43 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753609183845
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[27-Jul-2025 09:39:44 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753609184026
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[27-Jul-2025 09:39:44 UTC] Sales receipt creation failed: Failed to find or create customer in QuickBooks
[27-Jul-2025 09:39:44 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:497
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(50): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 497
[27-Jul-2025 10:06:32 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RpRTNCDiOqgoJOU0l1W9WZt)
[27-Jul-2025 10:06:32 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[27-Jul-2025 10:06:32 UTC] Starting sales receipt creation process for event: evt_3RpRTNCDiOqgoJOU0l1W9WZt
[27-Jul-2025 10:06:32 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753610792548
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[27-Jul-2025 10:06:32 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753610792730
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[27-Jul-2025 10:06:32 UTC] Sales receipt creation failed: Failed to find or create customer in QuickBooks
[27-Jul-2025 10:06:32 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:497
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(50): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 497
[27-Jul-2025 10:27:52 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RpRo1CDiOqgoJOU0SiQiIaN)
[27-Jul-2025 10:27:52 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[27-Jul-2025 10:27:52 UTC] Starting sales receipt creation process for event: evt_3RpRo1CDiOqgoJOU0SiQiIaN
[27-Jul-2025 10:27:52 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753612072741
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[27-Jul-2025 10:27:52 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753612072924
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[27-Jul-2025 10:27:52 UTC] Sales receipt creation failed: Failed to find or create customer in QuickBooks
[27-Jul-2025 10:27:52 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:497
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(50): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 497
[27-Jul-2025 10:30:15 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RpRqLCDiOqgoJOU1iliPTwP)
[27-Jul-2025 10:30:15 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[27-Jul-2025 10:30:15 UTC] Starting sales receipt creation process for event: evt_3RpRqLCDiOqgoJOU1iliPTwP
[27-Jul-2025 10:30:15 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753612215898
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[27-Jul-2025 10:30:16 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753612216094
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[27-Jul-2025 10:30:16 UTC] Sales receipt creation failed: Failed to find or create customer in QuickBooks
[27-Jul-2025 10:30:16 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:497
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(50): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 497
[28-Jul-2025 08:23:11 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RoLSDCDiOqgoJOU1XnIbXg0)
[28-Jul-2025 08:23:11 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[28-Jul-2025 08:23:11 UTC] Starting sales receipt creation process for event: evt_3RoLSDCDiOqgoJOU1XnIbXg0
[28-Jul-2025 08:23:11 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[28-Jul-2025 08:23:11 UTC] Payment intent already processed. QBO Sales Receipt ID: 747
[28-Jul-2025 08:24:18 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RoLSDCDiOqgoJOU1XnIbXg0)
[28-Jul-2025 08:24:18 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[28-Jul-2025 08:24:18 UTC] Starting sales receipt creation process for event: evt_3RoLSDCDiOqgoJOU1XnIbXg0
[28-Jul-2025 08:24:18 UTC] Payment type: subscription
[28-Jul-2025 08:24:19 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 78.81
                                    [BalanceWithJobs] => 78.81
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 117
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-23T06:58:25-07:00
                                            [LastUpdatedTime] => 2025-07-23T06:58:29-07:00
                                        )

                                    [GivenName] => nnn nnn
                                    [FamilyName] => nnn nnn
                                    [FullyQualifiedName] => nnn nnn(nnnn@nnn.com)
                                    [DisplayName] => nnn nnn(nnnn@nnn.com)
                                    [PrintOnCheckName] => nnn nnn nnn nnn
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020980b4c4b9d17dd4fc18ab5235f059bbd8a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => nnnn@nnn.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-28T01:24:19.072-07:00
        )

)

[28-Jul-2025 08:24:19 UTC] Using QBO customer ID: 117
[28-Jul-2025 08:24:19 UTC] Processing as subscription payment
[28-Jul-2025 08:24:19 UTC] Processing subscription invoice line items: 1
[28-Jul-2025 08:24:19 UTC] Using tax_percent from invoice: 11%
[28-Jul-2025 08:24:20 UTC] Using default 'Stripe Payment' item
[28-Jul-2025 08:24:20 UTC] Processed subscription line item: gggg, Amount: 99, Tax: 10.89
[28-Jul-2025 08:24:20 UTC] Processed subscription line items: 1 items, Total tax: $10.89
[28-Jul-2025 08:24:21 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 117
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 88.11
                    [Description] => Subscription payment
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 33
                                )

                            [UnitPrice] => 88.11
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-24
    [TotalAmt] => 109.89
    [PrivateNote] => Stripe Payment Intent ID: pi_3RoLSDCDiOqgoJOU1599EmNk (Subscription)
    [PaymentRefNum] => ch_3RoLSDCDiOqgoJOU1obKwIgZ
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 10.89
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[28-Jul-2025 08:24:23 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 748
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-28T01:24:22-07:00
                            [LastUpdatedTime] => 2025-07-28T01:24:22-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1333
                    [TxnDate] => 2025-07-24
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3RoLSDCDiOqgoJOU1599EmNk (Subscription)
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => Subscription payment
                                    [Amount] => 88.11
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 33
                                                    [name] => Stripe Payment
                                                )

                                            [UnitPrice] => 88.11
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-09020802-V1-00120000
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 88.11
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 10.89
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0.86
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 88.11
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 7.17
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 88.11
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 1.72
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 88.11
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 1.14
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 88.11
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 117
                            [name] => nnn nnn(nnnn@nnn.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 259
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 99
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3RoLSDCDiOqgoJOU1obKwIgZ
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-28T01:24:22.158-07:00
        )

)

[28-Jul-2025 08:24:23 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 748
[28-Jul-2025 08:24:23 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[28-Jul-2025 09:28:00 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RpnLdCDiOqgoJOU1cSrA30V)
[28-Jul-2025 09:28:00 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[28-Jul-2025 09:28:00 UTC] Starting sales receipt creation process for event: evt_3RpnLdCDiOqgoJOU1cSrA30V
[28-Jul-2025 09:28:00 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753694880514
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[28-Jul-2025 09:28:00 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753694880701
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[28-Jul-2025 09:28:00 UTC] Sales receipt creation failed: Failed to find or create customer in QuickBooks
[28-Jul-2025 09:28:00 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:497
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(50): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 497
[28-Jul-2025 09:39:59 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RpnXECDiOqgoJOU0pCbwkJQ)
[28-Jul-2025 09:39:59 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[28-Jul-2025 09:39:59 UTC] Starting sales receipt creation process for event: evt_3RpnXECDiOqgoJOU0pCbwkJQ
[28-Jul-2025 09:39:59 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753695599704
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[28-Jul-2025 09:39:59 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753695599893
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[28-Jul-2025 09:39:59 UTC] Sales receipt creation failed: Failed to find or create customer in QuickBooks
[28-Jul-2025 09:39:59 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:497
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(50): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 497
[28-Jul-2025 10:06:10 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RpnwZCDiOqgoJOU1lrnrxLt)
[28-Jul-2025 10:06:10 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[28-Jul-2025 10:06:10 UTC] Starting sales receipt creation process for event: evt_3RpnwZCDiOqgoJOU1lrnrxLt
[28-Jul-2025 10:06:10 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753697170531
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[28-Jul-2025 10:06:10 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753697170712
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[28-Jul-2025 10:06:10 UTC] Sales receipt creation failed: Failed to find or create customer in QuickBooks
[28-Jul-2025 10:06:10 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:497
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/stripe-webhook.php(50): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 497
[28-Jul-2025 10:19:04 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RoLSDCDiOqgoJOU1XnIbXg0)
[28-Jul-2025 10:19:04 UTC] PHP Fatal error:  Cannot redeclare get_stripe_customer() (previously declared in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php:79) in /home/wdsklsxvqb/automationv.com/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 797
[28-Jul-2025 10:19:43 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RoLSDCDiOqgoJOU1XnIbXg0)
[28-Jul-2025 10:19:43 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[28-Jul-2025 10:19:43 UTC] Starting sales receipt creation process for event: evt_3RoLSDCDiOqgoJOU1XnIbXg0
[28-Jul-2025 10:19:43 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[28-Jul-2025 10:19:43 UTC] Payment intent already processed. QBO Sales Receipt ID: 748
[28-Jul-2025 10:20:42 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RoLSDCDiOqgoJOU1XnIbXg0)
[28-Jul-2025 10:20:42 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[28-Jul-2025 10:20:42 UTC] Starting sales receipt creation process for event: evt_3RoLSDCDiOqgoJOU1XnIbXg0
[28-Jul-2025 10:20:43 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 78.81
                                    [BalanceWithJobs] => 78.81
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 117
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-23T06:58:25-07:00
                                            [LastUpdatedTime] => 2025-07-23T06:58:29-07:00
                                        )

                                    [GivenName] => nnn nnn
                                    [FamilyName] => nnn nnn
                                    [FullyQualifiedName] => nnn nnn(nnnn@nnn.com)
                                    [DisplayName] => nnn nnn(nnnn@nnn.com)
                                    [PrintOnCheckName] => nnn nnn nnn nnn
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020980b4c4b9d17dd4fc18ab5235f059bbd8a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => nnnn@nnn.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-28T03:20:43.191-07:00
        )

)

[28-Jul-2025 10:20:43 UTC] Using QBO customer ID: 117
[28-Jul-2025 10:20:43 UTC] No Checkout Session found for Payment Intent: pi_3RoLSDCDiOqgoJOU1599EmNk
[28-Jul-2025 10:20:43 UTC] No line items found from checkout session, trying to get from invoice
[28-Jul-2025 10:20:43 UTC] Found invoice line items: 1
[28-Jul-2025 10:20:43 UTC] Processing subscription invoice
[28-Jul-2025 10:20:45 UTC] Using default 'Stripe Payment' item
[28-Jul-2025 10:20:46 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 117
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 99
                    [Description] => 1 × gggg (at $99.00 / day)
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 33
                                )

                            [UnitPrice] => 99
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-24
    [TotalAmt] => 109.89
    [PrivateNote] => Stripe Payment Intent ID: pi_3RoLSDCDiOqgoJOU1599EmNk
    [PaymentRefNum] => ch_3RoLSDCDiOqgoJOU1obKwIgZ
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 10.89
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[28-Jul-2025 10:20:47 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 749
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-28T03:20:47-07:00
                            [LastUpdatedTime] => 2025-07-28T03:20:47-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1334
                    [TxnDate] => 2025-07-24
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3RoLSDCDiOqgoJOU1599EmNk
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => 1 × gggg (at $99.00 / day)
                                    [Amount] => 99
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 33
                                                    [name] => Stripe Payment
                                                )

                                            [UnitPrice] => 99
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-09020802-V1-00120000
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 99
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 10.89
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0.86
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 7.16
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 1.72
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 1.15
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 117
                            [name] => nnn nnn(nnnn@nnn.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 260
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 109.89
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3RoLSDCDiOqgoJOU1obKwIgZ
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-28T03:20:46.657-07:00
        )

)

[28-Jul-2025 10:20:47 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 749
[28-Jul-2025 10:20:47 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[28-Jul-2025 10:27:35 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RpoHICDiOqgoJOU0ZKaUpXs)
[28-Jul-2025 10:27:35 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[28-Jul-2025 10:27:35 UTC] Starting sales receipt creation process for event: evt_3RpoHICDiOqgoJOU0ZKaUpXs
[28-Jul-2025 10:27:36 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 78.81
                                    [BalanceWithJobs] => 78.81
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 117
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-23T06:58:25-07:00
                                            [LastUpdatedTime] => 2025-07-23T06:58:29-07:00
                                        )

                                    [GivenName] => nnn nnn
                                    [FamilyName] => nnn nnn
                                    [FullyQualifiedName] => nnn nnn(nnnn@nnn.com)
                                    [DisplayName] => nnn nnn(nnnn@nnn.com)
                                    [PrintOnCheckName] => nnn nnn nnn nnn
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020980b4c4b9d17dd4fc18ab5235f059bbd8a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => nnnn@nnn.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-28T03:27:36.348-07:00
        )

)

[28-Jul-2025 10:27:36 UTC] Using QBO customer ID: 117
[28-Jul-2025 10:27:36 UTC] No Checkout Session found for Payment Intent: pi_3RpoHICDiOqgoJOU0VkxYlj2
[28-Jul-2025 10:27:36 UTC] No line items found from checkout session, trying to get from invoice
[28-Jul-2025 10:27:37 UTC] Found invoice line items: 1
[28-Jul-2025 10:27:37 UTC] Processing subscription invoice
[28-Jul-2025 10:27:38 UTC] Using default 'Stripe Payment' item
[28-Jul-2025 10:27:39 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 117
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 99
                    [Description] => 1 × gggg (at $99.00 / day)
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 33
                                )

                            [UnitPrice] => 99
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-28
    [TotalAmt] => 109.89
    [PrivateNote] => Stripe Payment Intent ID: pi_3RpoHICDiOqgoJOU0VkxYlj2
    [PaymentRefNum] => ch_3RpoHICDiOqgoJOU0oZ4OCnr
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 10.89
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[28-Jul-2025 10:27:40 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 750
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-28T03:27:40-07:00
                            [LastUpdatedTime] => 2025-07-28T03:27:40-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1335
                    [TxnDate] => 2025-07-28
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3RpoHICDiOqgoJOU0VkxYlj2
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => 1 × gggg (at $99.00 / day)
                                    [Amount] => 99
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 33
                                                    [name] => Stripe Payment
                                                )

                                            [UnitPrice] => 99
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-09020802-V1-00120000
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 99
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 10.89
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0.86
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 7.16
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 1.72
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 1.15
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 117
                            [name] => nnn nnn(nnnn@nnn.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 261
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 109.89
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3RpoHICDiOqgoJOU0oZ4OCnr
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-28T03:27:39.935-07:00
        )

)

[28-Jul-2025 10:27:40 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 750
[28-Jul-2025 10:27:40 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[28-Jul-2025 10:28:54 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rn0omCDiOqgoJOU0Jdq6VOz)
[28-Jul-2025 10:28:54 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[28-Jul-2025 10:28:54 UTC] Starting sales receipt creation process for event: evt_3Rn0omCDiOqgoJOU0Jdq6VOz
[28-Jul-2025 10:28:54 UTC] No customer email in charge details, trying to get from invoice
[28-Jul-2025 10:28:54 UTC] Found customer details from invoice: ratulbinhasan.integration@gmail.com
[28-Jul-2025 10:28:55 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 26.92
                                    [BalanceWithJobs] => 26.92
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 105
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-15T23:59:14-07:00
                                            [LastUpdatedTime] => 2025-07-23T02:10:32-07:00
                                        )

                                    [GivenName] => testt
                                    [FamilyName] => testt
                                    [FullyQualifiedName] => testt testt
                                    [DisplayName] => testt testt
                                    [PrintOnCheckName] => testt testt
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098127805f7fa6e41dea97e908749fd2b9e
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => ratulbinhasan.integration@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-28T03:28:55.511-07:00
        )

)

[28-Jul-2025 10:28:55 UTC] Using QBO customer ID: 105
[28-Jul-2025 10:28:55 UTC] No Checkout Session found for Payment Intent: pi_3Rn0omCDiOqgoJOU0CKszRxP
[28-Jul-2025 10:28:55 UTC] No line items found from checkout session, trying to get from invoice
[28-Jul-2025 10:28:56 UTC] Found invoice line items: 2
[28-Jul-2025 10:28:56 UTC] Using tax_percent from invoice: 11%
[28-Jul-2025 10:28:58 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 105
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 293.7
                    [Description] => llll
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 32
                                )

                            [UnitPrice] => 58.74
                            [Qty] => 5
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

            [1] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 861.52
                    [Description] => losttt
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 31
                                )

                            [UnitPrice] => 39.16
                            [Qty] => 22
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-20
    [TotalAmt] => 1440.78
    [PrivateNote] => Stripe Payment Intent ID: pi_3Rn0omCDiOqgoJOU0CKszRxP
    [PaymentRefNum] => ch_3Rn0omCDiOqgoJOU0Lr9v729
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 142.78
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[28-Jul-2025 10:28:59 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 751
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-28T03:28:59-07:00
                            [LastUpdatedTime] => 2025-07-28T03:28:59-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1336
                    [TxnDate] => 2025-07-20
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3Rn0omCDiOqgoJOU0CKszRxP
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => llll
                                    [Amount] => 293.7
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 32
                                                    [name] => llll
                                                )

                                            [UnitPrice] => 58.74
                                            [Qty] => 5
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-09020802-V1-00120000
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Id] => 2
                                    [LineNum] => 2
                                    [Description] => losttt
                                    [Amount] => 861.52
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 31
                                                    [name] => losttt
                                                )

                                            [UnitPrice] => 39.16
                                            [Qty] => 22
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-09020802-V1-00120000
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [2] => Array
                                (
                                    [Amount] => 1155.22
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 142.78
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 11.27
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 1155.22
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 93.93
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 1155.22
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 22.54
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 1155.22
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 15.04
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 1155.22
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 105
                            [name] => testt testt
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 262
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 1298
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3Rn0omCDiOqgoJOU0Lr9v729
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-28T03:28:58.753-07:00
        )

)

[28-Jul-2025 10:28:59 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 751
[28-Jul-2025 10:28:59 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[28-Jul-2025 10:30:37 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RpoKFCDiOqgoJOU0mAp3TIy)
[28-Jul-2025 10:30:37 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[28-Jul-2025 10:30:37 UTC] Starting sales receipt creation process for event: evt_3RpoKFCDiOqgoJOU0mAp3TIy
[28-Jul-2025 10:30:38 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 78.81
                                    [BalanceWithJobs] => 78.81
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 117
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-23T06:58:25-07:00
                                            [LastUpdatedTime] => 2025-07-23T06:58:29-07:00
                                        )

                                    [GivenName] => nnn nnn
                                    [FamilyName] => nnn nnn
                                    [FullyQualifiedName] => nnn nnn(nnnn@nnn.com)
                                    [DisplayName] => nnn nnn(nnnn@nnn.com)
                                    [PrintOnCheckName] => nnn nnn nnn nnn
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020980b4c4b9d17dd4fc18ab5235f059bbd8a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => nnnn@nnn.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-28T03:30:38.428-07:00
        )

)

[28-Jul-2025 10:30:38 UTC] Using QBO customer ID: 117
[28-Jul-2025 10:30:38 UTC] No Checkout Session found for Payment Intent: pi_3RpoKFCDiOqgoJOU04fIfeox
[28-Jul-2025 10:30:38 UTC] No line items found from checkout session, trying to get from invoice
[28-Jul-2025 10:30:39 UTC] Found invoice line items: 1
[28-Jul-2025 10:30:39 UTC] Processing subscription invoice
[28-Jul-2025 10:30:40 UTC] Using default 'Stripe Payment' item
[28-Jul-2025 10:30:41 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 117
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 99
                    [Description] => 1 × gggg (at $99.00 / day)
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 33
                                )

                            [UnitPrice] => 99
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-28
    [TotalAmt] => 109.89
    [PrivateNote] => Stripe Payment Intent ID: pi_3RpoKFCDiOqgoJOU04fIfeox
    [PaymentRefNum] => ch_3RpoKFCDiOqgoJOU0ogbO2tu
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 10.89
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[28-Jul-2025 10:30:42 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 752
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-28T03:30:42-07:00
                            [LastUpdatedTime] => 2025-07-28T03:30:42-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1337
                    [TxnDate] => 2025-07-28
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3RpoKFCDiOqgoJOU04fIfeox
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => 1 × gggg (at $99.00 / day)
                                    [Amount] => 99
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 33
                                                    [name] => Stripe Payment
                                                )

                                            [UnitPrice] => 99
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-09020802-V1-00120000
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 99
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 10.89
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0.86
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 7.16
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 1.72
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 1.15
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 117
                            [name] => nnn nnn(nnnn@nnn.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 263
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 109.89
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3RpoKFCDiOqgoJOU0ogbO2tu
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-28T03:30:41.686-07:00
        )

)

[28-Jul-2025 10:30:42 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 752
[28-Jul-2025 10:30:42 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[28-Jul-2025 12:13:37 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RpoKFCDiOqgoJOU0mAp3TIy)
[28-Jul-2025 12:13:37 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[28-Jul-2025 12:13:37 UTC] Starting sales receipt creation process for event: evt_3RpoKFCDiOqgoJOU0mAp3TIy
[28-Jul-2025 12:13:37 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[28-Jul-2025 12:13:37 UTC] Payment intent already processed. QBO Sales Receipt ID: 752
[28-Jul-2025 12:14:22 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RpoKFCDiOqgoJOU0mAp3TIy)
[28-Jul-2025 12:14:22 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[28-Jul-2025 12:14:22 UTC] Starting sales receipt creation process for event: evt_3RpoKFCDiOqgoJOU0mAp3TIy
[28-Jul-2025 12:14:23 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 78.81
                                    [BalanceWithJobs] => 78.81
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 117
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-23T06:58:25-07:00
                                            [LastUpdatedTime] => 2025-07-23T06:58:29-07:00
                                        )

                                    [GivenName] => nnn nnn
                                    [FamilyName] => nnn nnn
                                    [FullyQualifiedName] => nnn nnn(nnnn@nnn.com)
                                    [DisplayName] => nnn nnn(nnnn@nnn.com)
                                    [PrintOnCheckName] => nnn nnn nnn nnn
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020980b4c4b9d17dd4fc18ab5235f059bbd8a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => nnnn@nnn.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-28T05:14:23.085-07:00
        )

)

[28-Jul-2025 12:14:23 UTC] Using QBO customer ID: 117
[28-Jul-2025 12:14:23 UTC] No Checkout Session found for Payment Intent: pi_3RpoKFCDiOqgoJOU04fIfeox
[28-Jul-2025 12:14:23 UTC] No line items found from checkout session, trying to get from invoice
[28-Jul-2025 12:14:23 UTC] Found invoice line items: 1
[28-Jul-2025 12:14:23 UTC] Processing subscription invoice
[28-Jul-2025 12:14:25 UTC] Using default 'Stripe Payment' item
[28-Jul-2025 12:14:26 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 117
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 99
                    [Description] => 1 × gggg (at $99.00 / day)
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 33
                                )

                            [UnitPrice] => 99
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-28
    [TotalAmt] => 109.89
    [PrivateNote] => Stripe Payment Intent ID: pi_3RpoKFCDiOqgoJOU04fIfeox
    [PaymentRefNum] => ch_3RpoKFCDiOqgoJOU0ogbO2tu
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 10.89
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[28-Jul-2025 12:14:27 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 753
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-28T05:14:27-07:00
                            [LastUpdatedTime] => 2025-07-28T05:14:27-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1338
                    [TxnDate] => 2025-07-28
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3RpoKFCDiOqgoJOU04fIfeox
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => 1 × gggg (at $99.00 / day)
                                    [Amount] => 99
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 33
                                                    [name] => Stripe Payment
                                                )

                                            [UnitPrice] => 99
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-09020802-V1-00120000
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 99
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 10.89
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0.86
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 7.16
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 1.72
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 1.15
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 117
                            [name] => nnn nnn(nnnn@nnn.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 264
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 109.89
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3RpoKFCDiOqgoJOU0ogbO2tu
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-28T05:14:26.582-07:00
        )

)

[28-Jul-2025 12:14:27 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 753
[28-Jul-2025 12:14:27 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[28-Jul-2025 12:18:51 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RpoKFCDiOqgoJOU0mAp3TIy)
[28-Jul-2025 12:18:51 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[28-Jul-2025 12:18:51 UTC] Starting sales receipt creation process for event: evt_3RpoKFCDiOqgoJOU0mAp3TIy
[28-Jul-2025 12:18:51 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 78.81
                                    [BalanceWithJobs] => 78.81
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 117
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-23T06:58:25-07:00
                                            [LastUpdatedTime] => 2025-07-23T06:58:29-07:00
                                        )

                                    [GivenName] => nnn nnn
                                    [FamilyName] => nnn nnn
                                    [FullyQualifiedName] => nnn nnn(nnnn@nnn.com)
                                    [DisplayName] => nnn nnn(nnnn@nnn.com)
                                    [PrintOnCheckName] => nnn nnn nnn nnn
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020980b4c4b9d17dd4fc18ab5235f059bbd8a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => nnnn@nnn.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-28T05:18:51.671-07:00
        )

)

[28-Jul-2025 12:18:51 UTC] Using QBO customer ID: 117
[28-Jul-2025 12:18:52 UTC] No Checkout Session found for Payment Intent: pi_3RpoKFCDiOqgoJOU04fIfeox
[28-Jul-2025 12:18:52 UTC] No line items found from checkout session, trying to get from invoice
[28-Jul-2025 12:18:52 UTC] Found invoice line items: 1
[28-Jul-2025 12:18:52 UTC] Processing subscription invoice
[28-Jul-2025 12:18:53 UTC] Using default 'Stripe Payment' item
[28-Jul-2025 12:18:54 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 117
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 99
                    [Description] => 1 × gggg (at $99.00 / day)
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 33
                                )

                            [UnitPrice] => 99
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-28
    [TotalAmt] => 109.89
    [PrivateNote] => Stripe Payment Intent ID: pi_3RpoKFCDiOqgoJOU04fIfeox
    [PaymentRefNum] => ch_3RpoKFCDiOqgoJOU0ogbO2tu
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 10.89
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[28-Jul-2025 12:18:55 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 754
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-28T05:18:55-07:00
                            [LastUpdatedTime] => 2025-07-28T05:18:55-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1339
                    [TxnDate] => 2025-07-28
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3RpoKFCDiOqgoJOU04fIfeox
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => 1 × gggg (at $99.00 / day)
                                    [Amount] => 99
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 33
                                                    [name] => Stripe Payment
                                                )

                                            [UnitPrice] => 99
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-09020802-V1-00120000
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 99
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 10.89
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0.86
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 7.16
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 1.72
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 1.15
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 117
                            [name] => nnn nnn(nnnn@nnn.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 265
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 109.89
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3RpoKFCDiOqgoJOU0ogbO2tu
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-28T05:18:55.045-07:00
        )

)

[28-Jul-2025 12:18:55 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 754
[28-Jul-2025 12:18:55 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[28-Jul-2025 12:23:28 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RpoKFCDiOqgoJOU0mAp3TIy)
[28-Jul-2025 12:23:28 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[28-Jul-2025 12:23:28 UTC] Starting sales receipt creation process for event: evt_3RpoKFCDiOqgoJOU0mAp3TIy
[28-Jul-2025 12:23:29 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 78.81
                                    [BalanceWithJobs] => 78.81
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 117
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-23T06:58:25-07:00
                                            [LastUpdatedTime] => 2025-07-23T06:58:29-07:00
                                        )

                                    [GivenName] => nnn nnn
                                    [FamilyName] => nnn nnn
                                    [FullyQualifiedName] => nnn nnn(nnnn@nnn.com)
                                    [DisplayName] => nnn nnn(nnnn@nnn.com)
                                    [PrintOnCheckName] => nnn nnn nnn nnn
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020980b4c4b9d17dd4fc18ab5235f059bbd8a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => nnnn@nnn.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-28T05:23:29.198-07:00
        )

)

[28-Jul-2025 12:23:29 UTC] Using QBO customer ID: 117
[28-Jul-2025 12:23:29 UTC] No Checkout Session found for Payment Intent: pi_3RpoKFCDiOqgoJOU04fIfeox
[28-Jul-2025 12:23:29 UTC] No line items found from checkout session, trying to get from invoice
[28-Jul-2025 12:23:29 UTC] Found invoice line items: 1
[28-Jul-2025 12:23:29 UTC] Processing subscription invoice
[28-Jul-2025 12:23:30 UTC] Using product name from Stripe: gggg
[28-Jul-2025 12:23:31 UTC] Using default 'Stripe Payment' item
[28-Jul-2025 12:23:32 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 117
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 99
                    [Description] => 1 × gggg (at $99.00 / day)
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 33
                                )

                            [UnitPrice] => 99
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-28
    [TotalAmt] => 109.89
    [PrivateNote] => Stripe Payment Intent ID: pi_3RpoKFCDiOqgoJOU04fIfeox
    [PaymentRefNum] => ch_3RpoKFCDiOqgoJOU0ogbO2tu
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 10.89
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[28-Jul-2025 12:23:33 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 755
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-28T05:23:33-07:00
                            [LastUpdatedTime] => 2025-07-28T05:23:33-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1340
                    [TxnDate] => 2025-07-28
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3RpoKFCDiOqgoJOU04fIfeox
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => 1 × gggg (at $99.00 / day)
                                    [Amount] => 99
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 33
                                                    [name] => Stripe Payment
                                                )

                                            [UnitPrice] => 99
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-09020802-V1-00120000
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 99
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 10.89
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0.86
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 7.16
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 1.72
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 1.15
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 117
                            [name] => nnn nnn(nnnn@nnn.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 266
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 109.89
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3RpoKFCDiOqgoJOU0ogbO2tu
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-28T05:23:32.755-07:00
        )

)

[28-Jul-2025 12:23:33 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 755
[28-Jul-2025 12:23:33 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[28-Jul-2025 12:37:13 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RpoKFCDiOqgoJOU0mAp3TIy)
[28-Jul-2025 12:37:13 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 376
[28-Jul-2025 12:37:13 UTC] Starting sales receipt creation process for event: evt_3RpoKFCDiOqgoJOU0mAp3TIy
[28-Jul-2025 12:37:14 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 78.81
                                    [BalanceWithJobs] => 78.81
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 117
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-23T06:58:25-07:00
                                            [LastUpdatedTime] => 2025-07-23T06:58:29-07:00
                                        )

                                    [GivenName] => nnn nnn
                                    [FamilyName] => nnn nnn
                                    [FullyQualifiedName] => nnn nnn(nnnn@nnn.com)
                                    [DisplayName] => nnn nnn(nnnn@nnn.com)
                                    [PrintOnCheckName] => nnn nnn nnn nnn
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020980b4c4b9d17dd4fc18ab5235f059bbd8a
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => nnnn@nnn.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-28T05:37:14.570-07:00
        )

)

[28-Jul-2025 12:37:14 UTC] Using QBO customer ID: 117
[28-Jul-2025 12:37:14 UTC] No Checkout Session found for Payment Intent: pi_3RpoKFCDiOqgoJOU04fIfeox
[28-Jul-2025 12:37:14 UTC] No line items found from checkout session, trying to get from invoice
[28-Jul-2025 12:37:15 UTC] Found invoice line items: 1
[28-Jul-2025 12:37:15 UTC] Processing subscription invoice
[28-Jul-2025 12:37:15 UTC] Using product name from Stripe: gggg
[28-Jul-2025 12:37:18 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 117
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 99
                    [Description] => 1 × gggg (at $99.00 / day)
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 36
                                )

                            [UnitPrice] => 99
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-28
    [TotalAmt] => 109.89
    [PrivateNote] => Stripe Payment Intent ID: pi_3RpoKFCDiOqgoJOU04fIfeox
    [PaymentRefNum] => ch_3RpoKFCDiOqgoJOU0ogbO2tu
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 10.89
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[28-Jul-2025 12:37:19 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 756
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-28T05:37:19-07:00
                            [LastUpdatedTime] => 2025-07-28T05:37:19-07:00
                        )

                    [CustomField] => Array
                        (
                            [0] => Array
                                (
                                    [DefinitionId] => 1
                                    [Name] => Crew #
                                    [Type] => StringType
                                )

                        )

                    [DocNumber] => 1341
                    [TxnDate] => 2025-07-28
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3RpoKFCDiOqgoJOU04fIfeox
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => 1 × gggg (at $99.00 / day)
                                    [Amount] => 99
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 36
                                                    [name] => gggg
                                                )

                                            [UnitPrice] => 99
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                            [TaxClassificationRef] => Array
                                                (
                                                    [value] => EUC-09020802-V1-00120000
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 99
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                            [TotalTax] => 10.89
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0.86
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 9
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0.75
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 7.16
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 6
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 1.72
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 8
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.5
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [Amount] => 1.15
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 7
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 117
                            [name] => nnn nnn(nnnn@nnn.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 267
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 109.89
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3RpoKFCDiOqgoJOU0ogbO2tu
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                    [TaxExemptionRef] => Array
                        (
                        )

                )

            [time] => 2025-07-28T05:37:18.457-07:00
        )

)

[28-Jul-2025 12:37:19 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 756
[28-Jul-2025 12:37:19 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 392
[28-Jul-2025 17:27:05 UTC] PHP Warning:  Undefined array key "db_config" in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 196
[28-Jul-2025 17:27:05 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 196
[28-Jul-2025 17:27:05 UTC] PHP Warning:  Undefined array key "db_config" in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 197
[28-Jul-2025 17:27:05 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 197
[28-Jul-2025 17:27:05 UTC] PHP Warning:  Undefined array key "db_config" in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 198
[28-Jul-2025 17:27:05 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 198
[28-Jul-2025 17:27:05 UTC] PHP Warning:  Undefined array key "db_config" in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 199
[28-Jul-2025 17:27:05 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 199
[28-Jul-2025 17:27:05 UTC] PHP Warning:  Undefined array key "quickbooks_config" in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 218
[28-Jul-2025 17:27:05 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 218
[28-Jul-2025 17:27:05 UTC] PHP Warning:  Undefined array key "quickbooks_config" in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 219
[28-Jul-2025 17:27:05 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 219
[28-Jul-2025 17:27:05 UTC] PHP Warning:  Undefined array key "quickbooks_config" in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 222
[28-Jul-2025 17:27:05 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 222
[28-Jul-2025 17:27:05 UTC] PHP Warning:  Undefined array key "db_config" in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 242
[28-Jul-2025 17:27:05 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 242
[28-Jul-2025 17:27:05 UTC] PHP Warning:  Undefined array key "db_config" in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 243
[28-Jul-2025 17:27:05 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 243
[28-Jul-2025 17:27:05 UTC] PHP Warning:  Undefined array key "db_config" in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 244
[28-Jul-2025 17:27:05 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 244
[28-Jul-2025 17:27:05 UTC] PHP Warning:  Undefined array key "db_config" in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 245
[28-Jul-2025 17:27:05 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 245
[28-Jul-2025 17:41:04 UTC] PHP Warning:  Undefined array key "db_config" in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 196
[28-Jul-2025 17:41:04 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 196
[28-Jul-2025 17:41:04 UTC] PHP Warning:  Undefined array key "db_config" in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 197
[28-Jul-2025 17:41:04 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 197
[28-Jul-2025 17:41:04 UTC] PHP Warning:  Undefined array key "db_config" in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 198
[28-Jul-2025 17:41:04 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 198
[28-Jul-2025 17:41:04 UTC] PHP Warning:  Undefined array key "db_config" in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 199
[28-Jul-2025 17:41:04 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 199
[28-Jul-2025 17:41:04 UTC] PHP Warning:  Undefined array key "quickbooks_config" in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 218
[28-Jul-2025 17:41:04 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 218
[28-Jul-2025 17:41:04 UTC] PHP Warning:  Undefined array key "quickbooks_config" in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 219
[28-Jul-2025 17:41:04 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 219
[28-Jul-2025 17:41:04 UTC] PHP Warning:  Undefined array key "quickbooks_config" in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 222
[28-Jul-2025 17:41:04 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 222
[28-Jul-2025 17:41:04 UTC] PHP Warning:  Undefined array key "db_config" in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 242
[28-Jul-2025 17:41:04 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 242
[28-Jul-2025 17:41:04 UTC] PHP Warning:  Undefined array key "db_config" in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 243
[28-Jul-2025 17:41:04 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 243
[28-Jul-2025 17:41:04 UTC] PHP Warning:  Undefined array key "db_config" in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 244
[28-Jul-2025 17:41:04 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 244
[28-Jul-2025 17:41:04 UTC] PHP Warning:  Undefined array key "db_config" in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 245
[28-Jul-2025 17:41:04 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 245
[28-Jul-2025 17:41:12 UTC] PHP Warning:  Undefined array key "db_config" in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 196
[28-Jul-2025 17:41:12 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 196
[28-Jul-2025 17:41:12 UTC] PHP Warning:  Undefined array key "db_config" in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 197
[28-Jul-2025 17:41:12 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 197
[28-Jul-2025 17:41:12 UTC] PHP Warning:  Undefined array key "db_config" in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 198
[28-Jul-2025 17:41:12 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 198
[28-Jul-2025 17:41:12 UTC] PHP Warning:  Undefined array key "db_config" in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 199
[28-Jul-2025 17:41:12 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 199
[28-Jul-2025 17:41:12 UTC] PHP Warning:  Undefined array key "quickbooks_config" in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 218
[28-Jul-2025 17:41:12 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 218
[28-Jul-2025 17:41:12 UTC] PHP Warning:  Undefined array key "quickbooks_config" in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 219
[28-Jul-2025 17:41:12 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 219
[28-Jul-2025 17:41:12 UTC] PHP Warning:  Undefined array key "quickbooks_config" in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 222
[28-Jul-2025 17:41:12 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 222
[28-Jul-2025 17:41:12 UTC] PHP Warning:  Undefined array key "db_config" in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 242
[28-Jul-2025 17:41:12 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 242
[28-Jul-2025 17:41:12 UTC] PHP Warning:  Undefined array key "db_config" in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 243
[28-Jul-2025 17:41:12 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 243
[28-Jul-2025 17:41:12 UTC] PHP Warning:  Undefined array key "db_config" in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 244
[28-Jul-2025 17:41:12 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 244
[28-Jul-2025 17:41:12 UTC] PHP Warning:  Undefined array key "db_config" in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 245
[28-Jul-2025 17:41:12 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 245
[28-Jul-2025 17:41:35 UTC] PHP Warning:  Undefined array key "db_config" in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 196
[28-Jul-2025 17:41:35 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 196
[28-Jul-2025 17:41:35 UTC] PHP Warning:  Undefined array key "db_config" in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 197
[28-Jul-2025 17:41:35 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 197
[28-Jul-2025 17:41:35 UTC] PHP Warning:  Undefined array key "db_config" in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 198
[28-Jul-2025 17:41:35 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 198
[28-Jul-2025 17:41:35 UTC] PHP Warning:  Undefined array key "db_config" in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 199
[28-Jul-2025 17:41:35 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 199
[28-Jul-2025 17:41:35 UTC] PHP Warning:  Undefined array key "quickbooks_config" in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 218
[28-Jul-2025 17:41:35 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 218
[28-Jul-2025 17:41:35 UTC] PHP Warning:  Undefined array key "quickbooks_config" in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 219
[28-Jul-2025 17:41:35 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 219
[28-Jul-2025 17:41:35 UTC] PHP Warning:  Undefined array key "quickbooks_config" in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 222
[28-Jul-2025 17:41:35 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 222
[28-Jul-2025 17:41:35 UTC] PHP Warning:  Undefined array key "db_config" in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 242
[28-Jul-2025 17:41:35 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 242
[28-Jul-2025 17:41:35 UTC] PHP Warning:  Undefined array key "db_config" in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 243
[28-Jul-2025 17:41:35 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 243
[28-Jul-2025 17:41:35 UTC] PHP Warning:  Undefined array key "db_config" in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 244
[28-Jul-2025 17:41:35 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 244
[28-Jul-2025 17:41:35 UTC] PHP Warning:  Undefined array key "db_config" in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 245
[28-Jul-2025 17:41:35 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 245
[28-Jul-2025 18:10:18 UTC] PHP Fatal error:  Uncaught mysqli_sql_exception: Access denied for user ''@'localhost' (using password: NO) in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/db.php:5
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/db.php(5): mysqli->__construct()
#1 /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/login.php(3): require_once('/home/wdsklsxvq...')
#2 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/db.php on line 5
[28-Jul-2025 18:10:29 UTC] PHP Fatal error:  Uncaught mysqli_sql_exception: Access denied for user ''@'localhost' (using password: NO) in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/db.php:5
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/db.php(5): mysqli->__construct()
#1 /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/dashboard.php(3): require_once('/home/wdsklsxvq...')
#2 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/db.php on line 5
[29-Jul-2025 07:14:50 UTC] PHP Warning:  include(/home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/includes/onboarding/welcome.php): Failed to open stream: No such file or directory in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 787
[29-Jul-2025 07:14:50 UTC] PHP Warning:  include(): Failed opening '/home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/includes/onboarding/welcome.php' for inclusion (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 787
[29-Jul-2025 07:15:00 UTC] PHP Warning:  include(/home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/includes/onboarding/welcome.php): Failed to open stream: No such file or directory in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 787
[29-Jul-2025 07:15:00 UTC] PHP Warning:  include(): Failed opening '/home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/includes/onboarding/welcome.php' for inclusion (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 787
[29-Jul-2025 07:15:13 UTC] PHP Fatal error:  Uncaught mysqli_sql_exception: Access denied for user ''@'localhost' (using password: NO) in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/db.php:5
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/db.php(5): mysqli->__construct()
#1 /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/dashboard.php(3): require_once('/home/wdsklsxvq...')
#2 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/db.php on line 5
[29-Jul-2025 07:17:28 UTC] PHP Warning:  include(/home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/includes/onboarding/welcome.php): Failed to open stream: No such file or directory in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 787
[29-Jul-2025 07:17:28 UTC] PHP Warning:  include(): Failed opening '/home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/includes/onboarding/welcome.php' for inclusion (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 787
[29-Jul-2025 07:19:21 UTC] PHP Warning:  include(/home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/includes/onboarding/welcome.php): Failed to open stream: No such file or directory in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 787
[29-Jul-2025 07:19:21 UTC] PHP Warning:  include(): Failed opening '/home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/includes/onboarding/welcome.php' for inclusion (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 787
[29-Jul-2025 07:20:43 UTC] PHP Warning:  include(/home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/includes/onboarding/welcome.php): Failed to open stream: No such file or directory in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 787
[29-Jul-2025 07:20:43 UTC] PHP Warning:  include(): Failed opening '/home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/includes/onboarding/welcome.php' for inclusion (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 787
[29-Jul-2025 07:21:05 UTC] PHP Warning:  include(/home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/includes/onboarding/welcome.php): Failed to open stream: No such file or directory in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 787
[29-Jul-2025 07:21:05 UTC] PHP Warning:  include(): Failed opening '/home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/includes/onboarding/welcome.php' for inclusion (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 787
[29-Jul-2025 09:11:29 UTC] PHP Fatal error:  Uncaught mysqli_sql_exception: Access denied for user ''@'localhost' (using password: NO) in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/db.php:5
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/db.php(5): mysqli->__construct()
#1 /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/dashboard.php(3): require_once('/home/wdsklsxvq...')
#2 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/db.php on line 5
[29-Jul-2025 09:23:54 UTC] PHP Warning:  include(/home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/includes/onboarding/stripe.php): Failed to open stream: No such file or directory in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 799
[29-Jul-2025 09:23:54 UTC] PHP Warning:  include(): Failed opening '/home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/includes/onboarding/stripe.php' for inclusion (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 799
[29-Jul-2025 09:24:15 UTC] PHP Warning:  include(/home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/includes/onboarding/stripe.php): Failed to open stream: No such file or directory in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 799
[29-Jul-2025 09:24:15 UTC] PHP Warning:  include(): Failed opening '/home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/includes/onboarding/stripe.php' for inclusion (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/wdsklsxvqb/automationv.com/stripe-test/stripe-app/onboarding.php on line 799
[29-Jul-2025 11:44:06 UTC] PHP Fatal error:  Uncaught mysqli_sql_exception: Access denied for user 'wdsklsxvqb_stripe_test'@'localhost' (using password: YES) in /home/mhossain/public_html/stripe-app/db.php:5
Stack trace:
#0 /home/mhossain/public_html/stripe-app/db.php(5): mysqli->__construct('localhost', 'wdsklsxvqb_stri...', 'stripe_test', 'wdsklsxvqb_stri...')
#1 /home/mhossain/public_html/stripe-app/dashboard.php(3): require_once('/home/mhossain/...')
#2 {main}
  thrown in /home/mhossain/public_html/stripe-app/db.php on line 5
[29-Jul-2025 11:44:11 UTC] PHP Fatal error:  Uncaught mysqli_sql_exception: Access denied for user 'wdsklsxvqb_stripe_test'@'localhost' (using password: YES) in /home/mhossain/public_html/stripe-app/db.php:5
Stack trace:
#0 /home/mhossain/public_html/stripe-app/db.php(5): mysqli->__construct('localhost', 'wdsklsxvqb_stri...', 'stripe_test', 'wdsklsxvqb_stri...')
#1 /home/mhossain/public_html/stripe-app/dashboard.php(3): require_once('/home/mhossain/...')
#2 {main}
  thrown in /home/mhossain/public_html/stripe-app/db.php on line 5
[29-Jul-2025 11:56:20 UTC] Stripe Webhook Received: invoice.finalized (ID: evt_1RprbAFHjd3O37lxidWUXrQ4)
[29-Jul-2025 12:05:46 UTC] Stripe Webhook Received: invoice.created (ID: evt_1RqCHtFHjd3O37lxhmouviyB)
[29-Jul-2025 12:06:46 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[29-Jul-2025 12:06:46 UTC] Starting invoice creation process for event: evt_1RqCHtFHjd3O37lxhmouviyB
[29-Jul-2025 12:06:46 UTC] Fetching Stripe invoice: in_1RqCHtFHjd3O37lxH9BGuxWx
[29-Jul-2025 12:06:46 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RqCHtFHjd3O37lxH9BGuxWx
    [object] => invoice
    [account_country] => US
    [account_name] => New business sandbox
    [account_tax_ids] => 
    [amount_due] => 1070
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 1070
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 1
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1753790745
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SlOKF9W7biGxn2
    [customer_address] => 
    [customer_email] => bmrafiul.alam@gmail.com
    [customer_name] => Rafiul
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1RprZgFHjd3O37lxXXyjYk8s
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1753711124
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 7
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 7
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1756382781
    [effective_at] => 1753790781
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RpqKGFHjd3O37lx/test_YWNjdF8xUnBxS0dGSGpkM08zN2x4LF9TbGpsVWdHVlZoblN0N3V5UXFxeGhXWDRRZ3NqWUNYLDE0NDMzMTYwNg0200OseGlARL?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RpqKGFHjd3O37lx/test_YWNjdF8xUnBxS0dGSGpkM08zN2x4LF9TbGpsVWdHVlZoblN0N3V5UXFxeGhXWDRRZ3NqWUNYLDE0NDMzMTYwNg0200OseGlARL/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RqCI1FHjd3O37lxmXTrQszQ
                            [object] => line_item
                            [amount] => 1000
                            [amount_excluding_tax] => 1000
                            [currency] => usd
                            [description] => Cap
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RqCHtFHjd3O37lxH9BGuxWx
                            [invoice_item] => ii_1RqCI1FHjd3O37lxCYf4grKt
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1RqCI1FHjd3O37lxCYf4grKt
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1753790753
                                    [start] => 1753790753
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RpraJFHjd3O37lxAvgvw6S5
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1753711163
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SlONtnUbpuo0dL
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 1000
                                    [unit_amount_decimal] => 1000
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RpraJFHjd3O37lxAvgvw6S5
                                            [product] => prod_SlONtnUbpuo0dL
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 1000
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 1
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 70
                                            [inclusive] => 
                                            [tax_rate] => txr_1RprZgFHjd3O37lxXXyjYk8s
                                            [taxability_reason] => 
                                            [taxable_amount] => 1000
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 70
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1RprZgFHjd3O37lxXXyjYk8s
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 1000
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 1000
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1RqCHtFHjd3O37lxH9BGuxWx/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => CE6VYY9F-0002
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RqCIUFHjd3O37lx1uXGguHN
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1753790745
    [period_start] => 1753790745
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => open
    [status_transitions] => Array
        (
            [finalized_at] => 1753790781
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 1000
    [subtotal_excluding_tax] => 1000
    [tax] => 70
    [test_clock] => 
    [total] => 1070
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 1000
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 70
                    [inclusive] => 
                    [tax_rate] => txr_1RprZgFHjd3O37lxXXyjYk8s
                    [taxability_reason] => 
                    [taxable_amount] => 1000
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 70
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1RprZgFHjd3O37lxXXyjYk8s
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 1000
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 
)

[29-Jul-2025 12:06:50 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                )

            [time] => 2025-07-29T05:06:50.343-07:00
        )

)

[29-Jul-2025 12:06:51 UTC] Using QBO customer ID: 58
[29-Jul-2025 12:06:54 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 58
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 10
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 19
                                )

                            [UnitPrice] => 10
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-29
    [DueDate] => 2025-08-28
    [TotalAmt] => 10.7
    [PrivateNote] => Stripe Invoice ID: in_1RqCHtFHjd3O37lxH9BGuxWx
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 0.7
        )

)

[29-Jul-2025 12:06:56 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 145
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-29T05:06:56-07:00
                            [LastModifiedByRef] => Array
                                (
                                    [value] => 9341455082530719
                                )

                            [LastUpdatedTime] => 2025-07-29T05:06:56-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [DocNumber] => 1038
                    [TxnDate] => 2025-07-29
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Invoice ID: in_1RqCHtFHjd3O37lxH9BGuxWx
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 10
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 19
                                                    [name] => Cap
                                                )

                                            [UnitPrice] => 10
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 10
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 0
                        )

                    [CustomerRef] => Array
                        (
                            [value] => 58
                            [name] => Rafiul(bmrafiul.alam@gmail.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 96
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [DueDate] => 2025-08-28
                    [TotalAmt] => 10
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 10
                )

            [time] => 2025-07-29T05:06:55.533-07:00
        )

)

[29-Jul-2025 12:06:56 UTC] Invoice created successfully in QBO. Invoice ID: 145
[29-Jul-2025 12:06:56 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[29-Jul-2025 12:09:31 UTC] Stripe Webhook Received: invoice.created (ID: evt_1RqCHtFHjd3O37lxhmouviyB)
[29-Jul-2025 12:09:31 UTC] PHP Warning:  Array to string conversion in /home/mhossain/public_html/stripe-app/stripe-webhook.php on line 31
[29-Jul-2025 12:09:31 UTC] Synch: Array
[29-Jul-2025 12:10:31 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[29-Jul-2025 12:10:31 UTC] Starting invoice creation process for event: evt_1RqCHtFHjd3O37lxhmouviyB
[29-Jul-2025 12:10:31 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[29-Jul-2025 12:10:31 UTC] Invoice already processed. QBO Invoice ID: 145
[29-Jul-2025 12:12:58 UTC] Stripe Webhook Received: invoice.created (ID: evt_1RqCHtFHjd3O37lxhmouviyB)
[29-Jul-2025 12:12:58 UTC] 1
[29-Jul-2025 12:13:58 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[29-Jul-2025 12:13:58 UTC] Starting invoice creation process for event: evt_1RqCHtFHjd3O37lxhmouviyB
[29-Jul-2025 12:13:58 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[29-Jul-2025 12:13:58 UTC] Invoice already processed. QBO Invoice ID: 145
[29-Jul-2025 12:33:02 UTC] Stripe Webhook Received: invoice.finalized (ID: evt_1RqCiHFHjd3O37lxHtttQb97)
[29-Jul-2025 12:33:02 UTC] 1
[29-Jul-2025 12:33:39 UTC] Stripe Webhook Received: invoice.finalized (ID: evt_1RqCiHFHjd3O37lxHtttQb97)
[29-Jul-2025 12:33:39 UTC] 1
[29-Jul-2025 12:34:02 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[29-Jul-2025 12:34:02 UTC] Starting invoice creation process for event: evt_1RqCiHFHjd3O37lxHtttQb97
[29-Jul-2025 12:34:02 UTC] Fetching Stripe invoice: in_1RqChxFHjd3O37lxIo6GYocg
[29-Jul-2025 12:34:02 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RqChxFHjd3O37lxIo6GYocg
    [object] => invoice
    [account_country] => US
    [account_name] => New business sandbox
    [account_tax_ids] => 
    [amount_due] => 1070
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 1070
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 1
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1753792361
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SlOKF9W7biGxn2
    [customer_address] => 
    [customer_email] => bmrafiul.alam@gmail.com
    [customer_name] => Rafiul
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1RprZgFHjd3O37lxXXyjYk8s
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1753711124
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 7
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 7
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1756384380
    [effective_at] => 1753792380
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RpqKGFHjd3O37lx/test_YWNjdF8xUnBxS0dGSGpkM08zN2x4LF9TbGtDdFJLOENVbHJjbTdvUFNGRjVoZWVMcjIzdGR1LDE0NDMzMzI0Mg0200slTIbRI8?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RpqKGFHjd3O37lx/test_YWNjdF8xUnBxS0dGSGpkM08zN2x4LF9TbGtDdFJLOENVbHJjbTdvUFNGRjVoZWVMcjIzdGR1LDE0NDMzMzI0Mg0200slTIbRI8/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RqCi4FHjd3O37lxiASzHOD6
                            [object] => line_item
                            [amount] => 1000
                            [amount_excluding_tax] => 1000
                            [currency] => usd
                            [description] => Cap
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RqChxFHjd3O37lxIo6GYocg
                            [invoice_item] => ii_1RqCi4FHjd3O37lxKrZBgg3G
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1RqCi4FHjd3O37lxKrZBgg3G
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1753792368
                                    [start] => 1753792368
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RpraJFHjd3O37lxAvgvw6S5
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1753711163
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SlONtnUbpuo0dL
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 1000
                                    [unit_amount_decimal] => 1000
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RpraJFHjd3O37lxAvgvw6S5
                                            [product] => prod_SlONtnUbpuo0dL
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 1000
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 1
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 70
                                            [inclusive] => 
                                            [tax_rate] => txr_1RprZgFHjd3O37lxXXyjYk8s
                                            [taxability_reason] => 
                                            [taxable_amount] => 1000
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 70
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1RprZgFHjd3O37lxXXyjYk8s
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 1000
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 1000
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1RqChxFHjd3O37lxIo6GYocg/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => CE6VYY9F-0003
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RqCiGFHjd3O37lx135MZ3YW
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1753792361
    [period_start] => 1753792361
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => open
    [status_transitions] => Array
        (
            [finalized_at] => 1753792380
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 1000
    [subtotal_excluding_tax] => 1000
    [tax] => 70
    [test_clock] => 
    [total] => 1070
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 1000
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 70
                    [inclusive] => 
                    [tax_rate] => txr_1RprZgFHjd3O37lxXXyjYk8s
                    [taxability_reason] => 
                    [taxable_amount] => 1000
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 70
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1RprZgFHjd3O37lxXXyjYk8s
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 1000
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1753792361
)

[29-Jul-2025 12:34:05 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 10
                                    [BalanceWithJobs] => 10
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 58
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-29T05:06:51-07:00
                                            [LastUpdatedTime] => 2025-07-29T05:06:56-07:00
                                        )

                                    [GivenName] => Rafiul
                                    [FamilyName] => Rafiul
                                    [FullyQualifiedName] => Rafiul(bmrafiul.alam@gmail.com)
                                    [DisplayName] => Rafiul(bmrafiul.alam@gmail.com)
                                    [PrintOnCheckName] => Rafiul Rafiul
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020987c1392f692da48308a2742c50638555e
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => bmrafiul.alam@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-29T05:34:05.280-07:00
        )

)

[29-Jul-2025 12:34:05 UTC] Using QBO customer ID: 58
[29-Jul-2025 12:34:06 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 58
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 10
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 19
                                )

                            [UnitPrice] => 10
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-29
    [DueDate] => 2025-08-28
    [TotalAmt] => 10.7
    [PrivateNote] => Stripe Invoice ID: in_1RqChxFHjd3O37lxIo6GYocg
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 0.7
        )

)

[29-Jul-2025 12:34:07 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 146
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-29T05:34:07-07:00
                            [LastModifiedByRef] => Array
                                (
                                    [value] => 9341455082530719
                                )

                            [LastUpdatedTime] => 2025-07-29T05:34:07-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [DocNumber] => 1039
                    [TxnDate] => 2025-07-29
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Invoice ID: in_1RqChxFHjd3O37lxIo6GYocg
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 10
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 19
                                                    [name] => Cap
                                                )

                                            [UnitPrice] => 10
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 10
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 0
                        )

                    [CustomerRef] => Array
                        (
                            [value] => 58
                            [name] => Rafiul(bmrafiul.alam@gmail.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 97
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [DueDate] => 2025-08-28
                    [TotalAmt] => 10
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 10
                )

            [time] => 2025-07-29T05:34:07.165-07:00
        )

)

[29-Jul-2025 12:34:07 UTC] Invoice created successfully in QBO. Invoice ID: 146
[29-Jul-2025 12:34:07 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[29-Jul-2025 12:34:39 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[29-Jul-2025 12:34:39 UTC] Starting invoice creation process for event: evt_1RqCiHFHjd3O37lxHtttQb97
[29-Jul-2025 12:34:39 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[29-Jul-2025 12:34:39 UTC] Invoice already processed. QBO Invoice ID: 146
[29-Jul-2025 12:40:03 UTC] Stripe Webhook Received: invoice.finalized (ID: evt_1RqCiHFHjd3O37lxHtttQb97)
[29-Jul-2025 12:40:03 UTC] 1
[29-Jul-2025 12:40:25 UTC] Stripe Webhook Received: invoice.finalized (ID: evt_1RqCiHFHjd3O37lxHtttQb97)
[29-Jul-2025 12:40:25 UTC] 1
[29-Jul-2025 12:41:03 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[29-Jul-2025 12:41:03 UTC] Starting invoice creation process for event: evt_1RqCiHFHjd3O37lxHtttQb97
[29-Jul-2025 12:41:03 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[29-Jul-2025 12:41:03 UTC] Invoice already processed. QBO Invoice ID: 146
[29-Jul-2025 12:41:25 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[29-Jul-2025 12:41:25 UTC] Starting invoice creation process for event: evt_1RqCiHFHjd3O37lxHtttQb97
[29-Jul-2025 12:41:25 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[29-Jul-2025 12:41:25 UTC] Invoice already processed. QBO Invoice ID: 146
[29-Jul-2025 12:44:18 UTC] Stripe Webhook Received: invoice.finalized (ID: evt_1RqCiHFHjd3O37lxHtttQb97)
[29-Jul-2025 12:44:18 UTC] 1
[29-Jul-2025 12:45:18 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[29-Jul-2025 12:45:18 UTC] Starting invoice creation process for event: evt_1RqCiHFHjd3O37lxHtttQb97
[29-Jul-2025 12:45:18 UTC] Fetching Stripe invoice: in_1RqChxFHjd3O37lxIo6GYocg
[29-Jul-2025 12:45:18 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RqChxFHjd3O37lxIo6GYocg
    [object] => invoice
    [account_country] => US
    [account_name] => New business sandbox
    [account_tax_ids] => 
    [amount_due] => 1070
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 1070
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 1
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1753792361
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SlOKF9W7biGxn2
    [customer_address] => 
    [customer_email] => bmrafiul.alam@gmail.com
    [customer_name] => Rafiul
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1RprZgFHjd3O37lxXXyjYk8s
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1753711124
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 7
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 7
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1756384380
    [effective_at] => 1753792380
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RpqKGFHjd3O37lx/test_YWNjdF8xUnBxS0dGSGpkM08zN2x4LF9TbGtDdFJLOENVbHJjbTdvUFNGRjVoZWVMcjIzdGR1LDE0NDMzMzkxOA0200LX0htUVw?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RpqKGFHjd3O37lx/test_YWNjdF8xUnBxS0dGSGpkM08zN2x4LF9TbGtDdFJLOENVbHJjbTdvUFNGRjVoZWVMcjIzdGR1LDE0NDMzMzkxOA0200LX0htUVw/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RqCi4FHjd3O37lxiASzHOD6
                            [object] => line_item
                            [amount] => 1000
                            [amount_excluding_tax] => 1000
                            [currency] => usd
                            [description] => Cap
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RqChxFHjd3O37lxIo6GYocg
                            [invoice_item] => ii_1RqCi4FHjd3O37lxKrZBgg3G
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1RqCi4FHjd3O37lxKrZBgg3G
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1753792368
                                    [start] => 1753792368
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RpraJFHjd3O37lxAvgvw6S5
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1753711163
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SlONtnUbpuo0dL
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 1000
                                    [unit_amount_decimal] => 1000
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RpraJFHjd3O37lxAvgvw6S5
                                            [product] => prod_SlONtnUbpuo0dL
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 1000
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 1
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 70
                                            [inclusive] => 
                                            [tax_rate] => txr_1RprZgFHjd3O37lxXXyjYk8s
                                            [taxability_reason] => 
                                            [taxable_amount] => 1000
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 70
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1RprZgFHjd3O37lxXXyjYk8s
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 1000
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 1000
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1RqChxFHjd3O37lxIo6GYocg/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => CE6VYY9F-0003
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RqCiGFHjd3O37lx135MZ3YW
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1753792361
    [period_start] => 1753792361
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => open
    [status_transitions] => Array
        (
            [finalized_at] => 1753792380
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 1000
    [subtotal_excluding_tax] => 1000
    [tax] => 70
    [test_clock] => 
    [total] => 1070
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 1000
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 70
                    [inclusive] => 
                    [tax_rate] => txr_1RprZgFHjd3O37lxXXyjYk8s
                    [taxability_reason] => 
                    [taxable_amount] => 1000
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 70
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1RprZgFHjd3O37lxXXyjYk8s
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 1000
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1753792361
)

[29-Jul-2025 12:45:21 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 20
                                    [BalanceWithJobs] => 20
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 58
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-29T05:06:51-07:00
                                            [LastUpdatedTime] => 2025-07-29T05:34:08-07:00
                                        )

                                    [GivenName] => Rafiul
                                    [FamilyName] => Rafiul
                                    [FullyQualifiedName] => Rafiul(bmrafiul.alam@gmail.com)
                                    [DisplayName] => Rafiul(bmrafiul.alam@gmail.com)
                                    [PrintOnCheckName] => Rafiul Rafiul
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020987c1392f692da48308a2742c50638555e
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => bmrafiul.alam@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-29T05:45:21.774-07:00
        )

)

[29-Jul-2025 12:45:21 UTC] Using QBO customer ID: 58
[29-Jul-2025 12:45:23 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 58
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 10
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 19
                                )

                            [UnitPrice] => 10
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-29
    [DueDate] => 2025-08-28
    [TotalAmt] => 10.7
    [PrivateNote] => Stripe Invoice ID: in_1RqChxFHjd3O37lxIo6GYocg
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 0.7
        )

)

[29-Jul-2025 12:45:24 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 147
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-29T05:45:24-07:00
                            [LastModifiedByRef] => Array
                                (
                                    [value] => 9341455082530719
                                )

                            [LastUpdatedTime] => 2025-07-29T05:45:24-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [DocNumber] => 1040
                    [TxnDate] => 2025-07-29
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Invoice ID: in_1RqChxFHjd3O37lxIo6GYocg
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 10
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 19
                                                    [name] => Cap
                                                )

                                            [UnitPrice] => 10
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 10
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 0
                        )

                    [CustomerRef] => Array
                        (
                            [value] => 58
                            [name] => Rafiul(bmrafiul.alam@gmail.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 98
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [DueDate] => 2025-08-28
                    [TotalAmt] => 10
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 10
                )

            [time] => 2025-07-29T05:45:24.209-07:00
        )

)

[29-Jul-2025 12:45:24 UTC] Invoice created successfully in QBO. Invoice ID: 147
[29-Jul-2025 12:45:24 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[29-Jul-2025 12:46:50 UTC] Stripe Webhook Received: invoice.finalized (ID: evt_1RqCiHFHjd3O37lxHtttQb97)
[29-Jul-2025 12:46:50 UTC] 1
[29-Jul-2025 12:46:50 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[29-Jul-2025 12:46:50 UTC] Starting invoice creation process for event: evt_1RqCiHFHjd3O37lxHtttQb97
[29-Jul-2025 12:46:50 UTC] Fetching Stripe invoice: in_1RqChxFHjd3O37lxIo6GYocg
[29-Jul-2025 12:46:50 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RqChxFHjd3O37lxIo6GYocg
    [object] => invoice
    [account_country] => US
    [account_name] => New business sandbox
    [account_tax_ids] => 
    [amount_due] => 1070
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 1070
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 1
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1753792361
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SlOKF9W7biGxn2
    [customer_address] => 
    [customer_email] => bmrafiul.alam@gmail.com
    [customer_name] => Rafiul
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1RprZgFHjd3O37lxXXyjYk8s
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1753711124
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 7
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 7
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1756384380
    [effective_at] => 1753792380
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RpqKGFHjd3O37lx/test_YWNjdF8xUnBxS0dGSGpkM08zN2x4LF9TbGtDdFJLOENVbHJjbTdvUFNGRjVoZWVMcjIzdGR1LDE0NDMzNDAxMA0200E7P0YhP1?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RpqKGFHjd3O37lx/test_YWNjdF8xUnBxS0dGSGpkM08zN2x4LF9TbGtDdFJLOENVbHJjbTdvUFNGRjVoZWVMcjIzdGR1LDE0NDMzNDAxMA0200E7P0YhP1/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RqCi4FHjd3O37lxiASzHOD6
                            [object] => line_item
                            [amount] => 1000
                            [amount_excluding_tax] => 1000
                            [currency] => usd
                            [description] => Cap
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RqChxFHjd3O37lxIo6GYocg
                            [invoice_item] => ii_1RqCi4FHjd3O37lxKrZBgg3G
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1RqCi4FHjd3O37lxKrZBgg3G
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1753792368
                                    [start] => 1753792368
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RpraJFHjd3O37lxAvgvw6S5
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1753711163
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SlONtnUbpuo0dL
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 1000
                                    [unit_amount_decimal] => 1000
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RpraJFHjd3O37lxAvgvw6S5
                                            [product] => prod_SlONtnUbpuo0dL
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 1000
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 1
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 70
                                            [inclusive] => 
                                            [tax_rate] => txr_1RprZgFHjd3O37lxXXyjYk8s
                                            [taxability_reason] => 
                                            [taxable_amount] => 1000
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 70
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1RprZgFHjd3O37lxXXyjYk8s
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 1000
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 1000
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1RqChxFHjd3O37lxIo6GYocg/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => CE6VYY9F-0003
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RqCiGFHjd3O37lx135MZ3YW
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1753792361
    [period_start] => 1753792361
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => open
    [status_transitions] => Array
        (
            [finalized_at] => 1753792380
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 1000
    [subtotal_excluding_tax] => 1000
    [tax] => 70
    [test_clock] => 
    [total] => 1070
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 1000
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 70
                    [inclusive] => 
                    [tax_rate] => txr_1RprZgFHjd3O37lxXXyjYk8s
                    [taxability_reason] => 
                    [taxable_amount] => 1000
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 70
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1RprZgFHjd3O37lxXXyjYk8s
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 1000
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1753792361
)

[29-Jul-2025 12:46:52 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 30
                                    [BalanceWithJobs] => 30
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 58
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-29T05:06:51-07:00
                                            [LastUpdatedTime] => 2025-07-29T05:45:25-07:00
                                        )

                                    [GivenName] => Rafiul
                                    [FamilyName] => Rafiul
                                    [FullyQualifiedName] => Rafiul(bmrafiul.alam@gmail.com)
                                    [DisplayName] => Rafiul(bmrafiul.alam@gmail.com)
                                    [PrintOnCheckName] => Rafiul Rafiul
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020987c1392f692da48308a2742c50638555e
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => bmrafiul.alam@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-29T05:46:52.663-07:00
        )

)

[29-Jul-2025 12:46:52 UTC] Using QBO customer ID: 58
[29-Jul-2025 12:46:54 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 58
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 10
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 19
                                )

                            [UnitPrice] => 10
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-29
    [DueDate] => 2025-08-28
    [TotalAmt] => 10.7
    [PrivateNote] => Stripe Invoice ID: in_1RqChxFHjd3O37lxIo6GYocg
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 0.7
        )

)

[29-Jul-2025 12:46:55 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 148
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-29T05:46:55-07:00
                            [LastModifiedByRef] => Array
                                (
                                    [value] => 9341455082530719
                                )

                            [LastUpdatedTime] => 2025-07-29T05:46:55-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [DocNumber] => 1041
                    [TxnDate] => 2025-07-29
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Invoice ID: in_1RqChxFHjd3O37lxIo6GYocg
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 10
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 19
                                                    [name] => Cap
                                                )

                                            [UnitPrice] => 10
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 10
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 0
                        )

                    [CustomerRef] => Array
                        (
                            [value] => 58
                            [name] => Rafiul(bmrafiul.alam@gmail.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 99
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [DueDate] => 2025-08-28
                    [TotalAmt] => 10
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 10
                )

            [time] => 2025-07-29T05:46:54.771-07:00
        )

)

[29-Jul-2025 12:46:55 UTC] Invoice created successfully in QBO. Invoice ID: 148
[29-Jul-2025 12:46:55 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[29-Jul-2025 12:52:24 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1RqD12FHjd3O37lxXQVhbmgc)
[29-Jul-2025 12:52:24 UTC] 1
[29-Jul-2025 12:52:24 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[29-Jul-2025 12:52:24 UTC] Starting payment process for Stripe invoice: evt_1RqD12FHjd3O37lxXQVhbmgc
[29-Jul-2025 12:52:24 UTC] Fetching Stripe invoice: in_1RqChxFHjd3O37lxIo6GYocg
[29-Jul-2025 12:52:25 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RqChxFHjd3O37lxIo6GYocg
    [object] => invoice
    [account_country] => US
    [account_name] => New business sandbox
    [account_tax_ids] => 
    [amount_due] => 1070
    [amount_overpaid] => 0
    [amount_paid] => 1070
    [amount_remaining] => 0
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 1
    [attempted] => 1
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => ch_3RqCiGFHjd3O37lx1qkeYVDg
    [collection_method] => send_invoice
    [created] => 1753792361
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SlOKF9W7biGxn2
    [customer_address] => 
    [customer_email] => bmrafiul.alam@gmail.com
    [customer_name] => Rafiul
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1RprZgFHjd3O37lxXXyjYk8s
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1753711124
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 7
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 7
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1756384380
    [effective_at] => 1753792380
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RpqKGFHjd3O37lx/test_YWNjdF8xUnBxS0dGSGpkM08zN2x4LF9TbGtDdFJLOENVbHJjbTdvUFNGRjVoZWVMcjIzdGR1LDE0NDMzNDM0NQ02000sLRBUPJ?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RpqKGFHjd3O37lx/test_YWNjdF8xUnBxS0dGSGpkM08zN2x4LF9TbGtDdFJLOENVbHJjbTdvUFNGRjVoZWVMcjIzdGR1LDE0NDMzNDM0NQ02000sLRBUPJ/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RqCi4FHjd3O37lxiASzHOD6
                            [object] => line_item
                            [amount] => 1000
                            [amount_excluding_tax] => 1000
                            [currency] => usd
                            [description] => Cap
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RqChxFHjd3O37lxIo6GYocg
                            [invoice_item] => ii_1RqCi4FHjd3O37lxKrZBgg3G
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1RqCi4FHjd3O37lxKrZBgg3G
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1753792368
                                    [start] => 1753792368
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RpraJFHjd3O37lxAvgvw6S5
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1753711163
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SlONtnUbpuo0dL
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 1000
                                    [unit_amount_decimal] => 1000
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RpraJFHjd3O37lxAvgvw6S5
                                            [product] => prod_SlONtnUbpuo0dL
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 1000
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 1
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 70
                                            [inclusive] => 
                                            [tax_rate] => txr_1RprZgFHjd3O37lxXXyjYk8s
                                            [taxability_reason] => 
                                            [taxable_amount] => 1000
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 70
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1RprZgFHjd3O37lxXXyjYk8s
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 1000
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 1000
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1RqChxFHjd3O37lxIo6GYocg/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => CE6VYY9F-0003
    [on_behalf_of] => 
    [paid] => 1
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RqCiGFHjd3O37lx135MZ3YW
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1753792361
    [period_start] => 1753792361
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => paid
    [status_transitions] => Array
        (
            [finalized_at] => 1753792380
            [marked_uncollectible_at] => 
            [paid_at] => 1753793542
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 1000
    [subtotal_excluding_tax] => 1000
    [tax] => 70
    [test_clock] => 
    [total] => 1070
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 1000
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 70
                    [inclusive] => 
                    [tax_rate] => txr_1RprZgFHjd3O37lxXXyjYk8s
                    [taxability_reason] => 
                    [taxable_amount] => 1000
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 70
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1RprZgFHjd3O37lxXXyjYk8s
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 1000
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1753792361
)

[29-Jul-2025 12:52:27 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 40
                                    [BalanceWithJobs] => 40
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 58
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-29T05:06:51-07:00
                                            [LastUpdatedTime] => 2025-07-29T05:46:55-07:00
                                        )

                                    [GivenName] => Rafiul
                                    [FamilyName] => Rafiul
                                    [FullyQualifiedName] => Rafiul(bmrafiul.alam@gmail.com)
                                    [DisplayName] => Rafiul(bmrafiul.alam@gmail.com)
                                    [PrintOnCheckName] => Rafiul Rafiul
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020987c1392f692da48308a2742c50638555e
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => bmrafiul.alam@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-29T05:52:27.228-07:00
        )

)

[29-Jul-2025 12:52:27 UTC] Using QBO customer ID: 58
[29-Jul-2025 12:52:27 UTC] Found existing QBO invoice ID: 148
[29-Jul-2025 12:52:30 UTC] Failed to create payment method: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Invalid Enumeration
                                    [Detail] => Invalid Enumeration : OTHER
                                    [code] => 2170
                                    [element] => Type
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-29T05:52:29.955-07:00
        )

)

[29-Jul-2025 12:52:30 UTC] Creating QBO payment with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 58
        )

    [TotalAmt] => 10.7
    [TxnDate] => 2025-07-29
    [PaymentRefNum] => pi_3RqCiGFHjd3O37lx13
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

    [PrivateNote] => Stripe Invoice ID: in_1RqChxFHjd3O37lxIo6GYocg
    [Line] => Array
        (
            [0] => Array
                (
                    [Amount] => 10.7
                    [LinkedTxn] => Array
                        (
                            [0] => Array
                                (
                                    [TxnId] => 148
                                    [TxnType] => Invoice
                                )

                        )

                )

        )

)

[29-Jul-2025 12:52:32 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Payment] => Array
                (
                    [CustomerRef] => Array
                        (
                            [value] => 58
                            [name] => Rafiul(bmrafiul.alam@gmail.com)
                        )

                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                        )

                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                        )

                    [PaymentRefNum] => pi_3RqCiGFHjd3O37lx13
                    [TotalAmt] => 10.7
                    [UnappliedAmt] => 0.7
                    [ProcessPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 149
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-29T05:52:32-07:00
                            [LastUpdatedTime] => 2025-07-29T05:52:32-07:00
                        )

                    [TxnDate] => 2025-07-29
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Invoice ID: in_1RqChxFHjd3O37lxIo6GYocg
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Amount] => 10
                                    [LinkedTxn] => Array
                                        (
                                            [0] => Array
                                                (
                                                    [TxnId] => 148
                                                    [TxnType] => Invoice
                                                )

                                        )

                                    [LineEx] => Array
                                        (
                                            [any] => Array
                                                (
                                                    [0] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnId
                                                                    [Value] => 148
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                    [1] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnOpenBalance
                                                                    [Value] => 10.00
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                    [2] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnReferenceNumber
                                                                    [Value] => 1041
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                )

                                        )

                                )

                        )

                )

            [time] => 2025-07-29T05:52:31.752-07:00
        )

)

[29-Jul-2025 12:52:32 UTC] Payment created successfully in QBO. Payment ID: 149
[29-Jul-2025 12:52:32 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[29-Jul-2025 12:55:02 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RqD3ZFHjd3O37lx0ticN9pg)
[29-Jul-2025 12:55:02 UTC] 1
[29-Jul-2025 12:55:02 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[29-Jul-2025 12:55:02 UTC] Starting sales receipt creation process for event: evt_3RqD3ZFHjd3O37lx0ticN9pg
[29-Jul-2025 12:55:02 UTC] Sales receipt creation failed: No charge found in payment intent
[29-Jul-2025 12:55:02 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:660
Stack trace:
#0 /home/mhossain/public_html/stripe-app/stripe-webhook.php(55): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt(Array, 1)
#1 {main}
  thrown in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 660
[29-Jul-2025 12:59:01 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RqD3ZFHjd3O37lx0ticN9pg)
[29-Jul-2025 12:59:01 UTC] 1
[29-Jul-2025 12:59:01 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[29-Jul-2025 12:59:01 UTC] Starting sales receipt creation process for event: evt_3RqD3ZFHjd3O37lx0ticN9pg
[29-Jul-2025 12:59:01 UTC] Sales receipt creation failed: No charge found in payment intent
[29-Jul-2025 12:59:01 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:660
Stack trace:
#0 /home/mhossain/public_html/stripe-app/stripe-webhook.php(55): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt(Array, 1)
#1 {main}
  thrown in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 660
[29-Jul-2025 13:12:07 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RqD3ZFHjd3O37lx0ticN9pg)
[29-Jul-2025 13:12:07 UTC] 1
[29-Jul-2025 13:12:07 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[29-Jul-2025 13:12:07 UTC] Starting sales receipt creation process for event: evt_3RqD3ZFHjd3O37lx0ticN9pg
[29-Jul-2025 13:12:07 UTC] Sales receipt creation failed: No charge found in payment intent
[29-Jul-2025 13:12:07 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:660
Stack trace:
#0 /home/mhossain/public_html/stripe-app/stripe-webhook.php(55): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt(Array, 1)
#1 {main}
  thrown in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 660
[29-Jul-2025 13:33:22 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RqD3ZFHjd3O37lx0ticN9pg)
[29-Jul-2025 13:33:22 UTC] 1
[29-Jul-2025 13:33:22 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 557
[29-Jul-2025 13:33:22 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 561
[29-Jul-2025 13:33:22 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[29-Jul-2025 13:33:22 UTC] Starting sales receipt creation process for event: evt_3RqD3ZFHjd3O37lx0ticN9pg
[29-Jul-2025 13:33:22 UTC] Sales receipt creation failed: No charge found in payment intent
[29-Jul-2025 13:33:22 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:660
Stack trace:
#0 /home/mhossain/public_html/stripe-app/stripe-webhook.php(55): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 660
[29-Jul-2025 13:49:28 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RqD3ZFHjd3O37lx0ticN9pg)
[29-Jul-2025 13:49:28 UTC] 1
[29-Jul-2025 13:49:28 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 557
[29-Jul-2025 13:49:28 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 561
[29-Jul-2025 13:49:28 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[29-Jul-2025 13:49:28 UTC] Starting sales receipt creation process for event: evt_3RqD3ZFHjd3O37lx0ticN9pg
[29-Jul-2025 13:49:28 UTC] Sales receipt creation failed: No charge found in payment intent
[29-Jul-2025 13:49:28 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:660
Stack trace:
#0 /home/mhossain/public_html/stripe-app/stripe-webhook.php(55): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 660
[29-Jul-2025 13:50:45 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RqD3ZFHjd3O37lx0ticN9pg)
[29-Jul-2025 13:50:45 UTC] 1
[29-Jul-2025 13:50:45 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 568
[29-Jul-2025 13:50:45 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 572
[29-Jul-2025 13:50:45 UTC] PHP Fatal error:  Cannot redeclare function get_stripe_customer() (previously declared in /home/mhossain/public_html/stripe-app/functions.php:79) in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 818
[29-Jul-2025 13:52:06 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RqD3ZFHjd3O37lx0ticN9pg)
[29-Jul-2025 13:52:06 UTC] 1
[29-Jul-2025 13:52:06 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 568
[29-Jul-2025 13:52:06 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 572
[29-Jul-2025 13:52:06 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[29-Jul-2025 13:52:06 UTC] Starting sales receipt creation process for event: evt_3RqD3ZFHjd3O37lx0ticN9pg
[29-Jul-2025 13:52:08 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                )

            [time] => 2025-07-29T06:52:07.942-07:00
        )

)

[29-Jul-2025 13:52:09 UTC] Using QBO customer ID: 59
[29-Jul-2025 13:52:09 UTC] Found checkout session: cs_test_a10Z79KHEvnBKjX1EGWLMsiDiOAi3Ukkzk5FUtIyMwQcdnXJe0KF4COIpH
[29-Jul-2025 13:52:09 UTC] Session tax amount: $0
[29-Jul-2025 13:52:09 UTC] Session subtotal: $10
[29-Jul-2025 13:52:09 UTC] Found checkout session line items: 1
[29-Jul-2025 13:52:09 UTC] Line item: Cap, Subtotal: 10, Tax: 0, Total: 10
[29-Jul-2025 13:52:11 UTC] Total line items amount: 10, Total tax: 0
[29-Jul-2025 13:52:13 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 59
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 10
                    [Description] => Cap
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 19
                                )

                            [UnitPrice] => 10
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => NON
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-29
    [TotalAmt] => 10
    [PrivateNote] => Stripe Payment Intent ID: pi_3RqD3ZFHjd3O37lx052HRQ9d
    [PaymentRefNum] => ch_3RqD3ZFHjd3O37lx0JXGPy51
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[29-Jul-2025 13:52:14 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 150
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-29T06:52:14-07:00
                            [LastUpdatedTime] => 2025-07-29T06:52:14-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [DocNumber] => 1042
                    [TxnDate] => 2025-07-29
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3RqD3ZFHjd3O37lx052HRQ9d
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => Cap
                                    [Amount] => 10
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 19
                                                    [name] => Cap
                                                )

                                            [UnitPrice] => 10
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => NON
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 10
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 0
                        )

                    [CustomerRef] => Array
                        (
                            [value] => 59
                            [name] => tewt wtwt(bmrafiul.alaffffm@gmail.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 100
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 10
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3RqD3ZFHjd3O37lx0JXGPy51
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                )

            [time] => 2025-07-29T06:52:14.155-07:00
        )

)

[29-Jul-2025 13:52:14 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 150
[29-Jul-2025 13:52:14 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[29-Jul-2025 14:15:40 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RqEJbFHjd3O37lx0e2xq4Xs)
[29-Jul-2025 14:15:40 UTC] 1
[29-Jul-2025 14:15:40 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 568
[29-Jul-2025 14:15:40 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 572
[29-Jul-2025 14:15:40 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[29-Jul-2025 14:15:40 UTC] Starting sales receipt creation process for event: evt_3RqEJbFHjd3O37lx0e2xq4Xs
[29-Jul-2025 14:15:41 UTC] No customer email in charge details, trying to get from invoice
[29-Jul-2025 14:15:41 UTC] No customer details found yet, trying to fetch directly from Stripe using customer ID
[29-Jul-2025 14:15:41 UTC] Found customer details directly from Stripe: bmrafiul.alam@gmail.com
[29-Jul-2025 14:15:43 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 29.3
                                    [BalanceWithJobs] => 29.3
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 58
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-29T05:06:51-07:00
                                            [LastUpdatedTime] => 2025-07-29T05:52:32-07:00
                                        )

                                    [GivenName] => Rafiul
                                    [FamilyName] => Rafiul
                                    [FullyQualifiedName] => Rafiul(bmrafiul.alam@gmail.com)
                                    [DisplayName] => Rafiul(bmrafiul.alam@gmail.com)
                                    [PrintOnCheckName] => Rafiul Rafiul
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020987c1392f692da48308a2742c50638555e
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => bmrafiul.alam@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-29T07:15:43.482-07:00
        )

)

[29-Jul-2025 14:15:43 UTC] Using QBO customer ID: 58
[29-Jul-2025 14:15:43 UTC] No Checkout Session found for Payment Intent: pi_3RqEJbFHjd3O37lx0IsiL9Q1
[29-Jul-2025 14:15:43 UTC] No line items found from checkout session, trying to get from invoice
[29-Jul-2025 14:15:43 UTC] No line items found from checkout session or invoice, using default line item
[29-Jul-2025 14:15:49 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 58
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 11
                    [Description] => test
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 20
                                )

                            [UnitPrice] => 11
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => NON
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-29
    [TotalAmt] => 11
    [PrivateNote] => Stripe Payment Intent ID: pi_3RqEJbFHjd3O37lx0IsiL9Q1
    [PaymentRefNum] => ch_3RqEJbFHjd3O37lx0doi3fZm
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[29-Jul-2025 14:15:50 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 151
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-29T07:15:50-07:00
                            [LastUpdatedTime] => 2025-07-29T07:15:50-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [DocNumber] => 1043
                    [TxnDate] => 2025-07-29
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3RqEJbFHjd3O37lx0IsiL9Q1
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => test
                                    [Amount] => 11
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 20
                                                    [name] => test
                                                )

                                            [UnitPrice] => 11
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => NON
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 11
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 0
                        )

                    [CustomerRef] => Array
                        (
                            [value] => 58
                            [name] => Rafiul(bmrafiul.alam@gmail.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 101
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 11
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3RqEJbFHjd3O37lx0doi3fZm
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                )

            [time] => 2025-07-29T07:15:50.094-07:00
        )

)

[29-Jul-2025 14:15:50 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 151
[29-Jul-2025 14:15:50 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[29-Jul-2025 14:25:15 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RqESrCDiOqgoJOU18eHSHPe)
[29-Jul-2025 14:25:15 UTC] 1
[29-Jul-2025 14:25:15 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 568
[29-Jul-2025 14:25:15 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 572
[29-Jul-2025 14:25:15 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[29-Jul-2025 14:25:15 UTC] Starting sales receipt creation process for event: evt_3RqESrCDiOqgoJOU18eHSHPe
[29-Jul-2025 14:25:16 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                )

            [time] => 2025-07-29T07:25:16.292-07:00
        )

)

[29-Jul-2025 14:25:17 UTC] Using QBO customer ID: 60
[29-Jul-2025 14:25:17 UTC] Found checkout session: cs_test_a1dngFOMv0KvBBXY5USyTG2vxyEcwOMBCQWFKle8ZFnYuFE8uTIuyRIIV1
[29-Jul-2025 14:25:17 UTC] Session tax amount: $5.28
[29-Jul-2025 14:25:17 UTC] Session subtotal: $66
[29-Jul-2025 14:25:17 UTC] Calculated tax percentage from session: 8%
[29-Jul-2025 14:25:18 UTC] Found checkout session line items: 1
[29-Jul-2025 14:25:18 UTC] Line item: llll, Subtotal: 66, Tax: 5.28, Total: 71.28
[29-Jul-2025 14:25:21 UTC] Total line items amount: 66, Total tax: 5.28
[29-Jul-2025 14:25:24 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 60
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 66
                    [Description] => llll
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 21
                                )

                            [UnitPrice] => 66
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-29
    [TotalAmt] => 71.28
    [PrivateNote] => Stripe Payment Intent ID: pi_3RqESrCDiOqgoJOU1GyptkYl
    [PaymentRefNum] => ch_3RqESrCDiOqgoJOU1gg5gqhQ
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 5.28
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[29-Jul-2025 14:25:25 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 152
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-29T07:25:25-07:00
                            [LastUpdatedTime] => 2025-07-29T07:25:25-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [DocNumber] => 1044
                    [TxnDate] => 2025-07-29
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3RqESrCDiOqgoJOU1GyptkYl
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => llll
                                    [Amount] => 66
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 21
                                                    [name] => llll
                                                )

                                            [UnitPrice] => 66
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 66
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 0
                        )

                    [CustomerRef] => Array
                        (
                            [value] => 60
                            [name] => yyy yyy(bmrafiudddl.alam@gmail.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 102
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 66
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3RqESrCDiOqgoJOU1gg5gqhQ
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                )

            [time] => 2025-07-29T07:25:25.202-07:00
        )

)

[29-Jul-2025 14:25:25 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 152
[29-Jul-2025 14:25:25 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[29-Jul-2025 14:28:40 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RqEW9CDiOqgoJOU1mS82wAF)
[29-Jul-2025 14:28:40 UTC] 1
[29-Jul-2025 14:28:40 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 568
[29-Jul-2025 14:28:40 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 572
[29-Jul-2025 14:28:40 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[29-Jul-2025 14:28:40 UTC] Starting sales receipt creation process for event: evt_3RqEW9CDiOqgoJOU1mS82wAF
[29-Jul-2025 14:28:41 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                )

            [time] => 2025-07-29T07:28:41.714-07:00
        )

)

[29-Jul-2025 14:28:42 UTC] Using QBO customer ID: 61
[29-Jul-2025 14:28:43 UTC] Found checkout session: cs_test_a11emMhpLufmK282QXpGvYddL6qcHCv3G0UDSTHuXetDpKiS1QZT7FLCMK
[29-Jul-2025 14:28:43 UTC] Session tax amount: $0
[29-Jul-2025 14:28:43 UTC] Session subtotal: $99
[29-Jul-2025 14:28:43 UTC] Found checkout session line items: 1
[29-Jul-2025 14:28:43 UTC] Line item: gggg, Subtotal: 99, Tax: 0, Total: 99
[29-Jul-2025 14:28:46 UTC] Total line items amount: 99, Total tax: 0
[29-Jul-2025 14:28:48 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 61
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 99
                    [Description] => gggg
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 22
                                )

                            [UnitPrice] => 99
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => NON
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-29
    [TotalAmt] => 99
    [PrivateNote] => Stripe Payment Intent ID: pi_3RqEW9CDiOqgoJOU1X8tLsp8
    [PaymentRefNum] => ch_3RqEW9CDiOqgoJOU1Bb7LMMM
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[29-Jul-2025 14:28:49 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 153
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-29T07:28:49-07:00
                            [LastUpdatedTime] => 2025-07-29T07:28:49-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [DocNumber] => 1045
                    [TxnDate] => 2025-07-29
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3RqEW9CDiOqgoJOU1X8tLsp8
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => gggg
                                    [Amount] => 99
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 22
                                                    [name] => gggg
                                                )

                                            [UnitPrice] => 99
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => NON
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 99
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 0
                        )

                    [CustomerRef] => Array
                        (
                            [value] => 61
                            [name] => jjj jjjj(baaamrafiul.alam@gmail.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 103
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 99
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3RqEW9CDiOqgoJOU1Bb7LMMM
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                )

            [time] => 2025-07-29T07:28:49.264-07:00
        )

)

[29-Jul-2025 14:28:49 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 153
[29-Jul-2025 14:28:49 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[29-Jul-2025 14:33:10 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RqEaVCDiOqgoJOU0rHrAArg)
[29-Jul-2025 14:33:10 UTC] 1
[29-Jul-2025 14:33:10 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 568
[29-Jul-2025 14:33:10 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 572
[29-Jul-2025 14:33:10 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[29-Jul-2025 14:33:10 UTC] Starting sales receipt creation process for event: evt_3RqEaVCDiOqgoJOU0rHrAArg
[29-Jul-2025 14:33:11 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                )

            [time] => 2025-07-29T07:33:11.099-07:00
        )

)

[29-Jul-2025 14:33:12 UTC] Using QBO customer ID: 62
[29-Jul-2025 14:33:12 UTC] Found checkout session: cs_test_a1ZcJCSpTBNOSdf3EMWw0hVhZA1tzDElTdwmzFxm99fuxsTDN0VgGnhVS3
[29-Jul-2025 14:33:12 UTC] Session tax amount: $7.92
[29-Jul-2025 14:33:12 UTC] Session subtotal: $99
[29-Jul-2025 14:33:12 UTC] Calculated tax percentage from session: 8%
[29-Jul-2025 14:33:12 UTC] Found checkout session line items: 1
[29-Jul-2025 14:33:12 UTC] Line item: gggg, Subtotal: 99, Tax: 7.92, Total: 106.92
[29-Jul-2025 14:33:14 UTC] Total line items amount: 99, Total tax: 7.92
[29-Jul-2025 14:33:17 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 62
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 99
                    [Description] => gggg
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 22
                                )

                            [UnitPrice] => 99
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-29
    [TotalAmt] => 106.92
    [PrivateNote] => Stripe Payment Intent ID: pi_3RqEaVCDiOqgoJOU0jhCHrcF
    [PaymentRefNum] => ch_3RqEaVCDiOqgoJOU07Np5jO3
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 7.92
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[29-Jul-2025 14:33:18 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 154
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-29T07:33:18-07:00
                            [LastUpdatedTime] => 2025-07-29T07:33:18-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [DocNumber] => 1046
                    [TxnDate] => 2025-07-29
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3RqEaVCDiOqgoJOU0jhCHrcF
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => gggg
                                    [Amount] => 99
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 22
                                                    [name] => gggg
                                                )

                                            [UnitPrice] => 99
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 99
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 0
                        )

                    [CustomerRef] => Array
                        (
                            [value] => 62
                            [name] => hh hhh(dadad@fdfsdfs.fsdf)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 104
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 99
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3RqEaVCDiOqgoJOU07Np5jO3
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                )

            [time] => 2025-07-29T07:33:17.744-07:00
        )

)

[29-Jul-2025 14:33:18 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 154
[29-Jul-2025 14:33:18 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[29-Jul-2025 14:38:50 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RqEfzCDiOqgoJOU1vGGz7hd)
[29-Jul-2025 14:38:50 UTC] 1
[29-Jul-2025 14:38:50 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 568
[29-Jul-2025 14:38:50 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 572
[29-Jul-2025 14:38:50 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[29-Jul-2025 14:38:50 UTC] Starting sales receipt creation process for event: evt_3RqEfzCDiOqgoJOU1vGGz7hd
[29-Jul-2025 14:38:51 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                )

            [time] => 2025-07-29T07:38:51.779-07:00
        )

)

[29-Jul-2025 14:38:52 UTC] Using QBO customer ID: 63
[29-Jul-2025 14:38:53 UTC] No Checkout Session found for Payment Intent: pi_3RqEfzCDiOqgoJOU1VCnt1vY
[29-Jul-2025 14:38:53 UTC] No line items found from checkout session, trying to get from invoice
[29-Jul-2025 14:38:53 UTC] Found invoice line items: 1
[29-Jul-2025 14:38:53 UTC] Processing subscription invoice
[29-Jul-2025 14:38:53 UTC] Using product name from Stripe: gggg
[29-Jul-2025 14:38:58 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 63
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 99
                    [Description] => 1 × gggg (at $99.00 / day)
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 22
                                )

                            [UnitPrice] => 99
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-29
    [TotalAmt] => 109.89
    [PrivateNote] => Stripe Payment Intent ID: pi_3RqEfzCDiOqgoJOU1VCnt1vY
    [PaymentRefNum] => ch_3RqEfzCDiOqgoJOU1Qx1bbvh
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 10.89
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[29-Jul-2025 14:38:59 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 155
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-29T07:38:59-07:00
                            [LastUpdatedTime] => 2025-07-29T07:38:59-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [DocNumber] => 1047
                    [TxnDate] => 2025-07-29
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3RqEfzCDiOqgoJOU1VCnt1vY
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => 1 × gggg (at $99.00 / day)
                                    [Amount] => 99
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 22
                                                    [name] => gggg
                                                )

                                            [UnitPrice] => 99
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 99
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 0
                        )

                    [CustomerRef] => Array
                        (
                            [value] => 63
                            [name] => ggg ggg(nnnn@nnn.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 105
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 99
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3RqEfzCDiOqgoJOU1Qx1bbvh
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                )

            [time] => 2025-07-29T07:38:59.315-07:00
        )

)

[29-Jul-2025 14:38:59 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 155
[29-Jul-2025 14:38:59 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[29-Jul-2025 14:41:40 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RqEikCDiOqgoJOU15xba2Cv)
[29-Jul-2025 14:41:40 UTC] 1
[29-Jul-2025 14:41:40 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 568
[29-Jul-2025 14:41:40 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 572
[29-Jul-2025 14:41:40 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[29-Jul-2025 14:41:40 UTC] Starting sales receipt creation process for event: evt_3RqEikCDiOqgoJOU15xba2Cv
[29-Jul-2025 14:41:41 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 61
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-29T07:28:43-07:00
                                            [LastUpdatedTime] => 2025-07-29T07:28:43-07:00
                                        )

                                    [GivenName] => jjj jjjj
                                    [FamilyName] => jjj jjjj
                                    [FullyQualifiedName] => jjj jjjj(baaamrafiul.alam@gmail.com)
                                    [DisplayName] => jjj jjjj(baaamrafiul.alam@gmail.com)
                                    [PrintOnCheckName] => jjj jjjj jjj jjjj
                                    [Active] => 1
                                    [V4IDPseudonym] => 002098e314b56e9fd24ac9a2de730e4d776f7e
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => baaamrafiul.alam@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-29T07:41:41.198-07:00
        )

)

[29-Jul-2025 14:41:41 UTC] Using QBO customer ID: 61
[29-Jul-2025 14:41:41 UTC] No Checkout Session found for Payment Intent: pi_3RqEikCDiOqgoJOU1escfPVI
[29-Jul-2025 14:41:41 UTC] No line items found from checkout session, trying to get from invoice
[29-Jul-2025 14:41:41 UTC] No line items found from checkout session or invoice, using default line item
[29-Jul-2025 14:41:46 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 61
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 780
                    [Description] => producttts
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 23
                                )

                            [UnitPrice] => 780
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => NON
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-29
    [TotalAmt] => 780
    [PrivateNote] => Stripe Payment Intent ID: pi_3RqEikCDiOqgoJOU1escfPVI
    [PaymentRefNum] => ch_3RqEikCDiOqgoJOU19lkkCMh
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[29-Jul-2025 14:41:48 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 156
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-29T07:41:48-07:00
                            [LastUpdatedTime] => 2025-07-29T07:41:48-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [DocNumber] => 1048
                    [TxnDate] => 2025-07-29
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3RqEikCDiOqgoJOU1escfPVI
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => producttts
                                    [Amount] => 780
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 23
                                                    [name] => producttts
                                                )

                                            [UnitPrice] => 780
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => NON
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 780
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 0
                        )

                    [CustomerRef] => Array
                        (
                            [value] => 61
                            [name] => jjj jjjj(baaamrafiul.alam@gmail.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 106
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 780
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3RqEikCDiOqgoJOU19lkkCMh
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                )

            [time] => 2025-07-29T07:41:47.513-07:00
        )

)

[29-Jul-2025 14:41:48 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 156
[29-Jul-2025 14:41:48 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[29-Jul-2025 14:46:01 UTC] Stripe Webhook Received: invoice.finalized (ID: evt_1RqEmyCDiOqgoJOUaTILlKOx)
[29-Jul-2025 14:46:01 UTC] 1
[29-Jul-2025 14:46:01 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[29-Jul-2025 14:46:01 UTC] Starting invoice creation process for event: evt_1RqEmyCDiOqgoJOUaTILlKOx
[29-Jul-2025 14:46:01 UTC] Fetching Stripe invoice: in_1RqEmoCDiOqgoJOU4JV8K4Lj
[29-Jul-2025 14:46:01 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RqEmoCDiOqgoJOU4JV8K4Lj
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 60804
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 60804
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 1
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 1
            [liability] => Array
                (
                    [type] => self
                )

            [provider] => stripe
            [status] => complete
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1753800350
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SjnwUYkEhMGRh5
    [customer_address] => Array
        (
            [city] => Alabama
            [country] => US
            [line1] => Alabama
            [line2] => Alabama
            [postal_code] => 35013
            [state] => AL
        )

    [customer_email] => ytyvdft@testtt.com
    [customer_name] => ttt tttt
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1756392359
    [effective_at] => 1753800359
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TbG1MRE1TOGpWRmlsTTRUUHA0SWYyYUJDYzk1aDNzLDE0NDM0MTE2MQ0200gS7FIq4P?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TbG1MRE1TOGpWRmlsTTRUUHA0SWYyYUJDYzk1aDNzLDE0NDM0MTE2MQ0200gS7FIq4P/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RqEmoCDiOqgoJOUikL892Bs
                            [object] => line_item
                            [amount] => 3500
                            [amount_excluding_tax] => 3500
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RqEmoCDiOqgoJOU4JV8K4Lj
                            [invoice_item] => ii_1RqEmoCDiOqgoJOUt2UHTOcY
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1RqEmoCDiOqgoJOUt2UHTOcY
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1753800350
                                    [start] => 1753800350
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 7
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 280
                                            [inclusive] => 
                                            [tax_rate] => txr_1RmbmQCDiOqgoJOUVl6boLeV
                                            [taxability_reason] => standard_rated
                                            [taxable_amount] => 3500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 280
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1RmbmQCDiOqgoJOUVl6boLeV
                                                )

                                            [taxability_reason] => standard_rated
                                            [taxable_amount] => 3500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                    [1] => Array
                        (
                            [id] => il_1RqEmpCDiOqgoJOUbHCFK7lL
                            [object] => line_item
                            [amount] => 52800
                            [amount_excluding_tax] => 52800
                            [currency] => usd
                            [description] => llll
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RqEmoCDiOqgoJOU4JV8K4Lj
                            [invoice_item] => ii_1RqEmoCDiOqgoJOU0WNuKtfK
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1RqEmoCDiOqgoJOU0WNuKtfK
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1753800350
                                    [start] => 1753800350
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RlPu2CDiOqgoJOUqYL6qJsw
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1752651442
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SgnUhRleVQlEod
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 6600
                                    [unit_amount_decimal] => 6600
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RlPu2CDiOqgoJOUqYL6qJsw
                                            [product] => prod_SgnUhRleVQlEod
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 6600
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 8
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 4224
                                            [inclusive] => 
                                            [tax_rate] => txr_1RmbmQCDiOqgoJOUVl6boLeV
                                            [taxability_reason] => standard_rated
                                            [taxable_amount] => 52800
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 4224
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1RmbmQCDiOqgoJOUVl6boLeV
                                                )

                                            [taxability_reason] => standard_rated
                                            [taxable_amount] => 52800
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 6600
                        )

                )

            [has_more] => 
            [total_count] => 2
            [url] => /v1/invoices/in_1RqEmoCDiOqgoJOU4JV8K4Lj/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => 2TRWG5I9-0002
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RqEmxCDiOqgoJOU01ddNHre
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1753885717
    [period_start] => 1753799317
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => 
            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => open
    [status_transitions] => Array
        (
            [finalized_at] => 1753800359
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 56300
    [subtotal_excluding_tax] => 56300
    [tax] => 4504
    [test_clock] => 
    [total] => 60804
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 56300
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 4504
                    [inclusive] => 
                    [tax_rate] => txr_1RmbmQCDiOqgoJOUVl6boLeV
                    [taxability_reason] => standard_rated
                    [taxable_amount] => 56300
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 4504
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1RmbmQCDiOqgoJOUVl6boLeV
                        )

                    [taxability_reason] => standard_rated
                    [taxable_amount] => 56300
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1753800350
)

[29-Jul-2025 14:46:04 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                )

            [time] => 2025-07-29T07:46:03.910-07:00
        )

)

[29-Jul-2025 14:46:05 UTC] Using QBO customer ID: 64
[29-Jul-2025 14:46:08 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 64
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 35
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 24
                                )

                            [UnitPrice] => 5
                            [Qty] => 7
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

            [1] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 528
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 21
                                )

                            [UnitPrice] => 66
                            [Qty] => 8
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-29
    [DueDate] => 2025-08-28
    [TotalAmt] => 608.04
    [PrivateNote] => Stripe Invoice ID: in_1RqEmoCDiOqgoJOU4JV8K4Lj
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 45.04
        )

)

[29-Jul-2025 14:46:10 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 157
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-29T07:46:10-07:00
                            [LastModifiedByRef] => Array
                                (
                                    [value] => 9341455082530719
                                )

                            [LastUpdatedTime] => 2025-07-29T07:46:10-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [DocNumber] => 1049
                    [TxnDate] => 2025-07-29
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Invoice ID: in_1RqEmoCDiOqgoJOU4JV8K4Lj
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 35
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 24
                                                    [name] => product1
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 7
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Id] => 2
                                    [LineNum] => 2
                                    [Amount] => 528
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 21
                                                    [name] => llll
                                                )

                                            [UnitPrice] => 66
                                            [Qty] => 8
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [2] => Array
                                (
                                    [Amount] => 563
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 0
                        )

                    [CustomerRef] => Array
                        (
                            [value] => 64
                            [name] => ttt tttt(ytyvdft@testtt.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 107
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [DueDate] => 2025-08-28
                    [TotalAmt] => 563
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 563
                )

            [time] => 2025-07-29T07:46:09.462-07:00
        )

)

[29-Jul-2025 14:46:10 UTC] Invoice created successfully in QBO. Invoice ID: 157
[29-Jul-2025 14:46:10 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[29-Jul-2025 15:04:44 UTC] Stripe Webhook Received: invoice.finalized (ID: evt_1RqF56CDiOqgoJOUqYjsjiGG)
[29-Jul-2025 15:04:44 UTC] 1
[29-Jul-2025 15:04:44 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[29-Jul-2025 15:04:44 UTC] Starting invoice creation process for event: evt_1RqF56CDiOqgoJOUqYjsjiGG
[29-Jul-2025 15:04:44 UTC] Fetching Stripe invoice: in_1RqF45CDiOqgoJOUbF7OdwiM
[29-Jul-2025 15:04:45 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RqF45CDiOqgoJOUbF7OdwiM
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 102564
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 102564
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 1
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1753801421
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SjlgYkStIk9Wkx
    [customer_address] => 
    [customer_email] => vvvv@vvvv.com
    [customer_name] => vvv vvv
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                    [object] => tax_rate
                    [active] => 1
                    [country] => US
                    [created] => 1752935198
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => AL
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1756393483
    [effective_at] => 1753801483
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TbG1kTkZ4UFVpSGtIdlBIRVVES2hod0drdkZOb1lhLDE0NDM0MjI4NQ020000fRCi5n?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TbG1kTkZ4UFVpSGtIdlBIRVVES2hod0drdkZOb1lhLDE0NDM0MjI4NQ020000fRCi5n/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RqF4UCDiOqgoJOUZQqs3YGs
                            [object] => line_item
                            [amount] => 33000
                            [amount_excluding_tax] => 33000
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RqF45CDiOqgoJOUbF7OdwiM
                            [invoice_item] => ii_1RqF4VCDiOqgoJOUjhNweOqd
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1RqF4VCDiOqgoJOUjhNweOqd
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1753801446
                                    [start] => 1753801446
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 66
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 3630
                                            [inclusive] => 
                                            [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                                            [taxability_reason] => 
                                            [taxable_amount] => 33000
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 3630
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 33000
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                    [1] => Array
                        (
                            [id] => il_1RqF4GCDiOqgoJOUzelnTw3m
                            [object] => line_item
                            [amount] => 59400
                            [amount_excluding_tax] => 59400
                            [currency] => usd
                            [description] => llll
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RqF45CDiOqgoJOUbF7OdwiM
                            [invoice_item] => ii_1RqF4GCDiOqgoJOUkvLRz4SH
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1RqF4GCDiOqgoJOUkvLRz4SH
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1753801432
                                    [start] => 1753801432
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RlPu2CDiOqgoJOUqYL6qJsw
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1752651442
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SgnUhRleVQlEod
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 6600
                                    [unit_amount_decimal] => 6600
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RlPu2CDiOqgoJOUqYL6qJsw
                                            [product] => prod_SgnUhRleVQlEod
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 6600
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 9
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 6534
                                            [inclusive] => 
                                            [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                                            [taxability_reason] => 
                                            [taxable_amount] => 59400
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 6534
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 59400
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 6600
                        )

                )

            [has_more] => 
            [total_count] => 2
            [url] => /v1/invoices/in_1RqF45CDiOqgoJOUbF7OdwiM/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => HASVXSNP-0002
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RqF55CDiOqgoJOU1JBszkpZ
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1753801421
    [period_start] => 1753801421
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => open
    [status_transitions] => Array
        (
            [finalized_at] => 1753801483
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 92400
    [subtotal_excluding_tax] => 92400
    [tax] => 10164
    [test_clock] => 
    [total] => 102564
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 92400
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 10164
                    [inclusive] => 
                    [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                    [taxability_reason] => 
                    [taxable_amount] => 92400
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 10164
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 92400
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1753801421
)

[29-Jul-2025 15:04:47 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                )

            [time] => 2025-07-29T08:04:47.496-07:00
        )

)

[29-Jul-2025 15:04:48 UTC] Using QBO customer ID: 70
[29-Jul-2025 15:04:51 UTC] Found matching tax code: 5 for rate: 11%
[29-Jul-2025 15:04:54 UTC] Found matching tax code: 5 for rate: 11%
[29-Jul-2025 15:04:54 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 70
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 330
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 26
                                )

                            [UnitPrice] => 5
                            [Qty] => 66
                            [TaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                        )

                )

            [1] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 594
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 27
                                )

                            [UnitPrice] => 66
                            [Qty] => 9
                            [TaxCodeRef] => Array
                                (
                                    [value] => 5
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-29
    [DueDate] => 2025-08-28
    [TotalAmt] => 1025.64
    [PrivateNote] => Stripe Invoice ID: in_1RqF45CDiOqgoJOUbF7OdwiM
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [GlobalTaxCalculation] => TaxExcluded
    [TxnTaxDetail] => Array
        (
            [TotalTax] => 101.64
        )

)

[29-Jul-2025 15:04:56 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 196
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-29T08:04:56-07:00
                            [LastModifiedByRef] => Array
                                (
                                    [value] => 9341455090993404
                                )

                            [LastUpdatedTime] => 2025-07-29T08:04:56-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-07-29
                    [CurrencyRef] => Array
                        (
                            [value] => AUD
                            [name] => Australian Dollar
                        )

                    [ExchangeRate] => 1
                    [PrivateNote] => Stripe Invoice ID: in_1RqF45CDiOqgoJOUbF7OdwiM
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 330
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 26
                                                    [name] => product1
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 66
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 81
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => 5
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Id] => 2
                                    [LineNum] => 2
                                    [Amount] => 594
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 27
                                                    [name] => llll
                                                )

                                            [UnitPrice] => 66
                                            [Qty] => 9
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 81
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => 5
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [2] => Array
                                (
                                    [Amount] => 924
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 4
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 0
                                                    [NetAmountTaxable] => 924
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 70
                            [name] => vvv vvv(vvvv@vvvv.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 57
                            [Line1] => 2500 Garcia Ave
                            [Line2] => Sydney NSW  2050
                        )

                    [DueDate] => 2025-08-28
                    [GlobalTaxCalculation] => TaxExcluded
                    [TotalAmt] => 924
                    [HomeTotalAmt] => 924
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 924
                    [HomeBalance] => 924
                )

            [time] => 2025-07-29T08:04:55.236-07:00
        )

)

[29-Jul-2025 15:04:56 UTC] Invoice created successfully in QBO. Invoice ID: 196
[29-Jul-2025 15:04:56 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[29-Jul-2025 15:10:23 UTC] Stripe Webhook Received: invoice.finalized (ID: evt_1RqF56CDiOqgoJOUqYjsjiGG)
[29-Jul-2025 15:10:23 UTC] 1
[29-Jul-2025 15:10:23 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[29-Jul-2025 15:10:23 UTC] Starting invoice creation process for event: evt_1RqF56CDiOqgoJOUqYjsjiGG
[29-Jul-2025 15:10:23 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[29-Jul-2025 15:10:23 UTC] Invoice already processed. QBO Invoice ID: 196
[29-Jul-2025 15:11:09 UTC] Stripe Webhook Received: invoice.finalized (ID: evt_1RqF56CDiOqgoJOUqYjsjiGG)
[29-Jul-2025 15:11:09 UTC] 1
[29-Jul-2025 15:11:09 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[29-Jul-2025 15:11:09 UTC] Starting invoice creation process for event: evt_1RqF56CDiOqgoJOUqYjsjiGG
[29-Jul-2025 15:11:09 UTC] Fetching Stripe invoice: in_1RqF45CDiOqgoJOUbF7OdwiM
[29-Jul-2025 15:11:09 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RqF45CDiOqgoJOUbF7OdwiM
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 102564
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 102564
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 1
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1753801421
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SjlgYkStIk9Wkx
    [customer_address] => 
    [customer_email] => vvvv@vvvv.com
    [customer_name] => vvv vvv
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                    [object] => tax_rate
                    [active] => 1
                    [country] => US
                    [created] => 1752935198
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => AL
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1756393483
    [effective_at] => 1753801483
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TbG1kTkZ4UFVpSGtIdlBIRVVES2hod0drdkZOb1lhLDE0NDM0MjY2OQ0200aCyGdQsY?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TbG1kTkZ4UFVpSGtIdlBIRVVES2hod0drdkZOb1lhLDE0NDM0MjY2OQ0200aCyGdQsY/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RqF4UCDiOqgoJOUZQqs3YGs
                            [object] => line_item
                            [amount] => 33000
                            [amount_excluding_tax] => 33000
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RqF45CDiOqgoJOUbF7OdwiM
                            [invoice_item] => ii_1RqF4VCDiOqgoJOUjhNweOqd
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1RqF4VCDiOqgoJOUjhNweOqd
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1753801446
                                    [start] => 1753801446
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 66
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 3630
                                            [inclusive] => 
                                            [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                                            [taxability_reason] => 
                                            [taxable_amount] => 33000
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 3630
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 33000
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                    [1] => Array
                        (
                            [id] => il_1RqF4GCDiOqgoJOUzelnTw3m
                            [object] => line_item
                            [amount] => 59400
                            [amount_excluding_tax] => 59400
                            [currency] => usd
                            [description] => llll
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RqF45CDiOqgoJOUbF7OdwiM
                            [invoice_item] => ii_1RqF4GCDiOqgoJOUkvLRz4SH
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1RqF4GCDiOqgoJOUkvLRz4SH
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1753801432
                                    [start] => 1753801432
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RlPu2CDiOqgoJOUqYL6qJsw
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1752651442
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SgnUhRleVQlEod
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 6600
                                    [unit_amount_decimal] => 6600
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RlPu2CDiOqgoJOUqYL6qJsw
                                            [product] => prod_SgnUhRleVQlEod
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 6600
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 9
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 6534
                                            [inclusive] => 
                                            [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                                            [taxability_reason] => 
                                            [taxable_amount] => 59400
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 6534
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 59400
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 6600
                        )

                )

            [has_more] => 
            [total_count] => 2
            [url] => /v1/invoices/in_1RqF45CDiOqgoJOUbF7OdwiM/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => HASVXSNP-0002
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RqF55CDiOqgoJOU1JBszkpZ
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1753801421
    [period_start] => 1753801421
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => open
    [status_transitions] => Array
        (
            [finalized_at] => 1753801483
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 92400
    [subtotal_excluding_tax] => 92400
    [tax] => 10164
    [test_clock] => 
    [total] => 102564
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 92400
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 10164
                    [inclusive] => 
                    [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                    [taxability_reason] => 
                    [taxable_amount] => 92400
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 10164
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 92400
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1753801421
)

[29-Jul-2025 15:11:11 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 924
                                    [BalanceWithJobs] => 924
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 70
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-29T08:04:49-07:00
                                            [LastUpdatedTime] => 2025-07-29T08:04:56-07:00
                                        )

                                    [GivenName] => vvv vvv
                                    [FamilyName] => vvv vvv
                                    [FullyQualifiedName] => vvv vvv(vvvv@vvvv.com)
                                    [DisplayName] => vvv vvv(vvvv@vvvv.com)
                                    [PrintOnCheckName] => vvv vvv vvv vvv
                                    [Active] => 1
                                    [V4IDPseudonym] => 002099d4ba3457648841bdb4a312ff707d741b
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => vvvv@vvvv.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-29T08:11:11.255-07:00
        )

)

[29-Jul-2025 15:11:11 UTC] Using QBO customer ID: 70
[29-Jul-2025 15:11:12 UTC] Found matching tax code: 11 for rate: 11%
[29-Jul-2025 15:11:13 UTC] Found matching tax code: 11 for rate: 11%
[29-Jul-2025 15:11:13 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 70
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 330
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 26
                                )

                            [UnitPrice] => 5
                            [Qty] => 66
                            [TaxCodeRef] => Array
                                (
                                    [value] => 11
                                )

                        )

                )

            [1] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 594
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 27
                                )

                            [UnitPrice] => 66
                            [Qty] => 9
                            [TaxCodeRef] => Array
                                (
                                    [value] => 11
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-29
    [DueDate] => 2025-08-28
    [TotalAmt] => 1025.64
    [PrivateNote] => Stripe Invoice ID: in_1RqF45CDiOqgoJOUbF7OdwiM
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [GlobalTaxCalculation] => TaxExcluded
    [TxnTaxDetail] => Array
        (
            [TotalTax] => 101.64
        )

)

[29-Jul-2025 15:11:14 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 197
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-29T08:11:14-07:00
                            [LastModifiedByRef] => Array
                                (
                                    [value] => 9341455090993404
                                )

                            [LastUpdatedTime] => 2025-07-29T08:11:14-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-07-29
                    [CurrencyRef] => Array
                        (
                            [value] => AUD
                            [name] => Australian Dollar
                        )

                    [ExchangeRate] => 1
                    [PrivateNote] => Stripe Invoice ID: in_1RqF45CDiOqgoJOUbF7OdwiM
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 330
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 26
                                                    [name] => product1
                                                )

                                            [UnitPrice] => 5
                                            [Qty] => 66
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 81
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => 11
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Id] => 2
                                    [LineNum] => 2
                                    [Amount] => 594
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 27
                                                    [name] => llll
                                                )

                                            [UnitPrice] => 66
                                            [Qty] => 9
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 81
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => 11
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [2] => Array
                                (
                                    [Amount] => 924
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 101.64
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 101.64
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 21
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 11
                                                    [NetAmountTaxable] => 924
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 70
                            [name] => vvv vvv(vvvv@vvvv.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 58
                            [Line1] => 2500 Garcia Ave
                            [Line2] => Sydney NSW  2050
                        )

                    [DueDate] => 2025-08-28
                    [GlobalTaxCalculation] => TaxExcluded
                    [TotalAmt] => 1025.64
                    [HomeTotalAmt] => 1025.64
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 1025.64
                    [HomeBalance] => 1025.64
                )

            [time] => 2025-07-29T08:11:13.965-07:00
        )

)

[29-Jul-2025 15:11:14 UTC] Invoice created successfully in QBO. Invoice ID: 197
[29-Jul-2025 15:11:14 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[29-Jul-2025 15:17:35 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1RqFHWCDiOqgoJOUVussBldq)
[29-Jul-2025 15:17:35 UTC] 1
[29-Jul-2025 15:17:35 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[29-Jul-2025 15:17:35 UTC] Starting payment process for Stripe invoice: evt_1RqFHWCDiOqgoJOUVussBldq
[29-Jul-2025 15:17:35 UTC] Fetching Stripe invoice: in_1RqF45CDiOqgoJOUbF7OdwiM
[29-Jul-2025 15:17:35 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RqF45CDiOqgoJOUbF7OdwiM
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 102564
    [amount_overpaid] => 0
    [amount_paid] => 102564
    [amount_remaining] => 0
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 1
    [attempted] => 1
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => ch_3RqF55CDiOqgoJOU1FXrylbP
    [collection_method] => send_invoice
    [created] => 1753801421
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SjlgYkStIk9Wkx
    [customer_address] => 
    [customer_email] => vvvv@vvvv.com
    [customer_name] => vvv vvv
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                    [object] => tax_rate
                    [active] => 1
                    [country] => US
                    [created] => 1752935198
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => AL
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1756393483
    [effective_at] => 1753801483
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TbG1kTkZ4UFVpSGtIdlBIRVVES2hod0drdkZOb1lhLDE0NDM0MzA1NQ0200RMg43Swg?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TbG1kTkZ4UFVpSGtIdlBIRVVES2hod0drdkZOb1lhLDE0NDM0MzA1NQ0200RMg43Swg/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RqF4UCDiOqgoJOUZQqs3YGs
                            [object] => line_item
                            [amount] => 33000
                            [amount_excluding_tax] => 33000
                            [currency] => usd
                            [description] => product1
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RqF45CDiOqgoJOUbF7OdwiM
                            [invoice_item] => ii_1RqF4VCDiOqgoJOUjhNweOqd
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1RqF4VCDiOqgoJOUjhNweOqd
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1753801446
                                    [start] => 1753801446
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1750844275
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SYxhGpgVH8DUSO
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 500
                                    [unit_amount_decimal] => 500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RdpmBCDiOqgoJOUzxQmu2oy
                                            [product] => prod_SYxhGpgVH8DUSO
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 66
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 3630
                                            [inclusive] => 
                                            [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                                            [taxability_reason] => 
                                            [taxable_amount] => 33000
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 3630
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 33000
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 500
                        )

                    [1] => Array
                        (
                            [id] => il_1RqF4GCDiOqgoJOUzelnTw3m
                            [object] => line_item
                            [amount] => 59400
                            [amount_excluding_tax] => 59400
                            [currency] => usd
                            [description] => llll
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RqF45CDiOqgoJOUbF7OdwiM
                            [invoice_item] => ii_1RqF4GCDiOqgoJOUkvLRz4SH
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1RqF4GCDiOqgoJOUkvLRz4SH
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1753801432
                                    [start] => 1753801432
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RlPu2CDiOqgoJOUqYL6qJsw
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1752651442
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SgnUhRleVQlEod
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 6600
                                    [unit_amount_decimal] => 6600
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RlPu2CDiOqgoJOUqYL6qJsw
                                            [product] => prod_SgnUhRleVQlEod
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 6600
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 9
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 6534
                                            [inclusive] => 
                                            [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                                            [taxability_reason] => 
                                            [taxable_amount] => 59400
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 6534
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 59400
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 6600
                        )

                )

            [has_more] => 
            [total_count] => 2
            [url] => /v1/invoices/in_1RqF45CDiOqgoJOUbF7OdwiM/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => HASVXSNP-0002
    [on_behalf_of] => 
    [paid] => 1
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RqF55CDiOqgoJOU1JBszkpZ
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1753801421
    [period_start] => 1753801421
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => paid
    [status_transitions] => Array
        (
            [finalized_at] => 1753801483
            [marked_uncollectible_at] => 
            [paid_at] => 1753802252
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 92400
    [subtotal_excluding_tax] => 92400
    [tax] => 10164
    [test_clock] => 
    [total] => 102564
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 92400
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 10164
                    [inclusive] => 
                    [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                    [taxability_reason] => 
                    [taxable_amount] => 92400
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 10164
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 92400
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1753801421
)

[29-Jul-2025 15:17:38 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 1949.64
                                    [BalanceWithJobs] => 1949.64
                                    [CurrencyRef] => Array
                                        (
                                            [value] => AUD
                                            [name] => Australian Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 70
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-29T08:04:49-07:00
                                            [LastUpdatedTime] => 2025-07-29T08:11:15-07:00
                                        )

                                    [GivenName] => vvv vvv
                                    [FamilyName] => vvv vvv
                                    [FullyQualifiedName] => vvv vvv(vvvv@vvvv.com)
                                    [DisplayName] => vvv vvv(vvvv@vvvv.com)
                                    [PrintOnCheckName] => vvv vvv vvv vvv
                                    [Active] => 1
                                    [V4IDPseudonym] => 002099d4ba3457648841bdb4a312ff707d741b
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => vvvv@vvvv.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-29T08:17:38.045-07:00
        )

)

[29-Jul-2025 15:17:38 UTC] Using QBO customer ID: 70
[29-Jul-2025 15:17:38 UTC] Found existing QBO invoice ID: 197
[29-Jul-2025 15:17:40 UTC] Failed to create payment method: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Invalid Enumeration
                                    [Detail] => Invalid Enumeration : OTHER
                                    [code] => 2170
                                    [element] => Type
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-29T08:17:40.870-07:00
        )

)

[29-Jul-2025 15:17:41 UTC] Creating QBO payment with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 70
        )

    [TotalAmt] => 1025.64
    [TxnDate] => 2025-07-29
    [PaymentRefNum] => pi_3RqF55CDiOqgoJOU1J
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [DepositToAccountRef] => Array
        (
            [value] => 108
        )

    [PrivateNote] => Stripe Invoice ID: in_1RqF45CDiOqgoJOUbF7OdwiM
    [Line] => Array
        (
            [0] => Array
                (
                    [Amount] => 1025.64
                    [LinkedTxn] => Array
                        (
                            [0] => Array
                                (
                                    [TxnId] => 197
                                    [TxnType] => Invoice
                                )

                        )

                )

        )

)

[29-Jul-2025 15:17:43 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Payment] => Array
                (
                    [CustomerRef] => Array
                        (
                            [value] => 70
                            [name] => vvv vvv(vvvv@vvvv.com)
                        )

                    [DepositToAccountRef] => Array
                        (
                            [value] => 108
                        )

                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                        )

                    [PaymentRefNum] => pi_3RqF55CDiOqgoJOU1J
                    [TotalAmt] => 1025.64
                    [UnappliedAmt] => 0
                    [ProcessPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 198
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-29T08:17:43-07:00
                            [LastUpdatedTime] => 2025-07-29T08:17:43-07:00
                        )

                    [TxnDate] => 2025-07-29
                    [CurrencyRef] => Array
                        (
                            [value] => AUD
                            [name] => Australian Dollar
                        )

                    [ExchangeRate] => 1
                    [PrivateNote] => Stripe Invoice ID: in_1RqF45CDiOqgoJOUbF7OdwiM
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Amount] => 1025.64
                                    [LinkedTxn] => Array
                                        (
                                            [0] => Array
                                                (
                                                    [TxnId] => 197
                                                    [TxnType] => Invoice
                                                )

                                        )

                                    [LineEx] => Array
                                        (
                                            [any] => Array
                                                (
                                                    [0] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnId
                                                                    [Value] => 197
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                    [1] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnOpenBalance
                                                                    [Value] => 1025.64
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                    [2] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnReferenceNumber
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                )

                                        )

                                )

                        )

                )

            [time] => 2025-07-29T08:17:42.553-07:00
        )

)

[29-Jul-2025 15:17:43 UTC] Payment created successfully in QBO. Payment ID: 198
[29-Jul-2025 15:17:43 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[29-Jul-2025 15:21:45 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RqFLXCDiOqgoJOU1QjY7wGX)
[29-Jul-2025 15:21:45 UTC] 1
[29-Jul-2025 15:21:45 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 568
[29-Jul-2025 15:21:45 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 572
[29-Jul-2025 15:21:45 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[29-Jul-2025 15:21:45 UTC] Starting sales receipt creation process for event: evt_3RqFLXCDiOqgoJOU1QjY7wGX
[29-Jul-2025 15:21:46 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                )

            [time] => 2025-07-29T08:21:46.774-07:00
        )

)

[29-Jul-2025 15:21:48 UTC] Using QBO customer ID: 71
[29-Jul-2025 15:21:48 UTC] Found checkout session: cs_test_a1iavJvpDKCRXABO9pbXqcYSfnKIxfKNqQs54nclnFsN6cprXBcDxYC7A8
[29-Jul-2025 15:21:48 UTC] Session tax amount: $5.28
[29-Jul-2025 15:21:48 UTC] Session subtotal: $66
[29-Jul-2025 15:21:48 UTC] Calculated tax percentage from session: 8%
[29-Jul-2025 15:21:48 UTC] Found checkout session line items: 1
[29-Jul-2025 15:21:48 UTC] Line item: llll, Subtotal: 66, Tax: 5.28, Total: 71.28
[29-Jul-2025 15:21:50 UTC] Found tax code for 8%: 12
[29-Jul-2025 15:21:50 UTC] Total line items amount: 66, Total tax: 5.28
[29-Jul-2025 15:21:52 UTC] Found tax code for 8%: 12
[29-Jul-2025 15:21:53 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 71
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 66
                    [Description] => llll
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 27
                                )

                            [UnitPrice] => 66
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => 12
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-29
    [TotalAmt] => 71.28
    [PrivateNote] => Stripe Payment Intent ID: pi_3RqFLXCDiOqgoJOU12GXYOaG
    [PaymentRefNum] => ch_3RqFLXCDiOqgoJOU161Opd3g
    [PaymentMethodRef] => Array
        (
            [value] => 3
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => 12
                )

            [TotalTax] => 5.28
        )

    [DepositToAccountRef] => Array
        (
            [value] => 108
        )

)

[29-Jul-2025 15:21:55 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 199
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-29T08:21:55-07:00
                            [LastUpdatedTime] => 2025-07-29T08:21:55-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-07-29
                    [CurrencyRef] => Array
                        (
                            [value] => AUD
                            [name] => Australian Dollar
                        )

                    [ExchangeRate] => 1
                    [PrivateNote] => Stripe Payment Intent ID: pi_3RqFLXCDiOqgoJOU12GXYOaG
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => llll
                                    [Amount] => 66
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 27
                                                    [name] => llll
                                                )

                                            [UnitPrice] => 66
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 81
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => 12
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 66
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 5.28
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 5.28
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 22
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 8
                                                    [NetAmountTaxable] => 66
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 71
                            [name] => jjj rrrr(testt@testttt.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 59
                            [Line1] => 2500 Garcia Ave
                            [Line2] => Sydney NSW  2050
                        )

                    [GlobalTaxCalculation] => TaxExcluded
                    [TotalAmt] => 71.28
                    [HomeTotalAmt] => 71.28
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [HomeBalance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 3
                            [name] => Credit Card
                        )

                    [PaymentRefNum] => ch_3RqFLXCDiOqgoJOU161Opd3g
                    [DepositToAccountRef] => Array
                        (
                            [value] => 108
                            [name] => Undeposited Funds
                        )

                )

            [time] => 2025-07-29T08:21:54.527-07:00
        )

)

[29-Jul-2025 15:21:55 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 199
[29-Jul-2025 15:21:55 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[30-Jul-2025 09:27:21 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RqWI6CDiOqgoJOU1aIEPqKq)
[30-Jul-2025 09:27:21 UTC] 1
[30-Jul-2025 09:27:21 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 568
[30-Jul-2025 09:27:21 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 572
[30-Jul-2025 09:27:21 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[30-Jul-2025 09:27:21 UTC] Starting sales receipt creation process for event: evt_3RqWI6CDiOqgoJOU1aIEPqKq
[30-Jul-2025 09:27:22 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753867642855
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[30-Jul-2025 09:27:23 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753867643596
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[30-Jul-2025 09:27:23 UTC] Sales receipt creation failed: Failed to find or create customer in QuickBooks
[30-Jul-2025 09:27:23 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:671
Stack trace:
#0 /home/mhossain/public_html/stripe-app/stripe-webhook.php(55): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 671
[30-Jul-2025 09:39:46 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RqWU7CDiOqgoJOU1I6Bf4aF)
[30-Jul-2025 09:39:46 UTC] 1
[30-Jul-2025 09:39:46 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 568
[30-Jul-2025 09:39:46 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 572
[30-Jul-2025 09:39:46 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[30-Jul-2025 09:39:46 UTC] Starting sales receipt creation process for event: evt_3RqWU7CDiOqgoJOU1I6Bf4aF
[30-Jul-2025 09:39:47 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753868387469
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[30-Jul-2025 09:39:48 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753868388186
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[30-Jul-2025 09:39:48 UTC] Sales receipt creation failed: Failed to find or create customer in QuickBooks
[30-Jul-2025 09:39:48 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:671
Stack trace:
#0 /home/mhossain/public_html/stripe-app/stripe-webhook.php(55): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 671
[30-Jul-2025 10:06:14 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RqWtkCDiOqgoJOU13JRHKwA)
[30-Jul-2025 10:06:14 UTC] 1
[30-Jul-2025 10:06:14 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 568
[30-Jul-2025 10:06:14 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 572
[30-Jul-2025 10:06:14 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[30-Jul-2025 10:06:14 UTC] Starting sales receipt creation process for event: evt_3RqWtkCDiOqgoJOU13JRHKwA
[30-Jul-2025 10:06:15 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753869975644
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[30-Jul-2025 10:06:16 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753869976365
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[30-Jul-2025 10:06:16 UTC] Sales receipt creation failed: Failed to find or create customer in QuickBooks
[30-Jul-2025 10:06:16 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:671
Stack trace:
#0 /home/mhossain/public_html/stripe-app/stripe-webhook.php(55): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 671
[30-Jul-2025 10:27:15 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RqXE4CDiOqgoJOU1pyat26g)
[30-Jul-2025 10:27:15 UTC] 1
[30-Jul-2025 10:27:15 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 568
[30-Jul-2025 10:27:15 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 572
[30-Jul-2025 10:27:15 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[30-Jul-2025 10:27:15 UTC] Starting sales receipt creation process for event: evt_3RqXE4CDiOqgoJOU1pyat26g
[30-Jul-2025 10:27:16 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753871236572
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[30-Jul-2025 10:27:17 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753871237294
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[30-Jul-2025 10:27:17 UTC] Sales receipt creation failed: Failed to find or create customer in QuickBooks
[30-Jul-2025 10:27:17 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:671
Stack trace:
#0 /home/mhossain/public_html/stripe-app/stripe-webhook.php(55): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 671
[30-Jul-2025 10:29:33 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RqXGJCDiOqgoJOU1lGgxhZL)
[30-Jul-2025 10:29:33 UTC] 1
[30-Jul-2025 10:29:33 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 568
[30-Jul-2025 10:29:33 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 572
[30-Jul-2025 10:29:33 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[30-Jul-2025 10:29:33 UTC] Starting sales receipt creation process for event: evt_3RqXGJCDiOqgoJOU1lGgxhZL
[30-Jul-2025 10:29:34 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753871374573
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[30-Jul-2025 10:29:35 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753871375290
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[30-Jul-2025 10:29:35 UTC] Sales receipt creation failed: Failed to find or create customer in QuickBooks
[30-Jul-2025 10:29:35 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:671
Stack trace:
#0 /home/mhossain/public_html/stripe-app/stripe-webhook.php(55): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 671
[30-Jul-2025 15:29:36 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RqbwfCDiOqgoJOU1GdTgwkz)
[30-Jul-2025 15:29:36 UTC] 1
[30-Jul-2025 15:29:36 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 568
[30-Jul-2025 15:29:36 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 572
[30-Jul-2025 15:29:36 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[30-Jul-2025 15:29:36 UTC] Starting sales receipt creation process for event: evt_3RqbwfCDiOqgoJOU1GdTgwkz
[30-Jul-2025 15:29:38 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753889378405
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[30-Jul-2025 15:29:39 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753889379120
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[30-Jul-2025 15:29:39 UTC] Sales receipt creation failed: Failed to find or create customer in QuickBooks
[30-Jul-2025 15:29:39 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:671
Stack trace:
#0 /home/mhossain/public_html/stripe-app/stripe-webhook.php(55): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 671
[30-Jul-2025 15:34:22 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rqc1GCDiOqgoJOU0WVsn1zX)
[30-Jul-2025 15:34:22 UTC] 1
[30-Jul-2025 15:34:22 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 568
[30-Jul-2025 15:34:22 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 572
[30-Jul-2025 15:34:22 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[30-Jul-2025 15:34:22 UTC] Starting sales receipt creation process for event: evt_3Rqc1GCDiOqgoJOU0WVsn1zX
[30-Jul-2025 15:34:22 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753889662785
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[30-Jul-2025 15:34:23 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753889663508
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[30-Jul-2025 15:34:23 UTC] Sales receipt creation failed: Failed to find or create customer in QuickBooks
[30-Jul-2025 15:34:23 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:671
Stack trace:
#0 /home/mhossain/public_html/stripe-app/stripe-webhook.php(55): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 671
[30-Jul-2025 15:40:23 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rqc76CDiOqgoJOU0aYgeuke)
[30-Jul-2025 15:40:23 UTC] 1
[30-Jul-2025 15:40:23 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 568
[30-Jul-2025 15:40:23 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 572
[30-Jul-2025 15:40:23 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[30-Jul-2025 15:40:23 UTC] Starting sales receipt creation process for event: evt_3Rqc76CDiOqgoJOU0aYgeuke
[30-Jul-2025 15:40:24 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753890024068
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[30-Jul-2025 15:40:24 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753890024789
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[30-Jul-2025 15:40:24 UTC] Sales receipt creation failed: Failed to find or create customer in QuickBooks
[30-Jul-2025 15:40:24 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:671
Stack trace:
#0 /home/mhossain/public_html/stripe-app/stripe-webhook.php(55): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 671
[31-Jul-2025 09:27:43 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rqsm0CDiOqgoJOU0zqeWMyN)
[31-Jul-2025 09:27:43 UTC] 1
[31-Jul-2025 09:27:43 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 568
[31-Jul-2025 09:27:43 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 572
[31-Jul-2025 09:27:43 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[31-Jul-2025 09:27:43 UTC] Starting sales receipt creation process for event: evt_3Rqsm0CDiOqgoJOU0zqeWMyN
[31-Jul-2025 09:27:44 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753954064329
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[31-Jul-2025 09:27:45 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753954065045
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[31-Jul-2025 09:27:45 UTC] Sales receipt creation failed: Failed to find or create customer in QuickBooks
[31-Jul-2025 09:27:45 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:671
Stack trace:
#0 /home/mhossain/public_html/stripe-app/stripe-webhook.php(55): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 671
[31-Jul-2025 09:39:45 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RqsxeCDiOqgoJOU1p35mtXN)
[31-Jul-2025 09:39:45 UTC] 1
[31-Jul-2025 09:39:45 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 568
[31-Jul-2025 09:39:45 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 572
[31-Jul-2025 09:39:45 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[31-Jul-2025 09:39:45 UTC] Starting sales receipt creation process for event: evt_3RqsxeCDiOqgoJOU1p35mtXN
[31-Jul-2025 09:39:46 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753954786334
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[31-Jul-2025 09:39:47 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753954787051
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[31-Jul-2025 09:39:47 UTC] Sales receipt creation failed: Failed to find or create customer in QuickBooks
[31-Jul-2025 09:39:47 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:671
Stack trace:
#0 /home/mhossain/public_html/stripe-app/stripe-webhook.php(55): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 671
[31-Jul-2025 10:06:15 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RqtNJCDiOqgoJOU0AbfJghD)
[31-Jul-2025 10:06:15 UTC] 1
[31-Jul-2025 10:06:15 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 568
[31-Jul-2025 10:06:15 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 572
[31-Jul-2025 10:06:15 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[31-Jul-2025 10:06:15 UTC] Starting sales receipt creation process for event: evt_3RqtNJCDiOqgoJOU0AbfJghD
[31-Jul-2025 10:06:16 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753956376871
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[31-Jul-2025 10:06:17 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753956377595
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[31-Jul-2025 10:06:17 UTC] Sales receipt creation failed: Failed to find or create customer in QuickBooks
[31-Jul-2025 10:06:17 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:671
Stack trace:
#0 /home/mhossain/public_html/stripe-app/stripe-webhook.php(55): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 671
[31-Jul-2025 10:27:31 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RqthsCDiOqgoJOU1NOJjSMI)
[31-Jul-2025 10:27:31 UTC] 1
[31-Jul-2025 10:27:31 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 568
[31-Jul-2025 10:27:31 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 572
[31-Jul-2025 10:27:31 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[31-Jul-2025 10:27:31 UTC] Starting sales receipt creation process for event: evt_3RqthsCDiOqgoJOU1NOJjSMI
[31-Jul-2025 10:27:32 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753957652396
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[31-Jul-2025 10:27:33 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753957653111
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[31-Jul-2025 10:27:33 UTC] Sales receipt creation failed: Failed to find or create customer in QuickBooks
[31-Jul-2025 10:27:33 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:671
Stack trace:
#0 /home/mhossain/public_html/stripe-app/stripe-webhook.php(55): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 671
[31-Jul-2025 10:29:48 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rqtk5CDiOqgoJOU0U65pj1D)
[31-Jul-2025 10:29:48 UTC] 1
[31-Jul-2025 10:29:48 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 568
[31-Jul-2025 10:29:48 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 572
[31-Jul-2025 10:29:48 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[31-Jul-2025 10:29:48 UTC] Starting sales receipt creation process for event: evt_3Rqtk5CDiOqgoJOU0U65pj1D
[31-Jul-2025 10:29:49 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753957789182
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[31-Jul-2025 10:29:49 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => Token expired
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1753957789895
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[31-Jul-2025 10:29:49 UTC] Sales receipt creation failed: Failed to find or create customer in QuickBooks
[31-Jul-2025 10:29:49 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:671
Stack trace:
#0 /home/mhossain/public_html/stripe-app/stripe-webhook.php(55): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 671
[31-Jul-2025 13:58:03 UTC] Stripe Webhook Received: invoice.finalized (ID: evt_1RqwzfCDiOqgoJOU8YMBtD3k)
[31-Jul-2025 13:58:03 UTC] 1
[31-Jul-2025 13:58:03 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[31-Jul-2025 13:58:03 UTC] Starting invoice creation process for event: evt_1RqwzfCDiOqgoJOU8YMBtD3k
[31-Jul-2025 13:58:03 UTC] Fetching Stripe invoice: in_1RquvFCDiOqgoJOU9mT36ezq
[31-Jul-2025 13:58:04 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RquvFCDiOqgoJOU9mT36ezq
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 187704
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 187704
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 1
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 1
            [liability] => Array
                (
                    [type] => self
                )

            [provider] => stripe
            [status] => complete
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1753962321
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SmTttBPIDMIrXP
    [customer_address] => Array
        (
            [city] => testt
            [country] => US
            [line1] => test
            [line2] => test
            [postal_code] => 35013
            [state] => AL
        )

    [customer_email] => lkjljl@ljljl.com
    [customer_name] => klklk klkl
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1756562281
    [effective_at] => 1753970281
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TbVR0amNRemtySXdtbGpBcVBZZkc4OWYwVGhkRWVILDE0NDUxMTA4Mw0200qIIPHn0j?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TbVR0amNRemtySXdtbGpBcVBZZkc4OWYwVGhkRWVILDE0NDUxMTA4Mw0200qIIPHn0j/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RquxJCDiOqgoJOU2su7AcVJ
                            [object] => line_item
                            [amount] => 74800
                            [amount_excluding_tax] => 74800
                            [currency] => usd
                            [description] => losttt
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RquvFCDiOqgoJOU9mT36ezq
                            [invoice_item] => ii_1RquxJCDiOqgoJOUmSg7sHO5
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1RquxJCDiOqgoJOUmSg7sHO5
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1753962449
                                    [start] => 1753962449
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RmWkSCDiOqgoJOUw6sHdaOT
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1752916084
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SgnORpg4HJjM59
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 4400
                                    [unit_amount_decimal] => 4400
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RmWkSCDiOqgoJOUw6sHdaOT
                                            [product] => prod_SgnORpg4HJjM59
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 4400
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 17
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 5984
                                            [inclusive] => 
                                            [tax_rate] => txr_1RmbmQCDiOqgoJOUVl6boLeV
                                            [taxability_reason] => standard_rated
                                            [taxable_amount] => 74800
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 5984
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1RmbmQCDiOqgoJOUVl6boLeV
                                                )

                                            [taxability_reason] => standard_rated
                                            [taxable_amount] => 74800
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 4400
                        )

                    [1] => Array
                        (
                            [id] => il_1Rqux4CDiOqgoJOUs9Jz9Xib
                            [object] => line_item
                            [amount] => 99000
                            [amount_excluding_tax] => 99000
                            [currency] => usd
                            [description] => llll
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RquvFCDiOqgoJOU9mT36ezq
                            [invoice_item] => ii_1Rqux4CDiOqgoJOUf3tXTUdm
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rqux4CDiOqgoJOUf3tXTUdm
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1753962434
                                    [start] => 1753962434
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RlPu2CDiOqgoJOUqYL6qJsw
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1752651442
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SgnUhRleVQlEod
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 6600
                                    [unit_amount_decimal] => 6600
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RlPu2CDiOqgoJOUqYL6qJsw
                                            [product] => prod_SgnUhRleVQlEod
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 6600
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 15
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 7920
                                            [inclusive] => 
                                            [tax_rate] => txr_1RmbmQCDiOqgoJOUVl6boLeV
                                            [taxability_reason] => standard_rated
                                            [taxable_amount] => 99000
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 7920
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1RmbmQCDiOqgoJOUVl6boLeV
                                                )

                                            [taxability_reason] => standard_rated
                                            [taxable_amount] => 99000
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 6600
                        )

                )

            [has_more] => 
            [total_count] => 2
            [url] => /v1/invoices/in_1RquvFCDiOqgoJOU9mT36ezq/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => FZIA5FWO-0001
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RqwzeCDiOqgoJOU0i3lF0xz
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1753962321
    [period_start] => 1753962321
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => open
    [status_transitions] => Array
        (
            [finalized_at] => 1753970281
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 173800
    [subtotal_excluding_tax] => 173800
    [tax] => 13904
    [test_clock] => 
    [total] => 187704
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 173800
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 13904
                    [inclusive] => 
                    [tax_rate] => txr_1RmbmQCDiOqgoJOUVl6boLeV
                    [taxability_reason] => standard_rated
                    [taxable_amount] => 173800
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 13904
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1RmbmQCDiOqgoJOUVl6boLeV
                        )

                    [taxability_reason] => standard_rated
                    [taxable_amount] => 173800
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1753962321
)

[31-Jul-2025 13:58:07 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                )

            [time] => 2025-07-31T06:58:07.611-07:00
        )

)

[31-Jul-2025 13:58:09 UTC] Using QBO customer ID: 65
[31-Jul-2025 13:58:13 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 65
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 748
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 25
                                )

                            [UnitPrice] => 44
                            [Qty] => 17
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

            [1] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 990
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 21
                                )

                            [UnitPrice] => 66
                            [Qty] => 15
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-31
    [DueDate] => 2025-08-30
    [TotalAmt] => 1877.04
    [PrivateNote] => Stripe Invoice ID: in_1RquvFCDiOqgoJOU9mT36ezq
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 139.04
        )

)

[31-Jul-2025 13:58:14 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 158
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-31T06:58:14-07:00
                            [LastModifiedByRef] => Array
                                (
                                    [value] => 9341455082530719
                                )

                            [LastUpdatedTime] => 2025-07-31T06:58:14-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [DocNumber] => 1050
                    [TxnDate] => 2025-07-31
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Invoice ID: in_1RquvFCDiOqgoJOU9mT36ezq
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 748
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 25
                                                    [name] => losttt
                                                )

                                            [UnitPrice] => 44
                                            [Qty] => 17
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Id] => 2
                                    [LineNum] => 2
                                    [Amount] => 990
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 21
                                                    [name] => llll
                                                )

                                            [UnitPrice] => 66
                                            [Qty] => 15
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [2] => Array
                                (
                                    [Amount] => 1738
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 0
                        )

                    [CustomerRef] => Array
                        (
                            [value] => 65
                            [name] => klklk klkl(lkjljl@ljljl.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 108
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [DueDate] => 2025-08-30
                    [TotalAmt] => 1738
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 1738
                )

            [time] => 2025-07-31T06:58:14.017-07:00
        )

)

[31-Jul-2025 13:58:14 UTC] Invoice created successfully in QBO. Invoice ID: 158
[31-Jul-2025 13:58:14 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[31-Jul-2025 14:00:21 UTC] Stripe Webhook Received: invoice.finalized (ID: evt_1RqwzfCDiOqgoJOU8YMBtD3k)
[31-Jul-2025 14:00:21 UTC] 1
[31-Jul-2025 14:00:21 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[31-Jul-2025 14:00:21 UTC] Starting invoice creation process for event: evt_1RqwzfCDiOqgoJOU8YMBtD3k
[31-Jul-2025 14:00:21 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[31-Jul-2025 14:00:21 UTC] Invoice already processed. QBO Invoice ID: 158
[31-Jul-2025 14:01:53 UTC] Stripe Webhook Received: invoice.finalized (ID: evt_1RqwzfCDiOqgoJOU8YMBtD3k)
[31-Jul-2025 14:01:53 UTC] 1
[31-Jul-2025 14:01:53 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[31-Jul-2025 14:01:53 UTC] Starting invoice creation process for event: evt_1RqwzfCDiOqgoJOU8YMBtD3k
[31-Jul-2025 14:01:53 UTC] Fetching Stripe invoice: in_1RquvFCDiOqgoJOU9mT36ezq
[31-Jul-2025 14:01:53 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RquvFCDiOqgoJOU9mT36ezq
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 187704
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 187704
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 1
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 1
            [liability] => Array
                (
                    [type] => self
                )

            [provider] => stripe
            [status] => complete
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1753962321
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SmTttBPIDMIrXP
    [customer_address] => Array
        (
            [city] => testt
            [country] => US
            [line1] => test
            [line2] => test
            [postal_code] => 35013
            [state] => AL
        )

    [customer_email] => lkjljl@ljljl.com
    [customer_name] => klklk klkl
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1756562281
    [effective_at] => 1753970281
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TbVR0amNRemtySXdtbGpBcVBZZkc4OWYwVGhkRWVILDE0NDUxMTMxMw0200O1sRaAeO?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TbVR0amNRemtySXdtbGpBcVBZZkc4OWYwVGhkRWVILDE0NDUxMTMxMw0200O1sRaAeO/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RquxJCDiOqgoJOU2su7AcVJ
                            [object] => line_item
                            [amount] => 74800
                            [amount_excluding_tax] => 74800
                            [currency] => usd
                            [description] => losttt
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RquvFCDiOqgoJOU9mT36ezq
                            [invoice_item] => ii_1RquxJCDiOqgoJOUmSg7sHO5
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1RquxJCDiOqgoJOUmSg7sHO5
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1753962449
                                    [start] => 1753962449
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RmWkSCDiOqgoJOUw6sHdaOT
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1752916084
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SgnORpg4HJjM59
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 4400
                                    [unit_amount_decimal] => 4400
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RmWkSCDiOqgoJOUw6sHdaOT
                                            [product] => prod_SgnORpg4HJjM59
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 4400
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 17
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 5984
                                            [inclusive] => 
                                            [tax_rate] => txr_1RmbmQCDiOqgoJOUVl6boLeV
                                            [taxability_reason] => standard_rated
                                            [taxable_amount] => 74800
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 5984
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1RmbmQCDiOqgoJOUVl6boLeV
                                                )

                                            [taxability_reason] => standard_rated
                                            [taxable_amount] => 74800
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 4400
                        )

                    [1] => Array
                        (
                            [id] => il_1Rqux4CDiOqgoJOUs9Jz9Xib
                            [object] => line_item
                            [amount] => 99000
                            [amount_excluding_tax] => 99000
                            [currency] => usd
                            [description] => llll
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RquvFCDiOqgoJOU9mT36ezq
                            [invoice_item] => ii_1Rqux4CDiOqgoJOUf3tXTUdm
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rqux4CDiOqgoJOUf3tXTUdm
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1753962434
                                    [start] => 1753962434
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RlPu2CDiOqgoJOUqYL6qJsw
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1752651442
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SgnUhRleVQlEod
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 6600
                                    [unit_amount_decimal] => 6600
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RlPu2CDiOqgoJOUqYL6qJsw
                                            [product] => prod_SgnUhRleVQlEod
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 6600
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 15
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 7920
                                            [inclusive] => 
                                            [tax_rate] => txr_1RmbmQCDiOqgoJOUVl6boLeV
                                            [taxability_reason] => standard_rated
                                            [taxable_amount] => 99000
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 7920
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1RmbmQCDiOqgoJOUVl6boLeV
                                                )

                                            [taxability_reason] => standard_rated
                                            [taxable_amount] => 99000
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 6600
                        )

                )

            [has_more] => 
            [total_count] => 2
            [url] => /v1/invoices/in_1RquvFCDiOqgoJOU9mT36ezq/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => FZIA5FWO-0001
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RqwzeCDiOqgoJOU0i3lF0xz
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1753962321
    [period_start] => 1753962321
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => open
    [status_transitions] => Array
        (
            [finalized_at] => 1753970281
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 173800
    [subtotal_excluding_tax] => 173800
    [tax] => 13904
    [test_clock] => 
    [total] => 187704
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 173800
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 13904
                    [inclusive] => 
                    [tax_rate] => txr_1RmbmQCDiOqgoJOUVl6boLeV
                    [taxability_reason] => standard_rated
                    [taxable_amount] => 173800
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 13904
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1RmbmQCDiOqgoJOUVl6boLeV
                        )

                    [taxability_reason] => standard_rated
                    [taxable_amount] => 173800
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1753962321
)

[31-Jul-2025 14:01:55 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 1738
                                    [BalanceWithJobs] => 1738
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 65
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-31T06:58:09-07:00
                                            [LastUpdatedTime] => 2025-07-31T06:58:15-07:00
                                        )

                                    [GivenName] => klklk klkl
                                    [FamilyName] => klklk klkl
                                    [FullyQualifiedName] => klklk klkl(lkjljl@ljljl.com)
                                    [DisplayName] => klklk klkl(lkjljl@ljljl.com)
                                    [PrintOnCheckName] => klklk klkl klklk klkl
                                    [Active] => 1
                                    [V4IDPseudonym] => 00209830e7adb735ce4a7798bbae5fe93f06ae
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => lkjljl@ljljl.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-31T07:01:55.677-07:00
        )

)

[31-Jul-2025 14:01:55 UTC] Using QBO customer ID: 65
[31-Jul-2025 14:01:57 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 65
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 748
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 25
                                )

                            [UnitPrice] => 44
                            [Qty] => 17
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

            [1] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 990
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 21
                                )

                            [UnitPrice] => 66
                            [Qty] => 15
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-31
    [DueDate] => 2025-08-30
    [TotalAmt] => 1877.04
    [PrivateNote] => Stripe Invoice ID: in_1RquvFCDiOqgoJOU9mT36ezq
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 139.04
        )

)

[31-Jul-2025 14:01:58 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 159
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-31T07:01:59-07:00
                            [LastModifiedByRef] => Array
                                (
                                    [value] => 9341455082530719
                                )

                            [LastUpdatedTime] => 2025-07-31T07:01:59-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [DocNumber] => 1051
                    [TxnDate] => 2025-07-31
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Invoice ID: in_1RquvFCDiOqgoJOU9mT36ezq
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 748
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 25
                                                    [name] => losttt
                                                )

                                            [UnitPrice] => 44
                                            [Qty] => 17
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Id] => 2
                                    [LineNum] => 2
                                    [Amount] => 990
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 21
                                                    [name] => llll
                                                )

                                            [UnitPrice] => 66
                                            [Qty] => 15
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [2] => Array
                                (
                                    [Amount] => 1738
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 0
                        )

                    [CustomerRef] => Array
                        (
                            [value] => 65
                            [name] => klklk klkl(lkjljl@ljljl.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 109
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [DueDate] => 2025-08-30
                    [TotalAmt] => 1738
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 1738
                )

            [time] => 2025-07-31T07:01:58.346-07:00
        )

)

[31-Jul-2025 14:01:58 UTC] Invoice created successfully in QBO. Invoice ID: 159
[31-Jul-2025 14:01:58 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[31-Jul-2025 14:04:04 UTC] Stripe Webhook Received: invoice.finalized (ID: evt_1Rqx5UCDiOqgoJOU692WIgJs)
[31-Jul-2025 14:04:04 UTC] 1
[31-Jul-2025 14:04:04 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[31-Jul-2025 14:04:04 UTC] Starting invoice creation process for event: evt_1Rqx5UCDiOqgoJOU692WIgJs
[31-Jul-2025 14:04:04 UTC] Fetching Stripe invoice: in_1Rqx4SCDiOqgoJOUp3ncDfD0
[31-Jul-2025 14:04:05 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rqx4SCDiOqgoJOUp3ncDfD0
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 59400
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 59400
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 1
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1753970580
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_Slm8NRlbsGiXDU
    [customer_address] => Array
        (
            [city] => Alabama
            [country] => US
            [line1] => Alabama
            [line2] => Alabama
            [postal_code] => 35013
            [state] => AL
        )

    [customer_email] => dadad@fdfsdfs.fsdf
    [customer_name] => hh hhh
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1756562643
    [effective_at] => 1753970643
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TbVc2UUlaOHZyTjNVMkxPbDFxUFM5Y1JVM2hEbWFLLDE0NDUxMTQ0NQ0200Jknxd6sc?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TbVc2UUlaOHZyTjNVMkxPbDFxUFM5Y1JVM2hEbWFLLDE0NDUxMTQ0NQ0200Jknxd6sc/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rqx4yCDiOqgoJOU0Qtry8u9
                            [object] => line_item
                            [amount] => 59400
                            [amount_excluding_tax] => 59400
                            [currency] => usd
                            [description] => llll
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rqx4SCDiOqgoJOUp3ncDfD0
                            [invoice_item] => ii_1Rqx4yCDiOqgoJOUT7HxTJtM
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rqx4yCDiOqgoJOUT7HxTJtM
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1753970612
                                    [start] => 1753970612
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RlPu2CDiOqgoJOUqYL6qJsw
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1752651442
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SgnUhRleVQlEod
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 6600
                                    [unit_amount_decimal] => 6600
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RlPu2CDiOqgoJOUqYL6qJsw
                                            [product] => prod_SgnUhRleVQlEod
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 6600
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 9
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 6600
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rqx4SCDiOqgoJOUp3ncDfD0/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => 8V92UGAM-0003
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3Rqx5TCDiOqgoJOU1553YjJi
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1753972386
    [period_start] => 1753885986
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => open
    [status_transitions] => Array
        (
            [finalized_at] => 1753970643
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 59400
    [subtotal_excluding_tax] => 59400
    [tax] => 
    [test_clock] => 
    [total] => 59400
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 59400
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
        )

    [total_taxes] => Array
        (
        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1753970580
)

[31-Jul-2025 14:04:07 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 62
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-29T07:33:12-07:00
                                            [LastUpdatedTime] => 2025-07-29T07:33:12-07:00
                                        )

                                    [GivenName] => hh hhh
                                    [FamilyName] => hh hhh
                                    [FullyQualifiedName] => hh hhh(dadad@fdfsdfs.fsdf)
                                    [DisplayName] => hh hhh(dadad@fdfsdfs.fsdf)
                                    [PrintOnCheckName] => hh hhh hh hhh
                                    [Active] => 1
                                    [V4IDPseudonym] => 00209883b0127876894269bf0ed34d28639511
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => dadad@fdfsdfs.fsdf
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-31T07:04:07.349-07:00
        )

)

[31-Jul-2025 14:04:07 UTC] Using QBO customer ID: 62
[31-Jul-2025 14:04:08 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 62
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 594
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 21
                                )

                            [UnitPrice] => 66
                            [Qty] => 9
                            [TaxCodeRef] => Array
                                (
                                    [value] => NON
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-31
    [DueDate] => 2025-08-30
    [TotalAmt] => 594
    [PrivateNote] => Stripe Invoice ID: in_1Rqx4SCDiOqgoJOUp3ncDfD0
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
)

[31-Jul-2025 14:04:09 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 160
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-31T07:04:09-07:00
                            [LastModifiedByRef] => Array
                                (
                                    [value] => 9341455082530719
                                )

                            [LastUpdatedTime] => 2025-07-31T07:04:09-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [DocNumber] => 1052
                    [TxnDate] => 2025-07-31
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Invoice ID: in_1Rqx4SCDiOqgoJOUp3ncDfD0
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 594
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 21
                                                    [name] => llll
                                                )

                                            [UnitPrice] => 66
                                            [Qty] => 9
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => NON
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 594
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 0
                        )

                    [CustomerRef] => Array
                        (
                            [value] => 62
                            [name] => hh hhh(dadad@fdfsdfs.fsdf)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 110
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [DueDate] => 2025-08-30
                    [TotalAmt] => 594
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 594
                )

            [time] => 2025-07-31T07:04:09.073-07:00
        )

)

[31-Jul-2025 14:04:09 UTC] Invoice created successfully in QBO. Invoice ID: 160
[31-Jul-2025 14:04:09 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[31-Jul-2025 14:08:08 UTC] Stripe Webhook Received: invoice.finalized (ID: evt_1Rqx9PCDiOqgoJOUypvVnv9l)
[31-Jul-2025 14:08:08 UTC] 1
[31-Jul-2025 14:08:08 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[31-Jul-2025 14:08:08 UTC] Starting invoice creation process for event: evt_1Rqx9PCDiOqgoJOUypvVnv9l
[31-Jul-2025 14:08:08 UTC] Fetching Stripe invoice: in_1Rqx8qCDiOqgoJOUzQ63UPdS
[31-Jul-2025 14:08:08 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rqx8qCDiOqgoJOUzQ63UPdS
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 216000
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 216000
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 1
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1753970852
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_Slm8NRlbsGiXDU
    [customer_address] => Array
        (
            [city] => Alabama
            [country] => US
            [line1] => Alabama
            [line2] => Alabama
            [postal_code] => 35013
            [state] => AL
        )

    [customer_email] => dadad@fdfsdfs.fsdf
    [customer_name] => hh hhh
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1756562886
    [effective_at] => 1753970886
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TbVdCVjhLVExlT05RN1J3Um1PUjFFTm9VUDVTZTlOLDE0NDUxMTY4OA0200tMHrPJYg?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TbVdCVjhLVExlT05RN1J3Um1PUjFFTm9VUDVTZTlOLDE0NDUxMTY4OA0200tMHrPJYg/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rqx93CDiOqgoJOUnqaHRaa2
                            [object] => line_item
                            [amount] => 216000
                            [amount_excluding_tax] => 216000
                            [currency] => usd
                            [description] => hhhhh
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rqx8qCDiOqgoJOUzQ63UPdS
                            [invoice_item] => ii_1Rqx93CDiOqgoJOUGa79WjC6
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rqx93CDiOqgoJOUGa79WjC6
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1753970865
                                    [start] => 1753970865
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RnIoxCDiOqgoJOUZAybF2nz
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1753100875
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SgnRUcSHsgRwfE
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 2400
                                    [unit_amount_decimal] => 2400
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RnIoxCDiOqgoJOUZAybF2nz
                                            [product] => prod_SgnRUcSHsgRwfE
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 2400
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 90
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 2400
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rqx8qCDiOqgoJOUzQ63UPdS/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => 8V92UGAM-0004
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3Rqx9OCDiOqgoJOU0oXf5pHx
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1753972386
    [period_start] => 1753885986
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => open
    [status_transitions] => Array
        (
            [finalized_at] => 1753970886
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 216000
    [subtotal_excluding_tax] => 216000
    [tax] => 
    [test_clock] => 
    [total] => 216000
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 216000
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
        )

    [total_taxes] => Array
        (
        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1753970852
)

[31-Jul-2025 14:08:11 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 594
                                    [BalanceWithJobs] => 594
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 62
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-29T07:33:12-07:00
                                            [LastUpdatedTime] => 2025-07-31T07:04:09-07:00
                                        )

                                    [GivenName] => hh hhh
                                    [FamilyName] => hh hhh
                                    [FullyQualifiedName] => hh hhh(dadad@fdfsdfs.fsdf)
                                    [DisplayName] => hh hhh(dadad@fdfsdfs.fsdf)
                                    [PrintOnCheckName] => hh hhh hh hhh
                                    [Active] => 1
                                    [V4IDPseudonym] => 00209883b0127876894269bf0ed34d28639511
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => dadad@fdfsdfs.fsdf
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-31T07:08:11.237-07:00
        )

)

[31-Jul-2025 14:08:11 UTC] Using QBO customer ID: 62
[31-Jul-2025 14:08:14 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 62
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 2160
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 26
                                )

                            [UnitPrice] => 24
                            [Qty] => 90
                            [TaxCodeRef] => Array
                                (
                                    [value] => NON
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-31
    [DueDate] => 2025-08-30
    [TotalAmt] => 2160
    [PrivateNote] => Stripe Invoice ID: in_1Rqx8qCDiOqgoJOUzQ63UPdS
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
)

[31-Jul-2025 14:08:16 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 161
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-31T07:08:16-07:00
                            [LastModifiedByRef] => Array
                                (
                                    [value] => 9341455082530719
                                )

                            [LastUpdatedTime] => 2025-07-31T07:08:16-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [DocNumber] => 1053
                    [TxnDate] => 2025-07-31
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Invoice ID: in_1Rqx8qCDiOqgoJOUzQ63UPdS
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 2160
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 26
                                                    [name] => hhhhh
                                                )

                                            [UnitPrice] => 24
                                            [Qty] => 90
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => NON
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 2160
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 0
                        )

                    [CustomerRef] => Array
                        (
                            [value] => 62
                            [name] => hh hhh(dadad@fdfsdfs.fsdf)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 111
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [DueDate] => 2025-08-30
                    [TotalAmt] => 2160
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 2160
                )

            [time] => 2025-07-31T07:08:15.344-07:00
        )

)

[31-Jul-2025 14:08:16 UTC] Invoice created successfully in QBO. Invoice ID: 161
[31-Jul-2025 14:08:16 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[31-Jul-2025 14:08:44 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1Rqx9zCDiOqgoJOUdvAzGUGM)
[31-Jul-2025 14:08:44 UTC] 1
[31-Jul-2025 14:08:44 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[31-Jul-2025 14:08:44 UTC] Starting payment process for Stripe invoice: evt_1Rqx9zCDiOqgoJOUdvAzGUGM
[31-Jul-2025 14:08:44 UTC] Fetching Stripe invoice: in_1Rqx8qCDiOqgoJOUzQ63UPdS
[31-Jul-2025 14:08:44 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1Rqx8qCDiOqgoJOUzQ63UPdS
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 216000
    [amount_overpaid] => 0
    [amount_paid] => 216000
    [amount_remaining] => 0
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 1
    [attempted] => 1
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => ch_3Rqx9OCDiOqgoJOU09mjVP6G
    [collection_method] => send_invoice
    [created] => 1753970852
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_Slm8NRlbsGiXDU
    [customer_address] => Array
        (
            [city] => Alabama
            [country] => US
            [line1] => Alabama
            [line2] => Alabama
            [postal_code] => 35013
            [state] => AL
        )

    [customer_email] => dadad@fdfsdfs.fsdf
    [customer_name] => hh hhh
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1756562886
    [effective_at] => 1753970886
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TbVdCVjhLVExlT05RN1J3Um1PUjFFTm9VUDVTZTlOLDE0NDUxMTcyNA0200qRm6X1bv?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TbVdCVjhLVExlT05RN1J3Um1PUjFFTm9VUDVTZTlOLDE0NDUxMTcyNA0200qRm6X1bv/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1Rqx93CDiOqgoJOUnqaHRaa2
                            [object] => line_item
                            [amount] => 216000
                            [amount_excluding_tax] => 216000
                            [currency] => usd
                            [description] => hhhhh
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1Rqx8qCDiOqgoJOUzQ63UPdS
                            [invoice_item] => ii_1Rqx93CDiOqgoJOUGa79WjC6
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1Rqx93CDiOqgoJOUGa79WjC6
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1753970865
                                    [start] => 1753970865
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RnIoxCDiOqgoJOUZAybF2nz
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1753100875
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SgnRUcSHsgRwfE
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 2400
                                    [unit_amount_decimal] => 2400
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RnIoxCDiOqgoJOUZAybF2nz
                                            [product] => prod_SgnRUcSHsgRwfE
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 2400
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 90
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 2400
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1Rqx8qCDiOqgoJOUzQ63UPdS/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => 8V92UGAM-0004
    [on_behalf_of] => 
    [paid] => 1
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3Rqx9OCDiOqgoJOU0oXf5pHx
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1753972386
    [period_start] => 1753885986
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => paid
    [status_transitions] => Array
        (
            [finalized_at] => 1753970886
            [marked_uncollectible_at] => 
            [paid_at] => 1753970921
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 216000
    [subtotal_excluding_tax] => 216000
    [tax] => 
    [test_clock] => 
    [total] => 216000
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 216000
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
        )

    [total_taxes] => Array
        (
        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1753970852
)

[31-Jul-2025 14:08:47 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 2754
                                    [BalanceWithJobs] => 2754
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 62
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-29T07:33:12-07:00
                                            [LastUpdatedTime] => 2025-07-31T07:08:16-07:00
                                        )

                                    [GivenName] => hh hhh
                                    [FamilyName] => hh hhh
                                    [FullyQualifiedName] => hh hhh(dadad@fdfsdfs.fsdf)
                                    [DisplayName] => hh hhh(dadad@fdfsdfs.fsdf)
                                    [PrintOnCheckName] => hh hhh hh hhh
                                    [Active] => 1
                                    [V4IDPseudonym] => 00209883b0127876894269bf0ed34d28639511
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => dadad@fdfsdfs.fsdf
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-31T07:08:46.905-07:00
        )

)

[31-Jul-2025 14:08:47 UTC] Using QBO customer ID: 62
[31-Jul-2025 14:08:47 UTC] Found existing QBO invoice ID: 161
[31-Jul-2025 14:08:49 UTC] Failed to create payment method: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Invalid Enumeration
                                    [Detail] => Invalid Enumeration : OTHER
                                    [code] => 2170
                                    [element] => Type
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-07-31T07:08:49.596-07:00
        )

)

[31-Jul-2025 14:08:50 UTC] Creating QBO payment with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 62
        )

    [TotalAmt] => 2160
    [TxnDate] => 2025-07-31
    [PaymentRefNum] => pi_3Rqx9OCDiOqgoJOU0o
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

    [PrivateNote] => Stripe Invoice ID: in_1Rqx8qCDiOqgoJOUzQ63UPdS
    [Line] => Array
        (
            [0] => Array
                (
                    [Amount] => 2160
                    [LinkedTxn] => Array
                        (
                            [0] => Array
                                (
                                    [TxnId] => 161
                                    [TxnType] => Invoice
                                )

                        )

                )

        )

)

[31-Jul-2025 14:08:51 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Payment] => Array
                (
                    [CustomerRef] => Array
                        (
                            [value] => 62
                            [name] => hh hhh(dadad@fdfsdfs.fsdf)
                        )

                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                        )

                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                        )

                    [PaymentRefNum] => pi_3Rqx9OCDiOqgoJOU0o
                    [TotalAmt] => 2160
                    [UnappliedAmt] => 0
                    [ProcessPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 162
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-31T07:08:51-07:00
                            [LastUpdatedTime] => 2025-07-31T07:08:51-07:00
                        )

                    [TxnDate] => 2025-07-31
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Invoice ID: in_1Rqx8qCDiOqgoJOUzQ63UPdS
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Amount] => 2160
                                    [LinkedTxn] => Array
                                        (
                                            [0] => Array
                                                (
                                                    [TxnId] => 161
                                                    [TxnType] => Invoice
                                                )

                                        )

                                    [LineEx] => Array
                                        (
                                            [any] => Array
                                                (
                                                    [0] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnId
                                                                    [Value] => 161
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                    [1] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnOpenBalance
                                                                    [Value] => 2160.00
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                    [2] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnReferenceNumber
                                                                    [Value] => 1053
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                )

                                        )

                                )

                        )

                )

            [time] => 2025-07-31T07:08:51.381-07:00
        )

)

[31-Jul-2025 14:08:51 UTC] Payment created successfully in QBO. Payment ID: 162
[31-Jul-2025 14:08:51 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[31-Jul-2025 14:12:16 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RqxDOCDiOqgoJOU1Byz5ujC)
[31-Jul-2025 14:12:16 UTC] 1
[31-Jul-2025 14:12:16 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 568
[31-Jul-2025 14:12:16 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 572
[31-Jul-2025 14:12:16 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[31-Jul-2025 14:12:16 UTC] Starting sales receipt creation process for event: evt_3RqxDOCDiOqgoJOU1Byz5ujC
[31-Jul-2025 14:12:17 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                )

            [time] => 2025-07-31T07:12:17.780-07:00
        )

)

[31-Jul-2025 14:12:18 UTC] Using QBO customer ID: 66
[31-Jul-2025 14:12:19 UTC] Found checkout session: cs_test_a1RQslqEuLe0gCBxxzfbpmj1BSkMVGANFBqboIxay48w0oAYfczoUvilZe
[31-Jul-2025 14:12:19 UTC] Session tax amount: $0
[31-Jul-2025 14:12:19 UTC] Session subtotal: $66
[31-Jul-2025 14:12:19 UTC] Found checkout session line items: 1
[31-Jul-2025 14:12:19 UTC] Line item: llll, Subtotal: 66, Tax: 0, Total: 66
[31-Jul-2025 14:12:21 UTC] Total line items amount: 66, Total tax: 0
[31-Jul-2025 14:12:23 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 66
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 66
                    [Description] => llll
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 21
                                )

                            [UnitPrice] => 66
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => NON
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-31
    [TotalAmt] => 66
    [PrivateNote] => Stripe Payment Intent ID: pi_3RqxDOCDiOqgoJOU157voq52
    [PaymentRefNum] => ch_3RqxDOCDiOqgoJOU1wCd1woa
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[31-Jul-2025 14:12:24 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 163
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-31T07:12:24-07:00
                            [LastUpdatedTime] => 2025-07-31T07:12:24-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [DocNumber] => 1054
                    [TxnDate] => 2025-07-31
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3RqxDOCDiOqgoJOU157voq52
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => llll
                                    [Amount] => 66
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 21
                                                    [name] => llll
                                                )

                                            [UnitPrice] => 66
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => NON
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 66
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 0
                        )

                    [CustomerRef] => Array
                        (
                            [value] => 66
                            [name] => mmm nnn(bmrafggggiul.alam@gmail.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 112
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 66
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3RqxDOCDiOqgoJOU1wCd1woa
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                )

            [time] => 2025-07-31T07:12:23.846-07:00
        )

)

[31-Jul-2025 14:12:24 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 163
[31-Jul-2025 14:12:24 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[31-Jul-2025 14:14:02 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RqxF6CDiOqgoJOU0dhcVaLw)
[31-Jul-2025 14:14:02 UTC] 1
[31-Jul-2025 14:14:02 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 568
[31-Jul-2025 14:14:02 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 572
[31-Jul-2025 14:14:02 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[31-Jul-2025 14:14:02 UTC] Starting sales receipt creation process for event: evt_3RqxF6CDiOqgoJOU0dhcVaLw
[31-Jul-2025 14:14:03 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                )

            [time] => 2025-07-31T07:14:03.149-07:00
        )

)

[31-Jul-2025 14:14:04 UTC] Using QBO customer ID: 67
[31-Jul-2025 14:14:04 UTC] Found checkout session: cs_test_a1qlGq2FC7K11zfDDUqOsKm816rh24Syh4UPBVLmYqLWIvcI3knOi3tq6M
[31-Jul-2025 14:14:04 UTC] Session tax amount: $5.28
[31-Jul-2025 14:14:04 UTC] Session subtotal: $66
[31-Jul-2025 14:14:04 UTC] Calculated tax percentage from session: 8%
[31-Jul-2025 14:14:04 UTC] Found checkout session line items: 1
[31-Jul-2025 14:14:04 UTC] Line item: llll, Subtotal: 66, Tax: 5.28, Total: 71.28
[31-Jul-2025 14:14:06 UTC] Total line items amount: 66, Total tax: 5.28
[31-Jul-2025 14:14:09 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 67
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 66
                    [Description] => llll
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 21
                                )

                            [UnitPrice] => 66
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-31
    [TotalAmt] => 71.28
    [PrivateNote] => Stripe Payment Intent ID: pi_3RqxF6CDiOqgoJOU0lbhMmkw
    [PaymentRefNum] => ch_3RqxF6CDiOqgoJOU0AXk2iDy
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 5.28
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[31-Jul-2025 14:14:10 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 164
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-31T07:14:10-07:00
                            [LastUpdatedTime] => 2025-07-31T07:14:10-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [DocNumber] => 1055
                    [TxnDate] => 2025-07-31
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3RqxF6CDiOqgoJOU0lbhMmkw
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => llll
                                    [Amount] => 66
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 21
                                                    [name] => llll
                                                )

                                            [UnitPrice] => 66
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 66
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 0
                        )

                    [CustomerRef] => Array
                        (
                            [value] => 67
                            [name] => cccc dcccc(bmrafiul.alhjjjam@gmail.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 113
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 66
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3RqxF6CDiOqgoJOU0AXk2iDy
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                )

            [time] => 2025-07-31T07:14:09.819-07:00
        )

)

[31-Jul-2025 14:14:10 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 164
[31-Jul-2025 14:14:10 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[31-Jul-2025 14:33:20 UTC] Stripe Webhook Received: invoice.finalized (ID: evt_1RqxXnCDiOqgoJOUx1r1a33L)
[31-Jul-2025 14:33:20 UTC] 1
[31-Jul-2025 14:33:20 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[31-Jul-2025 14:33:20 UTC] Starting invoice creation process for event: evt_1RqxXnCDiOqgoJOUx1r1a33L
[31-Jul-2025 14:33:20 UTC] Fetching Stripe invoice: in_1RqxX2CDiOqgoJOUBeEPXAuM
[31-Jul-2025 14:33:20 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RqxX2CDiOqgoJOUBeEPXAuM
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 7069
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 7069
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 1
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1753972352
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_Slm8NRlbsGiXDU
    [customer_address] => Array
        (
            [city] => Alabama
            [country] => US
            [line1] => Alabama
            [line2] => Alabama
            [postal_code] => 35013
            [state] => AL
        )

    [customer_email] => dadad@fdfsdfs.fsdf
    [customer_name] => hh hhh
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1RqxW2CDiOqgoJOU88yYvehL
                    [object] => tax_rate
                    [active] => 1
                    [country] => IN
                    [created] => 1753972290
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 7.1
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 7.1
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1756564398
    [effective_at] => 1753972398
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TbVdhRGsybnl6MVhHdUNmTHFsTmdRZWViQ0tuN0R2LDE0NDUxMzIwMA020095Yfn1nO?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TbVdhRGsybnl6MVhHdUNmTHFsTmdRZWViQ0tuN0R2LDE0NDUxMzIwMA020095Yfn1nO/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RqxXUCDiOqgoJOULwbIbNub
                            [object] => line_item
                            [amount] => 6600
                            [amount_excluding_tax] => 6600
                            [currency] => usd
                            [description] => llll
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RqxX2CDiOqgoJOUBeEPXAuM
                            [invoice_item] => ii_1RqxXUCDiOqgoJOUg8b6jkio
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1RqxXUCDiOqgoJOUg8b6jkio
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1753972380
                                    [start] => 1753972380
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RlPu2CDiOqgoJOUqYL6qJsw
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1752651442
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SgnUhRleVQlEod
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 6600
                                    [unit_amount_decimal] => 6600
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RlPu2CDiOqgoJOUqYL6qJsw
                                            [product] => prod_SgnUhRleVQlEod
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 6600
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 1
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 469
                                            [inclusive] => 
                                            [tax_rate] => txr_1RqxW2CDiOqgoJOU88yYvehL
                                            [taxability_reason] => 
                                            [taxable_amount] => 6600
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 469
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1RqxW2CDiOqgoJOU88yYvehL
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 6600
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 6600
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1RqxX2CDiOqgoJOUBeEPXAuM/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => 8V92UGAM-0005
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RqxXmCDiOqgoJOU0KgEc0bW
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1753972386
    [period_start] => 1753885986
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => open
    [status_transitions] => Array
        (
            [finalized_at] => 1753972398
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 6600
    [subtotal_excluding_tax] => 6600
    [tax] => 469
    [test_clock] => 
    [total] => 7069
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 6600
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 469
                    [inclusive] => 
                    [tax_rate] => txr_1RqxW2CDiOqgoJOU88yYvehL
                    [taxability_reason] => 
                    [taxable_amount] => 6600
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 469
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1RqxW2CDiOqgoJOU88yYvehL
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 6600
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1753972352
)

[31-Jul-2025 14:33:23 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 594
                                    [BalanceWithJobs] => 594
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 62
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-29T07:33:12-07:00
                                            [LastUpdatedTime] => 2025-07-31T07:08:51-07:00
                                        )

                                    [GivenName] => hh hhh
                                    [FamilyName] => hh hhh
                                    [FullyQualifiedName] => hh hhh(dadad@fdfsdfs.fsdf)
                                    [DisplayName] => hh hhh(dadad@fdfsdfs.fsdf)
                                    [PrintOnCheckName] => hh hhh hh hhh
                                    [Active] => 1
                                    [V4IDPseudonym] => 00209883b0127876894269bf0ed34d28639511
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => dadad@fdfsdfs.fsdf
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-31T07:33:22.977-07:00
        )

)

[31-Jul-2025 14:33:23 UTC] Using QBO customer ID: 62
[31-Jul-2025 14:33:24 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 62
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 66
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 21
                                )

                            [UnitPrice] => 66
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-31
    [DueDate] => 2025-08-30
    [TotalAmt] => 70.69
    [PrivateNote] => Stripe Invoice ID: in_1RqxX2CDiOqgoJOUBeEPXAuM
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 4.69
        )

)

[31-Jul-2025 14:33:25 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 165
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-31T07:33:25-07:00
                            [LastModifiedByRef] => Array
                                (
                                    [value] => 9341455082530719
                                )

                            [LastUpdatedTime] => 2025-07-31T07:33:25-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [DocNumber] => 1056
                    [TxnDate] => 2025-07-31
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Invoice ID: in_1RqxX2CDiOqgoJOUBeEPXAuM
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 66
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 21
                                                    [name] => llll
                                                )

                                            [UnitPrice] => 66
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 66
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 0
                        )

                    [CustomerRef] => Array
                        (
                            [value] => 62
                            [name] => hh hhh(dadad@fdfsdfs.fsdf)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 114
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [DueDate] => 2025-08-30
                    [TotalAmt] => 66
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 66
                )

            [time] => 2025-07-31T07:33:24.824-07:00
        )

)

[31-Jul-2025 14:33:25 UTC] Invoice created successfully in QBO. Invoice ID: 165
[31-Jul-2025 14:33:25 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[31-Jul-2025 14:34:26 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RqxYqCDiOqgoJOU1TbEoK2Y)
[31-Jul-2025 14:34:26 UTC] 1
[31-Jul-2025 14:34:26 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 568
[31-Jul-2025 14:34:26 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 572
[31-Jul-2025 14:34:26 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[31-Jul-2025 14:34:26 UTC] Starting sales receipt creation process for event: evt_3RqxYqCDiOqgoJOU1TbEoK2Y
[31-Jul-2025 14:34:27 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                )

            [time] => 2025-07-31T07:34:27.685-07:00
        )

)

[31-Jul-2025 14:34:28 UTC] Using QBO customer ID: 68
[31-Jul-2025 14:34:29 UTC] Found checkout session: cs_test_a1MrutO7fuqSmFYy6M0DEUsEew6DKXTi5c67oblnAo6fgTQM3hPh4mFqK8
[31-Jul-2025 14:34:29 UTC] Session tax amount: $5.28
[31-Jul-2025 14:34:29 UTC] Session subtotal: $66
[31-Jul-2025 14:34:29 UTC] Calculated tax percentage from session: 8%
[31-Jul-2025 14:34:29 UTC] Found checkout session line items: 1
[31-Jul-2025 14:34:29 UTC] Line item: llll, Subtotal: 66, Tax: 5.28, Total: 71.28
[31-Jul-2025 14:34:31 UTC] Total line items amount: 66, Total tax: 5.28
[31-Jul-2025 14:34:33 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 68
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 66
                    [Description] => llll
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 21
                                )

                            [UnitPrice] => 66
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-31
    [TotalAmt] => 71.28
    [PrivateNote] => Stripe Payment Intent ID: pi_3RqxYqCDiOqgoJOU15oqebSz
    [PaymentRefNum] => ch_3RqxYqCDiOqgoJOU1ZnW1Qmo
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 5.28
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[31-Jul-2025 14:34:35 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 166
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-31T07:34:35-07:00
                            [LastUpdatedTime] => 2025-07-31T07:34:35-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [DocNumber] => 1057
                    [TxnDate] => 2025-07-31
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3RqxYqCDiOqgoJOU15oqebSz
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => llll
                                    [Amount] => 66
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 21
                                                    [name] => llll
                                                )

                                            [UnitPrice] => 66
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 66
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 0
                        )

                    [CustomerRef] => Array
                        (
                            [value] => 68
                            [name] => test(bmrafiul.alam@gmadddl.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 115
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 66
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3RqxYqCDiOqgoJOU1ZnW1Qmo
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                )

            [time] => 2025-07-31T07:34:34.638-07:00
        )

)

[31-Jul-2025 14:34:35 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 166
[31-Jul-2025 14:34:35 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[31-Jul-2025 14:43:48 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RqxF6CDiOqgoJOU0dhcVaLw)
[31-Jul-2025 14:43:48 UTC] 1
[31-Jul-2025 14:43:48 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 568
[31-Jul-2025 14:43:48 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 572
[31-Jul-2025 14:43:48 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[31-Jul-2025 14:43:48 UTC] Starting sales receipt creation process for event: evt_3RqxF6CDiOqgoJOU0dhcVaLw
[31-Jul-2025 14:43:50 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 67
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-31T07:14:04-07:00
                                            [LastUpdatedTime] => 2025-07-31T07:14:04-07:00
                                        )

                                    [GivenName] => cccc dcccc
                                    [FamilyName] => cccc dcccc
                                    [FullyQualifiedName] => cccc dcccc(bmrafiul.alhjjjam@gmail.com)
                                    [DisplayName] => cccc dcccc(bmrafiul.alhjjjam@gmail.com)
                                    [PrintOnCheckName] => cccc dcccc cccc dcccc
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020983044f521d7304e8abdc97ee6fb2ae94d
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => bmrafiul.alhjjjam@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-31T07:43:50.211-07:00
        )

)

[31-Jul-2025 14:43:50 UTC] Using QBO customer ID: 67
[31-Jul-2025 14:43:50 UTC] Found checkout session: cs_test_a1qlGq2FC7K11zfDDUqOsKm816rh24Syh4UPBVLmYqLWIvcI3knOi3tq6M
[31-Jul-2025 14:43:50 UTC] Session tax amount: $5.28
[31-Jul-2025 14:43:50 UTC] Session subtotal: $66
[31-Jul-2025 14:43:50 UTC] Calculated tax percentage from session: 8%
[31-Jul-2025 14:43:50 UTC] Found checkout session line items: 1
[31-Jul-2025 14:43:50 UTC] Line item: llll, Subtotal: 66, Tax: 5.28, Total: 71.28
[31-Jul-2025 14:43:52 UTC] Total line items amount: 66, Total tax: 5.28
[31-Jul-2025 14:43:55 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 67
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 66
                    [Description] => llll
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 21
                                )

                            [UnitPrice] => 66
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-31
    [TotalAmt] => 71.28
    [PrivateNote] => Stripe Payment Intent ID: pi_3RqxF6CDiOqgoJOU0lbhMmkw
    [PaymentRefNum] => ch_3RqxF6CDiOqgoJOU0AXk2iDy
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 5.28
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[31-Jul-2025 14:43:56 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 167
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-31T07:43:56-07:00
                            [LastUpdatedTime] => 2025-07-31T07:43:56-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [DocNumber] => 1058
                    [TxnDate] => 2025-07-31
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3RqxF6CDiOqgoJOU0lbhMmkw
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => llll
                                    [Amount] => 66
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 21
                                                    [name] => llll
                                                )

                                            [UnitPrice] => 66
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 66
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 0
                        )

                    [CustomerRef] => Array
                        (
                            [value] => 67
                            [name] => cccc dcccc(bmrafiul.alhjjjam@gmail.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 116
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 66
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3RqxF6CDiOqgoJOU0AXk2iDy
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                )

            [time] => 2025-07-31T07:43:56.036-07:00
        )

)

[31-Jul-2025 14:43:56 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 167
[31-Jul-2025 14:43:56 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[31-Jul-2025 14:46:47 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RqxF6CDiOqgoJOU0dhcVaLw)
[31-Jul-2025 14:46:47 UTC] 1
[31-Jul-2025 14:46:47 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 568
[31-Jul-2025 14:46:47 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 572
[31-Jul-2025 14:46:47 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[31-Jul-2025 14:46:47 UTC] Starting sales receipt creation process for event: evt_3RqxF6CDiOqgoJOU0dhcVaLw
[31-Jul-2025 14:46:48 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => Print
                                    [IsProject] => 
                                    [ClientEntityId] => 0
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 67
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-07-31T07:14:04-07:00
                                            [LastUpdatedTime] => 2025-07-31T07:14:04-07:00
                                        )

                                    [GivenName] => cccc dcccc
                                    [FamilyName] => cccc dcccc
                                    [FullyQualifiedName] => cccc dcccc(bmrafiul.alhjjjam@gmail.com)
                                    [DisplayName] => cccc dcccc(bmrafiul.alhjjjam@gmail.com)
                                    [PrintOnCheckName] => cccc dcccc cccc dcccc
                                    [Active] => 1
                                    [V4IDPseudonym] => 0020983044f521d7304e8abdc97ee6fb2ae94d
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => bmrafiul.alhjjjam@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-07-31T07:46:48.366-07:00
        )

)

[31-Jul-2025 14:46:48 UTC] Using QBO customer ID: 67
[31-Jul-2025 14:46:48 UTC] Found checkout session: cs_test_a1qlGq2FC7K11zfDDUqOsKm816rh24Syh4UPBVLmYqLWIvcI3knOi3tq6M
[31-Jul-2025 14:46:48 UTC] Session tax amount: $5.28
[31-Jul-2025 14:46:48 UTC] Session subtotal: $66
[31-Jul-2025 14:46:48 UTC] Calculated tax percentage from session: 8%
[31-Jul-2025 14:46:49 UTC] Found checkout session line items: 1
[31-Jul-2025 14:46:49 UTC] Line item: llll, Subtotal: 66, Tax: 5.28, Total: 71.28
[31-Jul-2025 14:46:50 UTC] Total line items amount: 66, Total tax: 5.28
[31-Jul-2025 14:46:53 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 67
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 66
                    [Description] => llll
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 21
                                )

                            [UnitPrice] => 66
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-07-31
    [TotalAmt] => 71.28
    [PrivateNote] => Stripe Payment Intent ID: pi_3RqxF6CDiOqgoJOU0lbhMmkw
    [PaymentRefNum] => ch_3RqxF6CDiOqgoJOU0AXk2iDy
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 5.28
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

)

[31-Jul-2025 14:46:54 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 168
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-07-31T07:46:54-07:00
                            [LastUpdatedTime] => 2025-07-31T07:46:54-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [DocNumber] => 1059
                    [TxnDate] => 2025-07-31
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3RqxF6CDiOqgoJOU0lbhMmkw
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => llll
                                    [Amount] => 66
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 21
                                                    [name] => llll
                                                )

                                            [UnitPrice] => 66
                                            [Qty] => 1
                                            [ItemAccountRef] => Array
                                                (
                                                    [value] => 79
                                                    [name] => Sales of Product Income
                                                )

                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                        )

                                    [CustomExtensions] => Array
                                        (
                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 66
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TotalTax] => 0
                        )

                    [CustomerRef] => Array
                        (
                            [value] => 67
                            [name] => cccc dcccc(bmrafiul.alhjjjam@gmail.com)
                        )

                    [ShipFromAddr] => Array
                        (
                            [Id] => 117
                            [Line1] => 123 Sierra Way
                            [Line2] => San Pablo, CA  87999
                        )

                    [TotalAmt] => 66
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                            [name] => Cash
                        )

                    [PaymentRefNum] => ch_3RqxF6CDiOqgoJOU0AXk2iDy
                    [DepositToAccountRef] => Array
                        (
                            [value] => 4
                            [name] => Undeposited Funds
                        )

                )

            [time] => 2025-07-31T07:46:53.986-07:00
        )

)

[31-Jul-2025 14:46:54 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 168
[31-Jul-2025 14:46:54 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[01-Aug-2025 09:22:45 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1RrFAmCDiOqgoJOUZbKKPi67)
[01-Aug-2025 09:22:45 UTC] 1
[01-Aug-2025 09:22:45 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-new/stripe-app/functions.php on line 376
[01-Aug-2025 09:22:45 UTC] Starting payment process for Stripe invoice: evt_1RrFAmCDiOqgoJOUZbKKPi67
[01-Aug-2025 09:22:45 UTC] Fetching Stripe invoice: in_1RrF37CDiOqgoJOUXH07pK9o
[01-Aug-2025 09:22:45 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RrF37CDiOqgoJOUXH07pK9o
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 7013
    [amount_overpaid] => 0
    [amount_paid] => 7013
    [amount_remaining] => 0
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 1
    [attempted] => 1
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => ch_3RrF6BCDiOqgoJOU0ccaOYG6
    [collection_method] => send_invoice
    [created] => 1754039689
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_Sjo6INOhbQe0LI
    [customer_address] => Array
        (
            [city] => Alabama
            [country] => US
            [line1] => Alabama
            [line2] => Alabama
            [postal_code] => 35015
            [state] => AL
        )

    [customer_email] => nnnn@nnn.com
    [customer_name] => ggg ggg
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1RrF5rCDiOqgoJOU4zhsJvfk
                    [object] => tax_rate
                    [active] => 1
                    [country] => 
                    [created] => 1754039859
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 6.25
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 6.25
                    [rate_type] => percentage
                    [state] => 
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1756631878
    [effective_at] => 1754039878
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TbW9nQ1FldUJIZlh1d3pvcUIyMWM0YWY0VklpSU43LDE0NDU4MDk2NQ0200CUJMt8nc?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TbW9nQ1FldUJIZlh1d3pvcUIyMWM0YWY0VklpSU43LDE0NDU4MDk2NQ0200CUJMt8nc/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RrF5CCDiOqgoJOUSrKVEpjH
                            [object] => line_item
                            [amount] => 6600
                            [amount_excluding_tax] => 6600
                            [currency] => usd
                            [description] => llll
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RrF37CDiOqgoJOUXH07pK9o
                            [invoice_item] => ii_1RrF5CCDiOqgoJOUe1C0hvg9
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1RrF5CCDiOqgoJOUe1C0hvg9
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1754039818
                                    [start] => 1754039818
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RlPu2CDiOqgoJOUqYL6qJsw
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1752651442
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SgnUhRleVQlEod
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 6600
                                    [unit_amount_decimal] => 6600
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RlPu2CDiOqgoJOUqYL6qJsw
                                            [product] => prod_SgnUhRleVQlEod
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 6600
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 1
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 413
                                            [inclusive] => 
                                            [tax_rate] => txr_1RrF5rCDiOqgoJOU4zhsJvfk
                                            [taxability_reason] => 
                                            [taxable_amount] => 6600
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 413
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1RrF5rCDiOqgoJOU4zhsJvfk
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 6600
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 6600
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1RrF37CDiOqgoJOUXH07pK9o/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => HJAMRYO3-0044
    [on_behalf_of] => 
    [paid] => 1
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RrF6BCDiOqgoJOU0kYB3qSB
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1754040377
    [period_start] => 1753953977
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => paid
    [status_transitions] => Array
        (
            [finalized_at] => 1754039878
            [marked_uncollectible_at] => 
            [paid_at] => 1754040162
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 6600
    [subtotal_excluding_tax] => 6600
    [tax] => 413
    [test_clock] => 
    [total] => 7013
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 6600
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 413
                    [inclusive] => 
                    [tax_rate] => txr_1RrF5rCDiOqgoJOU4zhsJvfk
                    [taxability_reason] => 
                    [taxable_amount] => 6600
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 413
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1RrF5rCDiOqgoJOU4zhsJvfk
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 6600
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1754039689
)

[01-Aug-2025 09:22:46 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                )

            [time] => 2025-08-01T02:22:46.705-07:00
        )

)

[01-Aug-2025 09:22:47 UTC] Using QBO customer ID: 1
[01-Aug-2025 09:22:47 UTC] No existing QBO invoice found, creating new one
[01-Aug-2025 09:22:48 UTC] Creating new QBO invoice with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 1
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 66
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 3
                                )

                            [UnitPrice] => 66
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-08-01
    [DueDate] => 2025-08-31
    [TotalAmt] => 70.13
    [PrivateNote] => Stripe Invoice ID: in_1RrF37CDiOqgoJOUXH07pK9o
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 4.13
        )

)

[01-Aug-2025 09:22:49 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 1
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-08-01T02:22:49-07:00
                            [LastUpdatedTime] => 2025-08-01T02:22:49-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-08-01
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Invoice ID: in_1RrF37CDiOqgoJOUXH07pK9o
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 66
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 3
                                                    [name] => llll
                                                )

                                            [UnitPrice] => 66
                                            [Qty] => 1
                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 66
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 3
                                )

                            [TotalTax] => 4.13
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0.45
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 4
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 66
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0.85
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 5
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.875
                                                    [NetAmountTaxable] => 66
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 2.83
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 3
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 66
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 1
                            [name] => ggg ggg(nnnn@nnn.com)
                        )

                    [DueDate] => 2025-08-31
                    [TotalAmt] => 70.13
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 70.13
                )

            [time] => 2025-08-01T02:22:48.814-07:00
        )

)

[01-Aug-2025 09:22:49 UTC] Created new QBO invoice ID: 1
[01-Aug-2025 09:22:50 UTC] Failed to create payment method: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Invalid Enumeration
                                    [Detail] => Invalid Enumeration : OTHER
                                    [code] => 2170
                                    [element] => Type
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-08-01T02:22:50.627-07:00
        )

)

[01-Aug-2025 09:22:50 UTC] Creating QBO payment with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 1
        )

    [TotalAmt] => 70.13
    [TxnDate] => 2025-08-01
    [PaymentRefNum] => pi_3RrF6BCDiOqgoJOU0k
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

    [PrivateNote] => Stripe Invoice ID: in_1RrF37CDiOqgoJOUXH07pK9o
    [Line] => Array
        (
            [0] => Array
                (
                    [Amount] => 70.13
                    [LinkedTxn] => Array
                        (
                            [0] => Array
                                (
                                    [TxnId] => 1
                                    [TxnType] => Invoice
                                )

                        )

                )

        )

)

[01-Aug-2025 09:22:51 UTC] QBO API response: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Invalid account type used
                                    [Detail] => Invalid account type: Check your account details before you continue. You may need to select a different type of account for your transaction.
                                    [code] => 6430
                                    [element] => 
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-08-01T02:22:51.234-07:00
        )

)

[01-Aug-2025 09:22:51 UTC] Payment creation failed: Failed to create payment in QuickBooks
[01-Aug-2025 09:22:51 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-new/stripe-app/functions.php on line 392
[01-Aug-2025 09:27:37 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1RrFFVCDiOqgoJOUUgC5heLR)
[01-Aug-2025 09:27:37 UTC] 1
[01-Aug-2025 09:27:37 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-new/stripe-app/functions.php on line 376
[01-Aug-2025 09:27:37 UTC] Starting payment process for Stripe invoice: evt_1RrFFVCDiOqgoJOUUgC5heLR
[01-Aug-2025 09:27:37 UTC] Fetching Stripe invoice: in_1RrEJ8CDiOqgoJOUn1GB0VY3
[01-Aug-2025 09:27:38 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RrEJ8CDiOqgoJOUn1GB0VY3
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 10692
    [amount_overpaid] => 0
    [amount_paid] => 10692
    [amount_remaining] => 0
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 1
    [attempted] => 1
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 1
            [liability] => Array
                (
                    [type] => self
                )

            [provider] => stripe
            [status] => complete
        )

    [automatically_finalizes_at] => 
    [billing_reason] => subscription_cycle
    [charge] => ch_3RrFFRCDiOqgoJOU1IbP0sTa
    [collection_method] => charge_automatically
    [created] => 1754036838
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_Sjo6INOhbQe0LI
    [customer_address] => Array
        (
            [city] => Alabama
            [country] => US
            [line1] => Alabama
            [line2] => Alabama
            [postal_code] => 35015
            [state] => AL
        )

    [customer_email] => nnnn@nnn.com
    [customer_name] => ggg ggg
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 
    [effective_at] => 1754040452
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TbW51bVB3N2FFM0NWaG16YmxSQW84SGYyOEduVmpkLDE0NDU4MTI1OA0200Aa4YXTXS?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TbW51bVB3N2FFM0NWaG16YmxSQW84SGYyOEduVmpkLDE0NDU4MTI1OA0200Aa4YXTXS/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RrEJ8CDiOqgoJOUuKtPUIcb
                            [object] => line_item
                            [amount] => 9900
                            [amount_excluding_tax] => 9900
                            [currency] => usd
                            [description] => 1 × gggg (at $99.00 / day)
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RrEJ8CDiOqgoJOUn1GB0VY3
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => 
                                    [subscription_item_details] => Array
                                        (
                                            [invoice_item] => 
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => sub_1RoKTvCDiOqgoJOUd5FTQcFJ
                                            [subscription_item] => si_Sjo66pvsdF6HWb
                                        )

                                    [type] => subscription_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1754123185
                                    [start] => 1754036785
                                )

                            [plan] => Array
                                (
                                    [id] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                    [object] => plan
                                    [active] => 1
                                    [aggregate_usage] => 
                                    [amount] => 9900
                                    [amount_decimal] => 9900
                                    [billing_scheme] => per_unit
                                    [created] => 1753345386
                                    [currency] => usd
                                    [interval] => day
                                    [interval_count] => 1
                                    [livemode] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [meter] => 
                                    [nickname] => 
                                    [product] => prod_Sjo2eLoEDhLJSz
                                    [tiers_mode] => 
                                    [transform_usage] => 
                                    [trial_period_days] => 
                                    [usage_type] => licensed
                                )

                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1753345386
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_Sjo2eLoEDhLJSz
                                    [recurring] => Array
                                        (
                                            [aggregate_usage] => 
                                            [interval] => day
                                            [interval_count] => 1
                                            [meter] => 
                                            [trial_period_days] => 
                                            [usage_type] => licensed
                                        )

                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => recurring
                                    [unit_amount] => 9900
                                    [unit_amount_decimal] => 9900
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                            [product] => prod_Sjo2eLoEDhLJSz
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 9900
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 1
                            [subscription] => sub_1RoKTvCDiOqgoJOUd5FTQcFJ
                            [subscription_item] => si_Sjo66pvsdF6HWb
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 792
                                            [inclusive] => 
                                            [tax_rate] => txr_1RmbmQCDiOqgoJOUVl6boLeV
                                            [taxability_reason] => standard_rated
                                            [taxable_amount] => 9900
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 792
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1RmbmQCDiOqgoJOUVl6boLeV
                                                )

                                            [taxability_reason] => standard_rated
                                            [taxable_amount] => 9900
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => subscription
                            [unit_amount_excluding_tax] => 9900
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1RrEJ8CDiOqgoJOUn1GB0VY3/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => HJAMRYO3-0045
    [on_behalf_of] => 
    [paid] => 1
    [paid_out_of_band] => 
    [parent] => Array
        (
            [quote_details] => 
            [subscription_details] => Array
                (
                    [metadata] => Array
                        (
                        )

                    [subscription] => sub_1RoKTvCDiOqgoJOUd5FTQcFJ
                )

            [type] => subscription_details
        )

    [payment_intent] => pi_3RrFFRCDiOqgoJOU13BKHpvd
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => Array
                (
                    [acss_debit] => 
                    [bancontact] => 
                    [card] => Array
                        (
                            [request_three_d_secure] => automatic
                        )

                    [customer_balance] => 
                    [konbini] => 
                    [sepa_debit] => 
                    [us_bank_account] => 
                )

            [payment_method_types] => 
        )

    [period_end] => 1754036785
    [period_start] => 1753950385
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => 
    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => paid
    [status_transitions] => Array
        (
            [finalized_at] => 1754040452
            [marked_uncollectible_at] => 
            [paid_at] => 1754040452
            [voided_at] => 
        )

    [subscription] => sub_1RoKTvCDiOqgoJOUd5FTQcFJ
    [subscription_details] => Array
        (
            [metadata] => Array
                (
                )

        )

    [subtotal] => 9900
    [subtotal_excluding_tax] => 9900
    [tax] => 792
    [test_clock] => 
    [total] => 10692
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 9900
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 792
                    [inclusive] => 
                    [tax_rate] => txr_1RmbmQCDiOqgoJOUVl6boLeV
                    [taxability_reason] => standard_rated
                    [taxable_amount] => 9900
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 792
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1RmbmQCDiOqgoJOUVl6boLeV
                        )

                    [taxability_reason] => standard_rated
                    [taxable_amount] => 9900
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1754036838
)

[01-Aug-2025 09:27:38 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 70.13
                                    [BalanceWithJobs] => 70.13
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 1
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-08-01T02:22:47-07:00
                                            [LastUpdatedTime] => 2025-08-01T02:22:49-07:00
                                        )

                                    [GivenName] => ggg ggg
                                    [FamilyName] => ggg ggg
                                    [FullyQualifiedName] => ggg ggg(nnnn@nnn.com)
                                    [DisplayName] => ggg ggg(nnnn@nnn.com)
                                    [PrintOnCheckName] => ggg ggg ggg ggg
                                    [Active] => 1
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => nnnn@nnn.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-08-01T02:27:38.685-07:00
        )

)

[01-Aug-2025 09:27:38 UTC] Using QBO customer ID: 1
[01-Aug-2025 09:27:38 UTC] No existing QBO invoice found, creating new one
[01-Aug-2025 09:27:39 UTC] Creating new QBO invoice with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 1
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 99
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 4
                                )

                            [UnitPrice] => 99
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-08-01
    [DueDate] => 2025-08-31
    [TotalAmt] => 106.92
    [PrivateNote] => Stripe Invoice ID: in_1RrEJ8CDiOqgoJOUn1GB0VY3
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 7.92
        )

)

[01-Aug-2025 09:27:40 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 2
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-08-01T02:27:40-07:00
                            [LastUpdatedTime] => 2025-08-01T02:27:40-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-08-01
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Invoice ID: in_1RrEJ8CDiOqgoJOUn1GB0VY3
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 99
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 4
                                                    [name] => 1 × gggg (at $99.00 / day)
                                                )

                                            [UnitPrice] => 99
                                            [Qty] => 1
                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 99
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 3
                                )

                            [TotalTax] => 7.92
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0.87
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 4
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 1.63
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 5
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.875
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 5.42
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 3
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 1
                            [name] => ggg ggg(nnnn@nnn.com)
                        )

                    [DueDate] => 2025-08-31
                    [TotalAmt] => 106.92
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 106.92
                )

            [time] => 2025-08-01T02:27:40.048-07:00
        )

)

[01-Aug-2025 09:27:40 UTC] Created new QBO invoice ID: 2
[01-Aug-2025 09:27:41 UTC] Failed to create payment method: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Invalid Enumeration
                                    [Detail] => Invalid Enumeration : OTHER
                                    [code] => 2170
                                    [element] => Type
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-08-01T02:27:41.663-07:00
        )

)

[01-Aug-2025 09:27:41 UTC] Creating QBO payment with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 1
        )

    [TotalAmt] => 106.92
    [TxnDate] => 2025-08-01
    [PaymentRefNum] => pi_3RrFFRCDiOqgoJOU13
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

    [PrivateNote] => Stripe Invoice ID: in_1RrEJ8CDiOqgoJOUn1GB0VY3
    [Line] => Array
        (
            [0] => Array
                (
                    [Amount] => 106.92
                    [LinkedTxn] => Array
                        (
                            [0] => Array
                                (
                                    [TxnId] => 2
                                    [TxnType] => Invoice
                                )

                        )

                )

        )

)

[01-Aug-2025 09:27:42 UTC] QBO API response: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Invalid account type used
                                    [Detail] => Invalid account type: Check your account details before you continue. You may need to select a different type of account for your transaction.
                                    [code] => 6430
                                    [element] => 
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-08-01T02:27:42.252-07:00
        )

)

[01-Aug-2025 09:27:42 UTC] Payment creation failed: Failed to create payment in QuickBooks
[01-Aug-2025 09:27:42 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-new/stripe-app/functions.php on line 392
[01-Aug-2025 09:39:43 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1RrFRDCDiOqgoJOUQiY9xazd)
[01-Aug-2025 09:39:43 UTC] 1
[01-Aug-2025 09:39:43 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-new/stripe-app/functions.php on line 376
[01-Aug-2025 09:39:43 UTC] Starting payment process for Stripe invoice: evt_1RrFRDCDiOqgoJOUQiY9xazd
[01-Aug-2025 09:39:43 UTC] Fetching Stripe invoice: in_1RrEUiCDiOqgoJOUqmGaoVAQ
[01-Aug-2025 09:39:44 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RrEUiCDiOqgoJOUqmGaoVAQ
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 10989
    [amount_overpaid] => 0
    [amount_paid] => 10989
    [amount_remaining] => 0
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 1
    [attempted] => 1
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => subscription_cycle
    [charge] => ch_3RrFR9CDiOqgoJOU1r1DAnOD
    [collection_method] => charge_automatically
    [created] => 1754037556
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_Sjo6INOhbQe0LI
    [customer_address] => Array
        (
            [city] => Alabama
            [country] => US
            [line1] => Alabama
            [line2] => Alabama
            [postal_code] => 35015
            [state] => AL
        )

    [customer_email] => nnnn@nnn.com
    [customer_name] => ggg ggg
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                    [object] => tax_rate
                    [active] => 1
                    [country] => US
                    [created] => 1752935198
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => AL
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 
    [effective_at] => 1754041178
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TbW82SVhuNVh6TTBVN1BlMkMxMXBwR2tZZzlXU3R5LDE0NDU4MTk4NA020086hEPth3?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TbW82SVhuNVh6TTBVN1BlMkMxMXBwR2tZZzlXU3R5LDE0NDU4MTk4NA020086hEPth3/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RrEUiCDiOqgoJOUZGwSITZL
                            [object] => line_item
                            [amount] => 9900
                            [amount_excluding_tax] => 9900
                            [currency] => usd
                            [description] => 1 × gggg (at $99.00 / day)
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RrEUiCDiOqgoJOUqmGaoVAQ
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => 
                                    [subscription_item_details] => Array
                                        (
                                            [invoice_item] => 
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => sub_1RoKfkCDiOqgoJOUGvl9Rewo
                                            [subscription_item] => si_SjoIBZzvFFhJW6
                                        )

                                    [type] => subscription_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1754123920
                                    [start] => 1754037520
                                )

                            [plan] => Array
                                (
                                    [id] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                    [object] => plan
                                    [active] => 1
                                    [aggregate_usage] => 
                                    [amount] => 9900
                                    [amount_decimal] => 9900
                                    [billing_scheme] => per_unit
                                    [created] => 1753345386
                                    [currency] => usd
                                    [interval] => day
                                    [interval_count] => 1
                                    [livemode] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [meter] => 
                                    [nickname] => 
                                    [product] => prod_Sjo2eLoEDhLJSz
                                    [tiers_mode] => 
                                    [transform_usage] => 
                                    [trial_period_days] => 
                                    [usage_type] => licensed
                                )

                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1753345386
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_Sjo2eLoEDhLJSz
                                    [recurring] => Array
                                        (
                                            [aggregate_usage] => 
                                            [interval] => day
                                            [interval_count] => 1
                                            [meter] => 
                                            [trial_period_days] => 
                                            [usage_type] => licensed
                                        )

                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => recurring
                                    [unit_amount] => 9900
                                    [unit_amount_decimal] => 9900
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                            [product] => prod_Sjo2eLoEDhLJSz
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 9900
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 1
                            [subscription] => sub_1RoKfkCDiOqgoJOUGvl9Rewo
                            [subscription_item] => si_SjoIBZzvFFhJW6
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1089
                                            [inclusive] => 
                                            [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                                            [taxability_reason] => 
                                            [taxable_amount] => 9900
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1089
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 9900
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => subscription
                            [unit_amount_excluding_tax] => 9900
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1RrEUiCDiOqgoJOUqmGaoVAQ/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => HJAMRYO3-0046
    [on_behalf_of] => 
    [paid] => 1
    [paid_out_of_band] => 
    [parent] => Array
        (
            [quote_details] => 
            [subscription_details] => Array
                (
                    [metadata] => Array
                        (
                        )

                    [subscription] => sub_1RoKfkCDiOqgoJOUGvl9Rewo
                )

            [type] => subscription_details
        )

    [payment_intent] => pi_3RrFR9CDiOqgoJOU1d8N1RoY
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1754037520
    [period_start] => 1753951120
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => 
    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => paid
    [status_transitions] => Array
        (
            [finalized_at] => 1754041178
            [marked_uncollectible_at] => 
            [paid_at] => 1754041178
            [voided_at] => 
        )

    [subscription] => sub_1RoKfkCDiOqgoJOUGvl9Rewo
    [subscription_details] => Array
        (
            [metadata] => Array
                (
                )

        )

    [subtotal] => 9900
    [subtotal_excluding_tax] => 9900
    [tax] => 1089
    [test_clock] => 
    [total] => 10989
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 9900
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1089
                    [inclusive] => 
                    [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                    [taxability_reason] => 
                    [taxable_amount] => 9900
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1089
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 9900
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1754037556
)

[01-Aug-2025 09:39:45 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 177.05
                                    [BalanceWithJobs] => 177.05
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 1
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-08-01T02:22:47-07:00
                                            [LastUpdatedTime] => 2025-08-01T02:27:41-07:00
                                        )

                                    [GivenName] => ggg ggg
                                    [FamilyName] => ggg ggg
                                    [FullyQualifiedName] => ggg ggg(nnnn@nnn.com)
                                    [DisplayName] => ggg ggg(nnnn@nnn.com)
                                    [PrintOnCheckName] => ggg ggg ggg ggg
                                    [Active] => 1
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => nnnn@nnn.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-08-01T02:39:44.923-07:00
        )

)

[01-Aug-2025 09:39:45 UTC] Using QBO customer ID: 1
[01-Aug-2025 09:39:45 UTC] No existing QBO invoice found, creating new one
[01-Aug-2025 09:39:45 UTC] Creating new QBO invoice with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 1
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 99
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 4
                                )

                            [UnitPrice] => 99
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-08-01
    [DueDate] => 2025-08-31
    [TotalAmt] => 109.89
    [PrivateNote] => Stripe Invoice ID: in_1RrEUiCDiOqgoJOUqmGaoVAQ
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 10.89
        )

)

[01-Aug-2025 09:39:46 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 3
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-08-01T02:39:46-07:00
                            [LastUpdatedTime] => 2025-08-01T02:39:46-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-08-01
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Invoice ID: in_1RrEUiCDiOqgoJOUqmGaoVAQ
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 99
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 4
                                                    [name] => 1 × gggg (at $99.00 / day)
                                                )

                                            [UnitPrice] => 99
                                            [Qty] => 1
                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 99
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 3
                                )

                            [TotalTax] => 10.89
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 1.19
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 4
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 2.25
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 5
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.875
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 7.45
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 3
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 1
                            [name] => ggg ggg(nnnn@nnn.com)
                        )

                    [DueDate] => 2025-08-31
                    [TotalAmt] => 109.89
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 109.89
                )

            [time] => 2025-08-01T02:39:45.632-07:00
        )

)

[01-Aug-2025 09:39:46 UTC] Created new QBO invoice ID: 3
[01-Aug-2025 09:39:47 UTC] Failed to create payment method: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Invalid Enumeration
                                    [Detail] => Invalid Enumeration : OTHER
                                    [code] => 2170
                                    [element] => Type
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-08-01T02:39:47.382-07:00
        )

)

[01-Aug-2025 09:39:47 UTC] Creating QBO payment with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 1
        )

    [TotalAmt] => 109.89
    [TxnDate] => 2025-08-01
    [PaymentRefNum] => pi_3RrFR9CDiOqgoJOU1d
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

    [PrivateNote] => Stripe Invoice ID: in_1RrEUiCDiOqgoJOUqmGaoVAQ
    [Line] => Array
        (
            [0] => Array
                (
                    [Amount] => 109.89
                    [LinkedTxn] => Array
                        (
                            [0] => Array
                                (
                                    [TxnId] => 3
                                    [TxnType] => Invoice
                                )

                        )

                )

        )

)

[01-Aug-2025 09:39:48 UTC] QBO API response: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Invalid account type used
                                    [Detail] => Invalid account type: Check your account details before you continue. You may need to select a different type of account for your transaction.
                                    [code] => 6430
                                    [element] => 
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-08-01T02:39:48.080-07:00
        )

)

[01-Aug-2025 09:39:48 UTC] Payment creation failed: Failed to create payment in QuickBooks
[01-Aug-2025 09:39:48 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-new/stripe-app/functions.php on line 392
[01-Aug-2025 10:05:17 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1RrFpxCDiOqgoJOUmS9UxwNp)
[01-Aug-2025 10:05:17 UTC] 1
[01-Aug-2025 10:05:17 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-new/stripe-app/functions.php on line 376
[01-Aug-2025 10:05:17 UTC] Starting payment process for Stripe invoice: evt_1RrFpxCDiOqgoJOUmS9UxwNp
[01-Aug-2025 10:05:17 UTC] Fetching Stripe invoice: in_1RrEtgCDiOqgoJOUXhCjZkXe
[01-Aug-2025 10:05:18 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RrEtgCDiOqgoJOUXhCjZkXe
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 9900
    [amount_overpaid] => 0
    [amount_paid] => 9900
    [amount_remaining] => 0
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 1
    [attempted] => 1
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => subscription_cycle
    [charge] => ch_3RrFptCDiOqgoJOU1iejViDK
    [collection_method] => charge_automatically
    [created] => 1754039104
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_Sjo6INOhbQe0LI
    [customer_address] => Array
        (
            [city] => Alabama
            [country] => US
            [line1] => Alabama
            [line2] => Alabama
            [postal_code] => 35015
            [state] => AL
        )

    [customer_email] => nnnn@nnn.com
    [customer_name] => ggg ggg
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 
    [effective_at] => 1754042712
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TbW9XWmJPWHZXVmFGUVpUZldiQ1hjZ1J5cEpFVnlyLDE0NDU4MzUxOA0200VwGsauhD?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TbW9XWmJPWHZXVmFGUVpUZldiQ1hjZ1J5cEpFVnlyLDE0NDU4MzUxOA0200VwGsauhD/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RrEtgCDiOqgoJOUOJXl1SBi
                            [object] => line_item
                            [amount] => 9900
                            [amount_excluding_tax] => 9900
                            [currency] => usd
                            [description] => 1 × gggg (at $99.00 / day)
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RrEtgCDiOqgoJOUXhCjZkXe
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => 
                                    [subscription_item_details] => Array
                                        (
                                            [invoice_item] => 
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => sub_1RoL5BCDiOqgoJOUERXWJlJ3
                                            [subscription_item] => si_SjoiWj90tuieYN
                                        )

                                    [type] => subscription_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1754125497
                                    [start] => 1754039097
                                )

                            [plan] => Array
                                (
                                    [id] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                    [object] => plan
                                    [active] => 1
                                    [aggregate_usage] => 
                                    [amount] => 9900
                                    [amount_decimal] => 9900
                                    [billing_scheme] => per_unit
                                    [created] => 1753345386
                                    [currency] => usd
                                    [interval] => day
                                    [interval_count] => 1
                                    [livemode] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [meter] => 
                                    [nickname] => 
                                    [product] => prod_Sjo2eLoEDhLJSz
                                    [tiers_mode] => 
                                    [transform_usage] => 
                                    [trial_period_days] => 
                                    [usage_type] => licensed
                                )

                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1753345386
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_Sjo2eLoEDhLJSz
                                    [recurring] => Array
                                        (
                                            [aggregate_usage] => 
                                            [interval] => day
                                            [interval_count] => 1
                                            [meter] => 
                                            [trial_period_days] => 
                                            [usage_type] => licensed
                                        )

                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => recurring
                                    [unit_amount] => 9900
                                    [unit_amount_decimal] => 9900
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                            [product] => prod_Sjo2eLoEDhLJSz
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 9900
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 1
                            [subscription] => sub_1RoL5BCDiOqgoJOUERXWJlJ3
                            [subscription_item] => si_SjoiWj90tuieYN
                            [tax_amounts] => Array
                                (
                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                )

                            [type] => subscription
                            [unit_amount_excluding_tax] => 9900
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1RrEtgCDiOqgoJOUXhCjZkXe/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => HJAMRYO3-0047
    [on_behalf_of] => 
    [paid] => 1
    [paid_out_of_band] => 
    [parent] => Array
        (
            [quote_details] => 
            [subscription_details] => Array
                (
                    [metadata] => Array
                        (
                        )

                    [subscription] => sub_1RoL5BCDiOqgoJOUERXWJlJ3
                )

            [type] => subscription_details
        )

    [payment_intent] => pi_3RrFptCDiOqgoJOU1G93c00Q
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1754039097
    [period_start] => 1753952697
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => 
    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => paid
    [status_transitions] => Array
        (
            [finalized_at] => 1754042712
            [marked_uncollectible_at] => 
            [paid_at] => 1754042712
            [voided_at] => 
        )

    [subscription] => sub_1RoL5BCDiOqgoJOUERXWJlJ3
    [subscription_details] => Array
        (
            [metadata] => Array
                (
                )

        )

    [subtotal] => 9900
    [subtotal_excluding_tax] => 9900
    [tax] => 
    [test_clock] => 
    [total] => 9900
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 9900
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
        )

    [total_taxes] => Array
        (
        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1754039104
)

[01-Aug-2025 10:05:19 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 286.94
                                    [BalanceWithJobs] => 286.94
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 1
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-08-01T02:22:47-07:00
                                            [LastUpdatedTime] => 2025-08-01T02:39:46-07:00
                                        )

                                    [GivenName] => ggg ggg
                                    [FamilyName] => ggg ggg
                                    [FullyQualifiedName] => ggg ggg(nnnn@nnn.com)
                                    [DisplayName] => ggg ggg(nnnn@nnn.com)
                                    [PrintOnCheckName] => ggg ggg ggg ggg
                                    [Active] => 1
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => nnnn@nnn.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-08-01T03:05:19.010-07:00
        )

)

[01-Aug-2025 10:05:19 UTC] Using QBO customer ID: 1
[01-Aug-2025 10:05:19 UTC] No existing QBO invoice found, creating new one
[01-Aug-2025 10:05:19 UTC] Creating new QBO invoice with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 1
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 99
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 4
                                )

                            [UnitPrice] => 99
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => NON
                                )

                        )

                )

        )

    [TxnDate] => 2025-08-01
    [DueDate] => 2025-08-31
    [TotalAmt] => 99
    [PrivateNote] => Stripe Invoice ID: in_1RrEtgCDiOqgoJOUXhCjZkXe
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
)

[01-Aug-2025 10:05:20 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 4
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-08-01T03:05:20-07:00
                            [LastUpdatedTime] => 2025-08-01T03:05:20-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-08-01
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Invoice ID: in_1RrEtgCDiOqgoJOUXhCjZkXe
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 99
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 4
                                                    [name] => 1 × gggg (at $99.00 / day)
                                                )

                                            [UnitPrice] => 99
                                            [Qty] => 1
                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => NON
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 99
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 3
                                )

                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 4
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 5
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.875
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 3
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 1
                            [name] => ggg ggg(nnnn@nnn.com)
                        )

                    [DueDate] => 2025-08-31
                    [TotalAmt] => 99
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 99
                )

            [time] => 2025-08-01T03:05:19.806-07:00
        )

)

[01-Aug-2025 10:05:20 UTC] Created new QBO invoice ID: 4
[01-Aug-2025 10:05:21 UTC] Failed to create payment method: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Invalid Enumeration
                                    [Detail] => Invalid Enumeration : OTHER
                                    [code] => 2170
                                    [element] => Type
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-08-01T03:05:21.461-07:00
        )

)

[01-Aug-2025 10:05:21 UTC] Creating QBO payment with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 1
        )

    [TotalAmt] => 99
    [TxnDate] => 2025-08-01
    [PaymentRefNum] => pi_3RrFptCDiOqgoJOU1G
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

    [PrivateNote] => Stripe Invoice ID: in_1RrEtgCDiOqgoJOUXhCjZkXe
    [Line] => Array
        (
            [0] => Array
                (
                    [Amount] => 99
                    [LinkedTxn] => Array
                        (
                            [0] => Array
                                (
                                    [TxnId] => 4
                                    [TxnType] => Invoice
                                )

                        )

                )

        )

)

[01-Aug-2025 10:05:22 UTC] QBO API response: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Invalid account type used
                                    [Detail] => Invalid account type: Check your account details before you continue. You may need to select a different type of account for your transaction.
                                    [code] => 6430
                                    [element] => 
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-08-01T03:05:22.135-07:00
        )

)

[01-Aug-2025 10:05:22 UTC] Payment creation failed: Failed to create payment in QuickBooks
[01-Aug-2025 10:05:22 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-new/stripe-app/functions.php on line 392
[01-Aug-2025 10:26:49 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1RrGAmCDiOqgoJOUdVH9a0ta)
[01-Aug-2025 10:26:49 UTC] 1
[01-Aug-2025 10:26:49 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-new/stripe-app/functions.php on line 376
[01-Aug-2025 10:26:49 UTC] Starting payment process for Stripe invoice: evt_1RrGAmCDiOqgoJOUdVH9a0ta
[01-Aug-2025 10:26:49 UTC] Fetching Stripe invoice: in_1RrFEMCDiOqgoJOUYKa2eZdk
[01-Aug-2025 10:26:49 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RrFEMCDiOqgoJOUYKa2eZdk
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 10989
    [amount_overpaid] => 0
    [amount_paid] => 10989
    [amount_remaining] => 0
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 1
    [attempted] => 1
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => subscription_cycle
    [charge] => ch_3RrGAiCDiOqgoJOU11Rc7hsN
    [collection_method] => charge_automatically
    [created] => 1754040386
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_Sjo6INOhbQe0LI
    [customer_address] => Array
        (
            [city] => Alabama
            [country] => US
            [line1] => Alabama
            [line2] => Alabama
            [postal_code] => 35015
            [state] => AL
        )

    [customer_email] => nnnn@nnn.com
    [customer_name] => ggg ggg
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                    [object] => tax_rate
                    [active] => 1
                    [country] => US
                    [created] => 1752935198
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => AL
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 
    [effective_at] => 1754044003
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TbW9zYjNhUEp4ZjJyVURvOWhUZnVOUnUzOFM1bjdRLDE0NDU4NDgwOQ0200RZO2CwLW?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TbW9zYjNhUEp4ZjJyVURvOWhUZnVOUnUzOFM1bjdRLDE0NDU4NDgwOQ0200RZO2CwLW/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RrFEMCDiOqgoJOU5czJa99N
                            [object] => line_item
                            [amount] => 9900
                            [amount_excluding_tax] => 9900
                            [currency] => usd
                            [description] => 1 × gggg (at $99.00 / day)
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RrFEMCDiOqgoJOUYKa2eZdk
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => 
                                    [subscription_item_details] => Array
                                        (
                                            [invoice_item] => 
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => sub_1RoLPpCDiOqgoJOUYFSIDLpx
                                            [subscription_item] => si_Sjp3hmaN7oAsUY
                                        )

                                    [type] => subscription_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1754126777
                                    [start] => 1754040377
                                )

                            [plan] => Array
                                (
                                    [id] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                    [object] => plan
                                    [active] => 1
                                    [aggregate_usage] => 
                                    [amount] => 9900
                                    [amount_decimal] => 9900
                                    [billing_scheme] => per_unit
                                    [created] => 1753345386
                                    [currency] => usd
                                    [interval] => day
                                    [interval_count] => 1
                                    [livemode] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [meter] => 
                                    [nickname] => 
                                    [product] => prod_Sjo2eLoEDhLJSz
                                    [tiers_mode] => 
                                    [transform_usage] => 
                                    [trial_period_days] => 
                                    [usage_type] => licensed
                                )

                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1753345386
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_Sjo2eLoEDhLJSz
                                    [recurring] => Array
                                        (
                                            [aggregate_usage] => 
                                            [interval] => day
                                            [interval_count] => 1
                                            [meter] => 
                                            [trial_period_days] => 
                                            [usage_type] => licensed
                                        )

                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => recurring
                                    [unit_amount] => 9900
                                    [unit_amount_decimal] => 9900
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                            [product] => prod_Sjo2eLoEDhLJSz
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 9900
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 1
                            [subscription] => sub_1RoLPpCDiOqgoJOUYFSIDLpx
                            [subscription_item] => si_Sjp3hmaN7oAsUY
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1089
                                            [inclusive] => 
                                            [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                                            [taxability_reason] => 
                                            [taxable_amount] => 9900
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1089
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 9900
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => subscription
                            [unit_amount_excluding_tax] => 9900
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1RrFEMCDiOqgoJOUYKa2eZdk/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => HJAMRYO3-0048
    [on_behalf_of] => 
    [paid] => 1
    [paid_out_of_band] => 
    [parent] => Array
        (
            [quote_details] => 
            [subscription_details] => Array
                (
                    [metadata] => Array
                        (
                        )

                    [subscription] => sub_1RoLPpCDiOqgoJOUYFSIDLpx
                )

            [type] => subscription_details
        )

    [payment_intent] => pi_3RrGAiCDiOqgoJOU1OEuixb2
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1754040377
    [period_start] => 1753953977
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => 
    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => paid
    [status_transitions] => Array
        (
            [finalized_at] => 1754044003
            [marked_uncollectible_at] => 
            [paid_at] => 1754044003
            [voided_at] => 
        )

    [subscription] => sub_1RoLPpCDiOqgoJOUYFSIDLpx
    [subscription_details] => Array
        (
            [metadata] => Array
                (
                )

        )

    [subtotal] => 9900
    [subtotal_excluding_tax] => 9900
    [tax] => 1089
    [test_clock] => 
    [total] => 10989
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 9900
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1089
                    [inclusive] => 
                    [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                    [taxability_reason] => 
                    [taxable_amount] => 9900
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1089
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 9900
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1754040386
)

[01-Aug-2025 10:26:50 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => 
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1754044010352
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[01-Aug-2025 10:26:50 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => 
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1754044010537
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[01-Aug-2025 10:26:50 UTC] Payment creation failed: Failed to find or create customer in QuickBooks
[01-Aug-2025 10:26:50 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-new/stripe-app/functions.php on line 392
[01-Aug-2025 10:30:24 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1RrGEGCDiOqgoJOUkJfq4ms3)
[01-Aug-2025 10:30:24 UTC] 1
[01-Aug-2025 10:30:24 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-new/stripe-app/functions.php on line 376
[01-Aug-2025 10:30:24 UTC] Starting payment process for Stripe invoice: evt_1RrGEGCDiOqgoJOUkJfq4ms3
[01-Aug-2025 10:30:24 UTC] Fetching Stripe invoice: in_1RrFHACDiOqgoJOU2DR2ErYB
[01-Aug-2025 10:30:24 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RrFHACDiOqgoJOU2DR2ErYB
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 10989
    [amount_overpaid] => 0
    [amount_paid] => 10989
    [amount_remaining] => 0
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 1
    [attempted] => 1
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => subscription_cycle
    [charge] => ch_3RrGECCDiOqgoJOU1yc5c1iA
    [collection_method] => charge_automatically
    [created] => 1754040560
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_Sjo6INOhbQe0LI
    [customer_address] => Array
        (
            [city] => Alabama
            [country] => US
            [line1] => Alabama
            [line2] => Alabama
            [postal_code] => 35015
            [state] => AL
        )

    [customer_email] => nnnn@nnn.com
    [customer_name] => ggg ggg
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                    [object] => tax_rate
                    [active] => 1
                    [country] => US
                    [created] => 1752935198
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => AL
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 
    [effective_at] => 1754044219
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TbW92WE1KUjZBb3h6UEcyWHVCZFE5WFJjZzFRWjlPLDE0NDU4NTAyNA0200eO3oYvhB?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TbW92WE1KUjZBb3h6UEcyWHVCZFE5WFJjZzFRWjlPLDE0NDU4NTAyNA0200eO3oYvhB/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RrFHACDiOqgoJOUKKXCbzRR
                            [object] => line_item
                            [amount] => 9900
                            [amount_excluding_tax] => 9900
                            [currency] => usd
                            [description] => 1 × gggg (at $99.00 / day)
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RrFHACDiOqgoJOU2DR2ErYB
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => 
                                    [subscription_item_details] => Array
                                        (
                                            [invoice_item] => 
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => sub_1RoLSCCDiOqgoJOUhZQxkDKJ
                                            [subscription_item] => si_Sjp6fXdDRiWknC
                                        )

                                    [type] => subscription_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1754126924
                                    [start] => 1754040524
                                )

                            [plan] => Array
                                (
                                    [id] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                    [object] => plan
                                    [active] => 1
                                    [aggregate_usage] => 
                                    [amount] => 9900
                                    [amount_decimal] => 9900
                                    [billing_scheme] => per_unit
                                    [created] => 1753345386
                                    [currency] => usd
                                    [interval] => day
                                    [interval_count] => 1
                                    [livemode] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [meter] => 
                                    [nickname] => 
                                    [product] => prod_Sjo2eLoEDhLJSz
                                    [tiers_mode] => 
                                    [transform_usage] => 
                                    [trial_period_days] => 
                                    [usage_type] => licensed
                                )

                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1753345386
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_Sjo2eLoEDhLJSz
                                    [recurring] => Array
                                        (
                                            [aggregate_usage] => 
                                            [interval] => day
                                            [interval_count] => 1
                                            [meter] => 
                                            [trial_period_days] => 
                                            [usage_type] => licensed
                                        )

                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => recurring
                                    [unit_amount] => 9900
                                    [unit_amount_decimal] => 9900
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                            [product] => prod_Sjo2eLoEDhLJSz
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 9900
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 1
                            [subscription] => sub_1RoLSCCDiOqgoJOUhZQxkDKJ
                            [subscription_item] => si_Sjp6fXdDRiWknC
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1089
                                            [inclusive] => 
                                            [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                                            [taxability_reason] => 
                                            [taxable_amount] => 9900
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1089
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 9900
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => subscription
                            [unit_amount_excluding_tax] => 9900
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1RrFHACDiOqgoJOU2DR2ErYB/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => HJAMRYO3-0049
    [on_behalf_of] => 
    [paid] => 1
    [paid_out_of_band] => 
    [parent] => Array
        (
            [quote_details] => 
            [subscription_details] => Array
                (
                    [metadata] => Array
                        (
                        )

                    [subscription] => sub_1RoLSCCDiOqgoJOUhZQxkDKJ
                )

            [type] => subscription_details
        )

    [payment_intent] => pi_3RrGECCDiOqgoJOU151tuxES
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1754040524
    [period_start] => 1753954124
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => 
    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => paid
    [status_transitions] => Array
        (
            [finalized_at] => 1754044219
            [marked_uncollectible_at] => 
            [paid_at] => 1754044219
            [voided_at] => 
        )

    [subscription] => sub_1RoLSCCDiOqgoJOUhZQxkDKJ
    [subscription_details] => Array
        (
            [metadata] => Array
                (
                )

        )

    [subtotal] => 9900
    [subtotal_excluding_tax] => 9900
    [tax] => 1089
    [test_clock] => 
    [total] => 10989
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 9900
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1089
                    [inclusive] => 
                    [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                    [taxability_reason] => 
                    [taxable_amount] => 9900
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1089
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 9900
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1754040560
)

[01-Aug-2025 10:30:25 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => 
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1754044225534
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[01-Aug-2025 10:30:25 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => 
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1754044225716
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[01-Aug-2025 10:30:25 UTC] Payment creation failed: Failed to find or create customer in QuickBooks
[01-Aug-2025 10:30:25 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-new/stripe-app/functions.php on line 392
[01-Aug-2025 15:30:08 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1RrKuJCDiOqgoJOUtxM1FSQk)
[01-Aug-2025 15:30:08 UTC] 1
[01-Aug-2025 15:30:08 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-new/stripe-app/functions.php on line 376
[01-Aug-2025 15:30:08 UTC] Starting payment process for Stripe invoice: evt_1RrKuJCDiOqgoJOUtxM1FSQk
[01-Aug-2025 15:30:08 UTC] Fetching Stripe invoice: in_1RrJxJCDiOqgoJOUqVkOKWVW
[01-Aug-2025 15:30:08 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RrJxJCDiOqgoJOUqVkOKWVW
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 9900
    [amount_overpaid] => 0
    [amount_paid] => 9900
    [amount_remaining] => 0
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 1
    [attempted] => 1
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 1
            [liability] => Array
                (
                    [type] => self
                )

            [provider] => stripe
            [status] => complete
        )

    [automatically_finalizes_at] => 
    [billing_reason] => subscription_cycle
    [charge] => ch_3RrKuFCDiOqgoJOU18NmTzP7
    [collection_method] => charge_automatically
    [created] => 1754058549
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_Slm4tKm9oJEoFY
    [customer_address] => Array
        (
            [city] => Alabama
            [country] => US
            [line1] => Alabama
            [line2] => Alabama
            [postal_code] => 13035
            [state] => AL
        )

    [customer_email] => baaamrafiul.alam@gmail.com
    [customer_name] => jjj jjjj
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 
    [effective_at] => 1754062202
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TbXRrbkYySXpIa256dUZkQklpRXNrbVdPN3J0Q0tnLDE0NDYwMzAwOA0200vQlCqDNh?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TbXRrbkYySXpIa256dUZkQklpRXNrbVdPN3J0Q0tnLDE0NDYwMzAwOA0200vQlCqDNh/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RrJxJCDiOqgoJOUxJueSOch
                            [object] => line_item
                            [amount] => 9900
                            [amount_excluding_tax] => 9900
                            [currency] => usd
                            [description] => 1 × gggg (at $99.00 / day)
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RrJxJCDiOqgoJOUqVkOKWVW
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => 
                                    [subscription_item_details] => Array
                                        (
                                            [invoice_item] => 
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => sub_1RqEWBCDiOqgoJOUaZQFv8DH
                                            [subscription_item] => si_Slm4X3y74jzQfi
                                        )

                                    [type] => subscription_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1754144917
                                    [start] => 1754058517
                                )

                            [plan] => Array
                                (
                                    [id] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                    [object] => plan
                                    [active] => 1
                                    [aggregate_usage] => 
                                    [amount] => 9900
                                    [amount_decimal] => 9900
                                    [billing_scheme] => per_unit
                                    [created] => 1753345386
                                    [currency] => usd
                                    [interval] => day
                                    [interval_count] => 1
                                    [livemode] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [meter] => 
                                    [nickname] => 
                                    [product] => prod_Sjo2eLoEDhLJSz
                                    [tiers_mode] => 
                                    [transform_usage] => 
                                    [trial_period_days] => 
                                    [usage_type] => licensed
                                )

                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1753345386
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_Sjo2eLoEDhLJSz
                                    [recurring] => Array
                                        (
                                            [aggregate_usage] => 
                                            [interval] => day
                                            [interval_count] => 1
                                            [meter] => 
                                            [trial_period_days] => 
                                            [usage_type] => licensed
                                        )

                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => recurring
                                    [unit_amount] => 9900
                                    [unit_amount_decimal] => 9900
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                            [product] => prod_Sjo2eLoEDhLJSz
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 9900
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 1
                            [subscription] => sub_1RqEWBCDiOqgoJOUaZQFv8DH
                            [subscription_item] => si_Slm4X3y74jzQfi
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 0
                                            [inclusive] => 
                                            [tax_rate] => txr_1RqEVuCDiOqgoJOUIcZLbys8
                                            [taxability_reason] => not_collecting
                                            [taxable_amount] => 0
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 0
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1RqEVuCDiOqgoJOUIcZLbys8
                                                )

                                            [taxability_reason] => not_collecting
                                            [taxable_amount] => 0
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => subscription
                            [unit_amount_excluding_tax] => 9900
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1RrJxJCDiOqgoJOUqVkOKWVW/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => 0GVZKWVT-0004
    [on_behalf_of] => 
    [paid] => 1
    [paid_out_of_band] => 
    [parent] => Array
        (
            [quote_details] => 
            [subscription_details] => Array
                (
                    [metadata] => Array
                        (
                        )

                    [subscription] => sub_1RqEWBCDiOqgoJOUaZQFv8DH
                )

            [type] => subscription_details
        )

    [payment_intent] => pi_3RrKuFCDiOqgoJOU1hWphNoT
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => Array
                (
                    [acss_debit] => 
                    [bancontact] => 
                    [card] => Array
                        (
                            [request_three_d_secure] => automatic
                        )

                    [customer_balance] => 
                    [konbini] => 
                    [sepa_debit] => 
                    [us_bank_account] => 
                )

            [payment_method_types] => 
        )

    [period_end] => 1754058517
    [period_start] => 1753972117
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => 
    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => paid
    [status_transitions] => Array
        (
            [finalized_at] => 1754062202
            [marked_uncollectible_at] => 
            [paid_at] => 1754062202
            [voided_at] => 
        )

    [subscription] => sub_1RqEWBCDiOqgoJOUaZQFv8DH
    [subscription_details] => Array
        (
            [metadata] => Array
                (
                )

        )

    [subtotal] => 9900
    [subtotal_excluding_tax] => 9900
    [tax] => 0
    [test_clock] => 
    [total] => 9900
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 9900
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 0
                    [inclusive] => 
                    [tax_rate] => txr_1RqEVuCDiOqgoJOUIcZLbys8
                    [taxability_reason] => not_collecting
                    [taxable_amount] => 0
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 0
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1RqEVuCDiOqgoJOUIcZLbys8
                        )

                    [taxability_reason] => not_collecting
                    [taxable_amount] => 0
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1754058549
)

[01-Aug-2025 15:30:09 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => 
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1754062209196
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[01-Aug-2025 15:30:09 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => 
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1754062209461
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[01-Aug-2025 15:30:09 UTC] Payment creation failed: Failed to find or create customer in QuickBooks
[01-Aug-2025 15:30:09 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-new/stripe-app/functions.php on line 392
[01-Aug-2025 15:34:10 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1RrKyDCDiOqgoJOUz1yxdyLe)
[01-Aug-2025 15:34:10 UTC] 1
[01-Aug-2025 15:34:10 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-new/stripe-app/functions.php on line 376
[01-Aug-2025 15:34:10 UTC] Starting payment process for Stripe invoice: evt_1RrKyDCDiOqgoJOUz1yxdyLe
[01-Aug-2025 15:34:10 UTC] Fetching Stripe invoice: in_1RrK1UCDiOqgoJOUhWWllILq
[01-Aug-2025 15:34:10 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RrK1UCDiOqgoJOUhWWllILq
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 10692
    [amount_overpaid] => 0
    [amount_paid] => 10692
    [amount_remaining] => 0
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 1
    [attempted] => 1
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 1
            [liability] => Array
                (
                    [type] => self
                )

            [provider] => stripe
            [status] => complete
        )

    [automatically_finalizes_at] => 
    [billing_reason] => subscription_cycle
    [charge] => ch_3RrKy9CDiOqgoJOU06KGUkvq
    [collection_method] => charge_automatically
    [created] => 1754058808
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_Slm8NRlbsGiXDU
    [customer_address] => Array
        (
            [city] => Alabama
            [country] => US
            [line1] => Alabama
            [line2] => Alabama
            [postal_code] => 35013
            [state] => AL
        )

    [customer_email] => dadad@fdfsdfs.fsdf
    [customer_name] => hh hhh
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 
    [effective_at] => 1754062444
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TbXRwYlVWazVqWUFoTExUSFRObTdlMDBLMk9oV3hTLDE0NDYwMzI1MA0200NOekveIJ?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TbXRwYlVWazVqWUFoTExUSFRObTdlMDBLMk9oV3hTLDE0NDYwMzI1MA0200NOekveIJ/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RrK1UCDiOqgoJOUaYL1THaq
                            [object] => line_item
                            [amount] => 9900
                            [amount_excluding_tax] => 9900
                            [currency] => usd
                            [description] => 1 × gggg (at $99.00 / day)
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RrK1UCDiOqgoJOUhWWllILq
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => 
                                    [subscription_item_details] => Array
                                        (
                                            [invoice_item] => 
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => sub_1RqEaWCDiOqgoJOU1evlKcYA
                                            [subscription_item] => si_Slm86PwjFirzFK
                                        )

                                    [type] => subscription_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1754145186
                                    [start] => 1754058786
                                )

                            [plan] => Array
                                (
                                    [id] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                    [object] => plan
                                    [active] => 1
                                    [aggregate_usage] => 
                                    [amount] => 9900
                                    [amount_decimal] => 9900
                                    [billing_scheme] => per_unit
                                    [created] => 1753345386
                                    [currency] => usd
                                    [interval] => day
                                    [interval_count] => 1
                                    [livemode] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [meter] => 
                                    [nickname] => 
                                    [product] => prod_Sjo2eLoEDhLJSz
                                    [tiers_mode] => 
                                    [transform_usage] => 
                                    [trial_period_days] => 
                                    [usage_type] => licensed
                                )

                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1753345386
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_Sjo2eLoEDhLJSz
                                    [recurring] => Array
                                        (
                                            [aggregate_usage] => 
                                            [interval] => day
                                            [interval_count] => 1
                                            [meter] => 
                                            [trial_period_days] => 
                                            [usage_type] => licensed
                                        )

                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => recurring
                                    [unit_amount] => 9900
                                    [unit_amount_decimal] => 9900
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                            [product] => prod_Sjo2eLoEDhLJSz
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 9900
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 1
                            [subscription] => sub_1RqEaWCDiOqgoJOU1evlKcYA
                            [subscription_item] => si_Slm86PwjFirzFK
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 792
                                            [inclusive] => 
                                            [tax_rate] => txr_1RmbmQCDiOqgoJOUVl6boLeV
                                            [taxability_reason] => standard_rated
                                            [taxable_amount] => 9900
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 792
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1RmbmQCDiOqgoJOUVl6boLeV
                                                )

                                            [taxability_reason] => standard_rated
                                            [taxable_amount] => 9900
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => subscription
                            [unit_amount_excluding_tax] => 9900
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1RrK1UCDiOqgoJOUhWWllILq/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => 8V92UGAM-0007
    [on_behalf_of] => 
    [paid] => 1
    [paid_out_of_band] => 
    [parent] => Array
        (
            [quote_details] => 
            [subscription_details] => Array
                (
                    [metadata] => Array
                        (
                        )

                    [subscription] => sub_1RqEaWCDiOqgoJOU1evlKcYA
                )

            [type] => subscription_details
        )

    [payment_intent] => pi_3RrKy9CDiOqgoJOU0O9TqKcr
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => Array
                (
                    [acss_debit] => 
                    [bancontact] => 
                    [card] => Array
                        (
                            [request_three_d_secure] => automatic
                        )

                    [customer_balance] => 
                    [konbini] => 
                    [sepa_debit] => 
                    [us_bank_account] => 
                )

            [payment_method_types] => 
        )

    [period_end] => 1754058786
    [period_start] => 1753972386
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => 
    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => paid
    [status_transitions] => Array
        (
            [finalized_at] => 1754062444
            [marked_uncollectible_at] => 
            [paid_at] => 1754062444
            [voided_at] => 
        )

    [subscription] => sub_1RqEaWCDiOqgoJOU1evlKcYA
    [subscription_details] => Array
        (
            [metadata] => Array
                (
                )

        )

    [subtotal] => 9900
    [subtotal_excluding_tax] => 9900
    [tax] => 792
    [test_clock] => 
    [total] => 10692
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 9900
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 792
                    [inclusive] => 
                    [tax_rate] => txr_1RmbmQCDiOqgoJOUVl6boLeV
                    [taxability_reason] => standard_rated
                    [taxable_amount] => 9900
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 792
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1RmbmQCDiOqgoJOUVl6boLeV
                        )

                    [taxability_reason] => standard_rated
                    [taxable_amount] => 9900
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1754058808
)

[01-Aug-2025 15:34:11 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => 
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1754062451262
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[01-Aug-2025 15:34:11 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => 
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1754062451447
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[01-Aug-2025 15:34:11 UTC] Payment creation failed: Failed to find or create customer in QuickBooks
[01-Aug-2025 15:34:11 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-new/stripe-app/functions.php on line 392
[01-Aug-2025 15:39:11 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1RrL35CDiOqgoJOUFLOIjAFk)
[01-Aug-2025 15:39:11 UTC] 1
[01-Aug-2025 15:39:11 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-new/stripe-app/functions.php on line 376
[01-Aug-2025 15:39:11 UTC] Starting payment process for Stripe invoice: evt_1RrL35CDiOqgoJOUFLOIjAFk
[01-Aug-2025 15:39:11 UTC] Fetching Stripe invoice: in_1RrK6pCDiOqgoJOUx8ksoR2J
[01-Aug-2025 15:39:11 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RrK6pCDiOqgoJOUx8ksoR2J
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 10989
    [amount_overpaid] => 0
    [amount_paid] => 10989
    [amount_remaining] => 0
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 1
    [attempted] => 1
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => subscription_cycle
    [charge] => ch_3RrL31CDiOqgoJOU0zSloptc
    [collection_method] => charge_automatically
    [created] => 1754059139
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_Sjo6INOhbQe0LI
    [customer_address] => Array
        (
            [city] => Alabama
            [country] => US
            [line1] => Alabama
            [line2] => Alabama
            [postal_code] => 35015
            [state] => AL
        )

    [customer_email] => nnnn@nnn.com
    [customer_name] => ggg ggg
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                    [object] => tax_rate
                    [active] => 1
                    [country] => US
                    [created] => 1752935198
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => AL
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 
    [effective_at] => 1754062746
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TbXR1ZkU5eGlOYkJLVXVjN1d2RG56cDVsc1oyUGZqLDE0NDYwMzU1MQ0200fyCCodCe?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TbXR1ZkU5eGlOYkJLVXVjN1d2RG56cDVsc1oyUGZqLDE0NDYwMzU1MQ0200fyCCodCe/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RrK6pCDiOqgoJOUmPvZBhVP
                            [object] => line_item
                            [amount] => 9900
                            [amount_excluding_tax] => 9900
                            [currency] => usd
                            [description] => 1 × gggg (at $99.00 / day)
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RrK6pCDiOqgoJOUx8ksoR2J
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => 
                                    [subscription_item_details] => Array
                                        (
                                            [invoice_item] => 
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => sub_1RqEfyCDiOqgoJOU1i6bjHNW
                                            [subscription_item] => si_SlmEK1QAiJodF9
                                        )

                                    [type] => subscription_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1754145526
                                    [start] => 1754059126
                                )

                            [plan] => Array
                                (
                                    [id] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                    [object] => plan
                                    [active] => 1
                                    [aggregate_usage] => 
                                    [amount] => 9900
                                    [amount_decimal] => 9900
                                    [billing_scheme] => per_unit
                                    [created] => 1753345386
                                    [currency] => usd
                                    [interval] => day
                                    [interval_count] => 1
                                    [livemode] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [meter] => 
                                    [nickname] => 
                                    [product] => prod_Sjo2eLoEDhLJSz
                                    [tiers_mode] => 
                                    [transform_usage] => 
                                    [trial_period_days] => 
                                    [usage_type] => licensed
                                )

                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1753345386
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_Sjo2eLoEDhLJSz
                                    [recurring] => Array
                                        (
                                            [aggregate_usage] => 
                                            [interval] => day
                                            [interval_count] => 1
                                            [meter] => 
                                            [trial_period_days] => 
                                            [usage_type] => licensed
                                        )

                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => recurring
                                    [unit_amount] => 9900
                                    [unit_amount_decimal] => 9900
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                            [product] => prod_Sjo2eLoEDhLJSz
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 9900
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 1
                            [subscription] => sub_1RqEfyCDiOqgoJOU1i6bjHNW
                            [subscription_item] => si_SlmEK1QAiJodF9
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1089
                                            [inclusive] => 
                                            [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                                            [taxability_reason] => 
                                            [taxable_amount] => 9900
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1089
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 9900
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => subscription
                            [unit_amount_excluding_tax] => 9900
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1RrK6pCDiOqgoJOUx8ksoR2J/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => HJAMRYO3-0050
    [on_behalf_of] => 
    [paid] => 1
    [paid_out_of_band] => 
    [parent] => Array
        (
            [quote_details] => 
            [subscription_details] => Array
                (
                    [metadata] => Array
                        (
                        )

                    [subscription] => sub_1RqEfyCDiOqgoJOU1i6bjHNW
                )

            [type] => subscription_details
        )

    [payment_intent] => pi_3RrL31CDiOqgoJOU0ZTOzG2k
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1754059126
    [period_start] => 1753972726
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => 
    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => paid
    [status_transitions] => Array
        (
            [finalized_at] => 1754062746
            [marked_uncollectible_at] => 
            [paid_at] => 1754062746
            [voided_at] => 
        )

    [subscription] => sub_1RqEfyCDiOqgoJOU1i6bjHNW
    [subscription_details] => Array
        (
            [metadata] => Array
                (
                )

        )

    [subtotal] => 9900
    [subtotal_excluding_tax] => 9900
    [tax] => 1089
    [test_clock] => 
    [total] => 10989
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 9900
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1089
                    [inclusive] => 
                    [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                    [taxability_reason] => 
                    [taxable_amount] => 9900
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1089
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 9900
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1754059139
)

[01-Aug-2025 15:39:12 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => 
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1754062752483
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[01-Aug-2025 15:39:12 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => 
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1754062752667
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[01-Aug-2025 15:39:12 UTC] Payment creation failed: Failed to find or create customer in QuickBooks
[01-Aug-2025 15:39:12 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-new/stripe-app/functions.php on line 392
[02-Aug-2025 09:27:28 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1RrbitCDiOqgoJOU0RubzqRZ)
[02-Aug-2025 09:27:28 UTC] 1
[02-Aug-2025 09:27:28 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-new/stripe-app/functions.php on line 376
[02-Aug-2025 09:27:28 UTC] Starting payment process for Stripe invoice: evt_1RrbitCDiOqgoJOU0RubzqRZ
[02-Aug-2025 09:27:28 UTC] Fetching Stripe invoice: in_1RralxCDiOqgoJOUFf0qKote
[02-Aug-2025 09:27:28 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RralxCDiOqgoJOUFf0qKote
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 10692
    [amount_overpaid] => 0
    [amount_paid] => 10692
    [amount_remaining] => 0
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 1
    [attempted] => 1
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 1
            [liability] => Array
                (
                    [type] => self
                )

            [provider] => stripe
            [status] => complete
        )

    [automatically_finalizes_at] => 
    [billing_reason] => subscription_cycle
    [charge] => ch_3RrbipCDiOqgoJOU172DcvsI
    [collection_method] => charge_automatically
    [created] => 1754123193
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_Sjo6INOhbQe0LI
    [customer_address] => Array
        (
            [city] => Alabama
            [country] => US
            [line1] => Alabama
            [line2] => Alabama
            [postal_code] => 35015
            [state] => AL
        )

    [customer_email] => nnnn@nnn.com
    [customer_name] => ggg ggg
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 
    [effective_at] => 1754126842
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TbkI4aEFNd3o4UXIxRzJyeFY1cWpWSU02WDRTdjAwLDE0NDY2NzY0OA0200gaTYH8EW?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TbkI4aEFNd3o4UXIxRzJyeFY1cWpWSU02WDRTdjAwLDE0NDY2NzY0OA0200gaTYH8EW/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RralxCDiOqgoJOUuYBCShSw
                            [object] => line_item
                            [amount] => 9900
                            [amount_excluding_tax] => 9900
                            [currency] => usd
                            [description] => 1 × gggg (at $99.00 / day)
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RralxCDiOqgoJOUFf0qKote
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => 
                                    [subscription_item_details] => Array
                                        (
                                            [invoice_item] => 
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => sub_1RoKTvCDiOqgoJOUd5FTQcFJ
                                            [subscription_item] => si_Sjo66pvsdF6HWb
                                        )

                                    [type] => subscription_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1754209585
                                    [start] => 1754123185
                                )

                            [plan] => Array
                                (
                                    [id] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                    [object] => plan
                                    [active] => 1
                                    [aggregate_usage] => 
                                    [amount] => 9900
                                    [amount_decimal] => 9900
                                    [billing_scheme] => per_unit
                                    [created] => 1753345386
                                    [currency] => usd
                                    [interval] => day
                                    [interval_count] => 1
                                    [livemode] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [meter] => 
                                    [nickname] => 
                                    [product] => prod_Sjo2eLoEDhLJSz
                                    [tiers_mode] => 
                                    [transform_usage] => 
                                    [trial_period_days] => 
                                    [usage_type] => licensed
                                )

                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1753345386
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_Sjo2eLoEDhLJSz
                                    [recurring] => Array
                                        (
                                            [aggregate_usage] => 
                                            [interval] => day
                                            [interval_count] => 1
                                            [meter] => 
                                            [trial_period_days] => 
                                            [usage_type] => licensed
                                        )

                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => recurring
                                    [unit_amount] => 9900
                                    [unit_amount_decimal] => 9900
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                            [product] => prod_Sjo2eLoEDhLJSz
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 9900
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 1
                            [subscription] => sub_1RoKTvCDiOqgoJOUd5FTQcFJ
                            [subscription_item] => si_Sjo66pvsdF6HWb
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 792
                                            [inclusive] => 
                                            [tax_rate] => txr_1RmbmQCDiOqgoJOUVl6boLeV
                                            [taxability_reason] => standard_rated
                                            [taxable_amount] => 9900
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 792
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1RmbmQCDiOqgoJOUVl6boLeV
                                                )

                                            [taxability_reason] => standard_rated
                                            [taxable_amount] => 9900
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => subscription
                            [unit_amount_excluding_tax] => 9900
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1RralxCDiOqgoJOUFf0qKote/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => HJAMRYO3-0051
    [on_behalf_of] => 
    [paid] => 1
    [paid_out_of_band] => 
    [parent] => Array
        (
            [quote_details] => 
            [subscription_details] => Array
                (
                    [metadata] => Array
                        (
                        )

                    [subscription] => sub_1RoKTvCDiOqgoJOUd5FTQcFJ
                )

            [type] => subscription_details
        )

    [payment_intent] => pi_3RrbipCDiOqgoJOU1UmVijem
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => Array
                (
                    [acss_debit] => 
                    [bancontact] => 
                    [card] => Array
                        (
                            [request_three_d_secure] => automatic
                        )

                    [customer_balance] => 
                    [konbini] => 
                    [sepa_debit] => 
                    [us_bank_account] => 
                )

            [payment_method_types] => 
        )

    [period_end] => 1754123185
    [period_start] => 1754036785
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => 
    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => paid
    [status_transitions] => Array
        (
            [finalized_at] => 1754126842
            [marked_uncollectible_at] => 
            [paid_at] => 1754126842
            [voided_at] => 
        )

    [subscription] => sub_1RoKTvCDiOqgoJOUd5FTQcFJ
    [subscription_details] => Array
        (
            [metadata] => Array
                (
                )

        )

    [subtotal] => 9900
    [subtotal_excluding_tax] => 9900
    [tax] => 792
    [test_clock] => 
    [total] => 10692
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 9900
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 792
                    [inclusive] => 
                    [tax_rate] => txr_1RmbmQCDiOqgoJOUVl6boLeV
                    [taxability_reason] => standard_rated
                    [taxable_amount] => 9900
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 792
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1RmbmQCDiOqgoJOUVl6boLeV
                        )

                    [taxability_reason] => standard_rated
                    [taxable_amount] => 9900
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1754123193
)

[02-Aug-2025 09:27:29 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => 
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1754126849420
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[02-Aug-2025 09:27:29 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => 
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1754126849619
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[02-Aug-2025 09:27:29 UTC] Payment creation failed: Failed to find or create customer in QuickBooks
[02-Aug-2025 09:27:29 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-new/stripe-app/functions.php on line 392
[02-Aug-2025 09:40:01 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1Rrbv3CDiOqgoJOURYpDDFyU)
[02-Aug-2025 09:40:01 UTC] 1
[02-Aug-2025 09:40:01 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-new/stripe-app/functions.php on line 376
[02-Aug-2025 09:40:01 UTC] Starting payment process for Stripe invoice: evt_1Rrbv3CDiOqgoJOURYpDDFyU
[02-Aug-2025 09:40:01 UTC] Fetching Stripe invoice: in_1RrayLCDiOqgoJOUVmbyI9Rq
[02-Aug-2025 09:40:02 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RrayLCDiOqgoJOUVmbyI9Rq
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 10989
    [amount_overpaid] => 0
    [amount_paid] => 10989
    [amount_remaining] => 0
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 1
    [attempted] => 1
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => subscription_cycle
    [charge] => ch_3RrbuzCDiOqgoJOU153pA7Dr
    [collection_method] => charge_automatically
    [created] => 1754123961
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_Sjo6INOhbQe0LI
    [customer_address] => Array
        (
            [city] => Alabama
            [country] => US
            [line1] => Alabama
            [line2] => Alabama
            [postal_code] => 35015
            [state] => AL
        )

    [customer_email] => nnnn@nnn.com
    [customer_name] => ggg ggg
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                    [object] => tax_rate
                    [active] => 1
                    [country] => US
                    [created] => 1752935198
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => AL
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 
    [effective_at] => 1754127596
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TbkJMcmdEOFNJcFZJT28yZzJIell4TXAySDRBSUFHLDE0NDY2ODQwMQ0200hIUpMQHJ?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TbkJMcmdEOFNJcFZJT28yZzJIell4TXAySDRBSUFHLDE0NDY2ODQwMQ0200hIUpMQHJ/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RrayLCDiOqgoJOUNB3bxf1f
                            [object] => line_item
                            [amount] => 9900
                            [amount_excluding_tax] => 9900
                            [currency] => usd
                            [description] => 1 × gggg (at $99.00 / day)
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RrayLCDiOqgoJOUVmbyI9Rq
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => 
                                    [subscription_item_details] => Array
                                        (
                                            [invoice_item] => 
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => sub_1RoKfkCDiOqgoJOUGvl9Rewo
                                            [subscription_item] => si_SjoIBZzvFFhJW6
                                        )

                                    [type] => subscription_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1754210320
                                    [start] => 1754123920
                                )

                            [plan] => Array
                                (
                                    [id] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                    [object] => plan
                                    [active] => 1
                                    [aggregate_usage] => 
                                    [amount] => 9900
                                    [amount_decimal] => 9900
                                    [billing_scheme] => per_unit
                                    [created] => 1753345386
                                    [currency] => usd
                                    [interval] => day
                                    [interval_count] => 1
                                    [livemode] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [meter] => 
                                    [nickname] => 
                                    [product] => prod_Sjo2eLoEDhLJSz
                                    [tiers_mode] => 
                                    [transform_usage] => 
                                    [trial_period_days] => 
                                    [usage_type] => licensed
                                )

                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1753345386
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_Sjo2eLoEDhLJSz
                                    [recurring] => Array
                                        (
                                            [aggregate_usage] => 
                                            [interval] => day
                                            [interval_count] => 1
                                            [meter] => 
                                            [trial_period_days] => 
                                            [usage_type] => licensed
                                        )

                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => recurring
                                    [unit_amount] => 9900
                                    [unit_amount_decimal] => 9900
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                            [product] => prod_Sjo2eLoEDhLJSz
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 9900
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 1
                            [subscription] => sub_1RoKfkCDiOqgoJOUGvl9Rewo
                            [subscription_item] => si_SjoIBZzvFFhJW6
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1089
                                            [inclusive] => 
                                            [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                                            [taxability_reason] => 
                                            [taxable_amount] => 9900
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1089
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 9900
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => subscription
                            [unit_amount_excluding_tax] => 9900
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1RrayLCDiOqgoJOUVmbyI9Rq/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => HJAMRYO3-0052
    [on_behalf_of] => 
    [paid] => 1
    [paid_out_of_band] => 
    [parent] => Array
        (
            [quote_details] => 
            [subscription_details] => Array
                (
                    [metadata] => Array
                        (
                        )

                    [subscription] => sub_1RoKfkCDiOqgoJOUGvl9Rewo
                )

            [type] => subscription_details
        )

    [payment_intent] => pi_3RrbuzCDiOqgoJOU1AdD4kz6
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1754123920
    [period_start] => 1754037520
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => 
    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => paid
    [status_transitions] => Array
        (
            [finalized_at] => 1754127596
            [marked_uncollectible_at] => 
            [paid_at] => 1754127596
            [voided_at] => 
        )

    [subscription] => sub_1RoKfkCDiOqgoJOUGvl9Rewo
    [subscription_details] => Array
        (
            [metadata] => Array
                (
                )

        )

    [subtotal] => 9900
    [subtotal_excluding_tax] => 9900
    [tax] => 1089
    [test_clock] => 
    [total] => 10989
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 9900
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1089
                    [inclusive] => 
                    [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                    [taxability_reason] => 
                    [taxable_amount] => 9900
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1089
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 9900
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1754123961
)

[02-Aug-2025 09:40:02 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => 
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1754127602676
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[02-Aug-2025 09:40:02 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => 
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1754127602888
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[02-Aug-2025 09:40:02 UTC] Payment creation failed: Failed to find or create customer in QuickBooks
[02-Aug-2025 09:40:02 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-new/stripe-app/functions.php on line 392
[02-Aug-2025 10:02:26 UTC] PHP Fatal error:  Uncaught mysqli_sql_exception: Table 'wdsklsxvqb_stripe_test.qb_deposit_accounts' doesn't exist in /home/wdsklsxvqb/automationv.com/stripe-new/stripe-app/sync-settings.php:163
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-new/stripe-app/sync-settings.php(163): mysqli->query()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-new/stripe-app/sync-settings.php on line 163
[02-Aug-2025 10:05:25 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1Rrbv3CDiOqgoJOURYpDDFyU)
[02-Aug-2025 10:05:25 UTC] 1
[02-Aug-2025 10:05:25 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-new/stripe-app/functions.php on line 376
[02-Aug-2025 10:05:25 UTC] Starting payment process for Stripe invoice: evt_1Rrbv3CDiOqgoJOURYpDDFyU
[02-Aug-2025 10:05:25 UTC] Fetching Stripe invoice: in_1RrayLCDiOqgoJOUVmbyI9Rq
[02-Aug-2025 10:05:25 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RrayLCDiOqgoJOUVmbyI9Rq
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 10989
    [amount_overpaid] => 0
    [amount_paid] => 10989
    [amount_remaining] => 0
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 1
    [attempted] => 1
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => subscription_cycle
    [charge] => ch_3RrbuzCDiOqgoJOU153pA7Dr
    [collection_method] => charge_automatically
    [created] => 1754123961
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_Sjo6INOhbQe0LI
    [customer_address] => Array
        (
            [city] => Alabama
            [country] => US
            [line1] => Alabama
            [line2] => Alabama
            [postal_code] => 35015
            [state] => AL
        )

    [customer_email] => nnnn@nnn.com
    [customer_name] => ggg ggg
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                    [object] => tax_rate
                    [active] => 1
                    [country] => US
                    [created] => 1752935198
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => AL
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 
    [effective_at] => 1754127596
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TbkJMcmdEOFNJcFZJT28yZzJIell4TXAySDRBSUFHLDE0NDY2OTkyNQ0200ihAurklX?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TbkJMcmdEOFNJcFZJT28yZzJIell4TXAySDRBSUFHLDE0NDY2OTkyNQ0200ihAurklX/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RrayLCDiOqgoJOUNB3bxf1f
                            [object] => line_item
                            [amount] => 9900
                            [amount_excluding_tax] => 9900
                            [currency] => usd
                            [description] => 1 × gggg (at $99.00 / day)
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RrayLCDiOqgoJOUVmbyI9Rq
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => 
                                    [subscription_item_details] => Array
                                        (
                                            [invoice_item] => 
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => sub_1RoKfkCDiOqgoJOUGvl9Rewo
                                            [subscription_item] => si_SjoIBZzvFFhJW6
                                        )

                                    [type] => subscription_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1754210320
                                    [start] => 1754123920
                                )

                            [plan] => Array
                                (
                                    [id] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                    [object] => plan
                                    [active] => 1
                                    [aggregate_usage] => 
                                    [amount] => 9900
                                    [amount_decimal] => 9900
                                    [billing_scheme] => per_unit
                                    [created] => 1753345386
                                    [currency] => usd
                                    [interval] => day
                                    [interval_count] => 1
                                    [livemode] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [meter] => 
                                    [nickname] => 
                                    [product] => prod_Sjo2eLoEDhLJSz
                                    [tiers_mode] => 
                                    [transform_usage] => 
                                    [trial_period_days] => 
                                    [usage_type] => licensed
                                )

                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1753345386
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_Sjo2eLoEDhLJSz
                                    [recurring] => Array
                                        (
                                            [aggregate_usage] => 
                                            [interval] => day
                                            [interval_count] => 1
                                            [meter] => 
                                            [trial_period_days] => 
                                            [usage_type] => licensed
                                        )

                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => recurring
                                    [unit_amount] => 9900
                                    [unit_amount_decimal] => 9900
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                            [product] => prod_Sjo2eLoEDhLJSz
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 9900
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 1
                            [subscription] => sub_1RoKfkCDiOqgoJOUGvl9Rewo
                            [subscription_item] => si_SjoIBZzvFFhJW6
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1089
                                            [inclusive] => 
                                            [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                                            [taxability_reason] => 
                                            [taxable_amount] => 9900
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1089
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 9900
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => subscription
                            [unit_amount_excluding_tax] => 9900
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1RrayLCDiOqgoJOUVmbyI9Rq/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => HJAMRYO3-0052
    [on_behalf_of] => 
    [paid] => 1
    [paid_out_of_band] => 
    [parent] => Array
        (
            [quote_details] => 
            [subscription_details] => Array
                (
                    [metadata] => Array
                        (
                        )

                    [subscription] => sub_1RoKfkCDiOqgoJOUGvl9Rewo
                )

            [type] => subscription_details
        )

    [payment_intent] => pi_3RrbuzCDiOqgoJOU1AdD4kz6
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1754123920
    [period_start] => 1754037520
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => 
    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => paid
    [status_transitions] => Array
        (
            [finalized_at] => 1754127596
            [marked_uncollectible_at] => 
            [paid_at] => 1754127596
            [voided_at] => 
        )

    [subscription] => sub_1RoKfkCDiOqgoJOUGvl9Rewo
    [subscription_details] => Array
        (
            [metadata] => Array
                (
                )

        )

    [subtotal] => 9900
    [subtotal_excluding_tax] => 9900
    [tax] => 1089
    [test_clock] => 
    [total] => 10989
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 9900
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1089
                    [inclusive] => 
                    [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                    [taxability_reason] => 
                    [taxable_amount] => 9900
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1089
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 9900
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1754123961
)

[02-Aug-2025 10:05:26 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 385.94
                                    [BalanceWithJobs] => 385.94
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 1
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-08-01T02:22:47-07:00
                                            [LastUpdatedTime] => 2025-08-01T03:05:20-07:00
                                        )

                                    [GivenName] => ggg ggg
                                    [FamilyName] => ggg ggg
                                    [FullyQualifiedName] => ggg ggg(nnnn@nnn.com)
                                    [DisplayName] => ggg ggg(nnnn@nnn.com)
                                    [PrintOnCheckName] => ggg ggg ggg ggg
                                    [Active] => 1
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => nnnn@nnn.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-08-02T03:05:26.032-07:00
        )

)

[02-Aug-2025 10:05:26 UTC] Using QBO customer ID: 1
[02-Aug-2025 10:05:26 UTC] No existing QBO invoice found, creating new one
[02-Aug-2025 10:05:26 UTC] Creating new QBO invoice with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 1
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 99
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 4
                                )

                            [UnitPrice] => 99
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-08-02
    [DueDate] => 2025-09-01
    [TotalAmt] => 109.89
    [PrivateNote] => Stripe Invoice ID: in_1RrayLCDiOqgoJOUVmbyI9Rq
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 10.89
        )

)

[02-Aug-2025 10:05:27 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 5
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-08-02T03:05:27-07:00
                            [LastUpdatedTime] => 2025-08-02T03:05:27-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-08-02
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Invoice ID: in_1RrayLCDiOqgoJOUVmbyI9Rq
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 99
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 4
                                                    [name] => 1 × gggg (at $99.00 / day)
                                                )

                                            [UnitPrice] => 99
                                            [Qty] => 1
                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 99
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 3
                                )

                            [TotalTax] => 10.89
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 1.19
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 4
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 2.25
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 5
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.875
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 7.45
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 3
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 1
                            [name] => ggg ggg(nnnn@nnn.com)
                        )

                    [DueDate] => 2025-09-01
                    [TotalAmt] => 109.89
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 109.89
                )

            [time] => 2025-08-02T03:05:26.768-07:00
        )

)

[02-Aug-2025 10:05:27 UTC] Created new QBO invoice ID: 5
[02-Aug-2025 10:05:28 UTC] Failed to create payment method: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Invalid Enumeration
                                    [Detail] => Invalid Enumeration : OTHER
                                    [code] => 2170
                                    [element] => Type
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-08-02T03:05:28.688-07:00
        )

)

[02-Aug-2025 10:05:29 UTC] Creating QBO payment with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 1
        )

    [TotalAmt] => 109.89
    [TxnDate] => 2025-08-02
    [PaymentRefNum] => pi_3RrbuzCDiOqgoJOU1A
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

    [PrivateNote] => Stripe Invoice ID: in_1RrayLCDiOqgoJOUVmbyI9Rq
    [Line] => Array
        (
            [0] => Array
                (
                    [Amount] => 109.89
                    [LinkedTxn] => Array
                        (
                            [0] => Array
                                (
                                    [TxnId] => 5
                                    [TxnType] => Invoice
                                )

                        )

                )

        )

)

[02-Aug-2025 10:05:29 UTC] QBO API response: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Invalid account type used
                                    [Detail] => Invalid account type: Check your account details before you continue. You may need to select a different type of account for your transaction.
                                    [code] => 6430
                                    [element] => 
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-08-02T03:05:29.269-07:00
        )

)

[02-Aug-2025 10:05:29 UTC] Payment creation failed: Failed to create payment in QuickBooks
[02-Aug-2025 10:05:29 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-new/stripe-app/functions.php on line 392
[02-Aug-2025 10:05:50 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1RrcK1CDiOqgoJOUhCdqBVYG)
[02-Aug-2025 10:05:50 UTC] 1
[02-Aug-2025 10:05:50 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-new/stripe-app/functions.php on line 376
[02-Aug-2025 10:05:50 UTC] Starting payment process for Stripe invoice: evt_1RrcK1CDiOqgoJOUhCdqBVYG
[02-Aug-2025 10:05:50 UTC] Fetching Stripe invoice: in_1RrbNQCDiOqgoJOUxGYIzyOh
[02-Aug-2025 10:05:50 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RrbNQCDiOqgoJOUxGYIzyOh
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 9900
    [amount_overpaid] => 0
    [amount_paid] => 9900
    [amount_remaining] => 0
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 1
    [attempted] => 1
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => subscription_cycle
    [charge] => ch_3RrcJyCDiOqgoJOU1FE4C3TH
    [collection_method] => charge_automatically
    [created] => 1754125516
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_Sjo6INOhbQe0LI
    [customer_address] => Array
        (
            [city] => Alabama
            [country] => US
            [line1] => Alabama
            [line2] => Alabama
            [postal_code] => 35015
            [state] => AL
        )

    [customer_email] => nnnn@nnn.com
    [customer_name] => ggg ggg
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 
    [effective_at] => 1754129145
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TbkJrc2ZWNTBVRkpPcFNlWDl6Vkd3dFRhNHNnaXBZLDE0NDY2OTk1MA0200jsczx2Hk?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TbkJrc2ZWNTBVRkpPcFNlWDl6Vkd3dFRhNHNnaXBZLDE0NDY2OTk1MA0200jsczx2Hk/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RrbNQCDiOqgoJOUtpU4LdDC
                            [object] => line_item
                            [amount] => 9900
                            [amount_excluding_tax] => 9900
                            [currency] => usd
                            [description] => 1 × gggg (at $99.00 / day)
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RrbNQCDiOqgoJOUxGYIzyOh
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => 
                                    [subscription_item_details] => Array
                                        (
                                            [invoice_item] => 
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => sub_1RoL5BCDiOqgoJOUERXWJlJ3
                                            [subscription_item] => si_SjoiWj90tuieYN
                                        )

                                    [type] => subscription_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1754211897
                                    [start] => 1754125497
                                )

                            [plan] => Array
                                (
                                    [id] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                    [object] => plan
                                    [active] => 1
                                    [aggregate_usage] => 
                                    [amount] => 9900
                                    [amount_decimal] => 9900
                                    [billing_scheme] => per_unit
                                    [created] => 1753345386
                                    [currency] => usd
                                    [interval] => day
                                    [interval_count] => 1
                                    [livemode] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [meter] => 
                                    [nickname] => 
                                    [product] => prod_Sjo2eLoEDhLJSz
                                    [tiers_mode] => 
                                    [transform_usage] => 
                                    [trial_period_days] => 
                                    [usage_type] => licensed
                                )

                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1753345386
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_Sjo2eLoEDhLJSz
                                    [recurring] => Array
                                        (
                                            [aggregate_usage] => 
                                            [interval] => day
                                            [interval_count] => 1
                                            [meter] => 
                                            [trial_period_days] => 
                                            [usage_type] => licensed
                                        )

                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => recurring
                                    [unit_amount] => 9900
                                    [unit_amount_decimal] => 9900
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                            [product] => prod_Sjo2eLoEDhLJSz
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 9900
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 1
                            [subscription] => sub_1RoL5BCDiOqgoJOUERXWJlJ3
                            [subscription_item] => si_SjoiWj90tuieYN
                            [tax_amounts] => Array
                                (
                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                )

                            [type] => subscription
                            [unit_amount_excluding_tax] => 9900
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1RrbNQCDiOqgoJOUxGYIzyOh/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => HJAMRYO3-0053
    [on_behalf_of] => 
    [paid] => 1
    [paid_out_of_band] => 
    [parent] => Array
        (
            [quote_details] => 
            [subscription_details] => Array
                (
                    [metadata] => Array
                        (
                        )

                    [subscription] => sub_1RoL5BCDiOqgoJOUERXWJlJ3
                )

            [type] => subscription_details
        )

    [payment_intent] => pi_3RrcJyCDiOqgoJOU1zcj5Izi
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1754125497
    [period_start] => 1754039097
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => 
    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => paid
    [status_transitions] => Array
        (
            [finalized_at] => 1754129145
            [marked_uncollectible_at] => 
            [paid_at] => 1754129145
            [voided_at] => 
        )

    [subscription] => sub_1RoL5BCDiOqgoJOUERXWJlJ3
    [subscription_details] => Array
        (
            [metadata] => Array
                (
                )

        )

    [subtotal] => 9900
    [subtotal_excluding_tax] => 9900
    [tax] => 
    [test_clock] => 
    [total] => 9900
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 9900
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
        )

    [total_taxes] => Array
        (
        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1754125516
)

[02-Aug-2025 10:05:51 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 495.83
                                    [BalanceWithJobs] => 495.83
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 1
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-08-01T02:22:47-07:00
                                            [LastUpdatedTime] => 2025-08-02T03:05:28-07:00
                                        )

                                    [GivenName] => ggg ggg
                                    [FamilyName] => ggg ggg
                                    [FullyQualifiedName] => ggg ggg(nnnn@nnn.com)
                                    [DisplayName] => ggg ggg(nnnn@nnn.com)
                                    [PrintOnCheckName] => ggg ggg ggg ggg
                                    [Active] => 1
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => nnnn@nnn.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-08-02T03:05:51.096-07:00
        )

)

[02-Aug-2025 10:05:51 UTC] Using QBO customer ID: 1
[02-Aug-2025 10:05:51 UTC] No existing QBO invoice found, creating new one
[02-Aug-2025 10:05:51 UTC] Creating new QBO invoice with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 1
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 99
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 4
                                )

                            [UnitPrice] => 99
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => NON
                                )

                        )

                )

        )

    [TxnDate] => 2025-08-02
    [DueDate] => 2025-09-01
    [TotalAmt] => 99
    [PrivateNote] => Stripe Invoice ID: in_1RrbNQCDiOqgoJOUxGYIzyOh
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
)

[02-Aug-2025 10:05:52 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 6
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-08-02T03:05:52-07:00
                            [LastUpdatedTime] => 2025-08-02T03:05:52-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-08-02
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Invoice ID: in_1RrbNQCDiOqgoJOUxGYIzyOh
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 99
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 4
                                                    [name] => 1 × gggg (at $99.00 / day)
                                                )

                                            [UnitPrice] => 99
                                            [Qty] => 1
                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => NON
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 99
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 3
                                )

                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 4
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 5
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.875
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 3
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 1
                            [name] => ggg ggg(nnnn@nnn.com)
                        )

                    [DueDate] => 2025-09-01
                    [TotalAmt] => 99
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 99
                )

            [time] => 2025-08-02T03:05:51.710-07:00
        )

)

[02-Aug-2025 10:05:52 UTC] Created new QBO invoice ID: 6
[02-Aug-2025 10:05:53 UTC] Failed to create payment method: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Invalid Enumeration
                                    [Detail] => Invalid Enumeration : OTHER
                                    [code] => 2170
                                    [element] => Type
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-08-02T03:05:53.197-07:00
        )

)

[02-Aug-2025 10:05:53 UTC] Creating QBO payment with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 1
        )

    [TotalAmt] => 99
    [TxnDate] => 2025-08-02
    [PaymentRefNum] => pi_3RrcJyCDiOqgoJOU1z
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [DepositToAccountRef] => Array
        (
            [value] => 4
        )

    [PrivateNote] => Stripe Invoice ID: in_1RrbNQCDiOqgoJOUxGYIzyOh
    [Line] => Array
        (
            [0] => Array
                (
                    [Amount] => 99
                    [LinkedTxn] => Array
                        (
                            [0] => Array
                                (
                                    [TxnId] => 6
                                    [TxnType] => Invoice
                                )

                        )

                )

        )

)

[02-Aug-2025 10:05:54 UTC] QBO API response: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Invalid account type used
                                    [Detail] => Invalid account type: Check your account details before you continue. You may need to select a different type of account for your transaction.
                                    [code] => 6430
                                    [element] => 
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-08-02T03:05:53.870-07:00
        )

)

[02-Aug-2025 10:05:54 UTC] Payment creation failed: Failed to create payment in QuickBooks
[02-Aug-2025 10:05:54 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-new/stripe-app/functions.php on line 392
[02-Aug-2025 10:14:24 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1Rrbv3CDiOqgoJOURYpDDFyU)
[02-Aug-2025 10:14:24 UTC] 1
[02-Aug-2025 10:14:24 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-new/stripe-app/functions.php on line 376
[02-Aug-2025 10:14:24 UTC] Starting payment process for Stripe invoice: evt_1Rrbv3CDiOqgoJOURYpDDFyU
[02-Aug-2025 10:14:24 UTC] Fetching Stripe invoice: in_1RrayLCDiOqgoJOUVmbyI9Rq
[02-Aug-2025 10:14:24 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RrayLCDiOqgoJOUVmbyI9Rq
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 10989
    [amount_overpaid] => 0
    [amount_paid] => 10989
    [amount_remaining] => 0
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 1
    [attempted] => 1
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => subscription_cycle
    [charge] => ch_3RrbuzCDiOqgoJOU153pA7Dr
    [collection_method] => charge_automatically
    [created] => 1754123961
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_Sjo6INOhbQe0LI
    [customer_address] => Array
        (
            [city] => Alabama
            [country] => US
            [line1] => Alabama
            [line2] => Alabama
            [postal_code] => 35015
            [state] => AL
        )

    [customer_email] => nnnn@nnn.com
    [customer_name] => ggg ggg
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                    [object] => tax_rate
                    [active] => 1
                    [country] => US
                    [created] => 1752935198
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => AL
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 
    [effective_at] => 1754127596
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TbkJMcmdEOFNJcFZJT28yZzJIell4TXAySDRBSUFHLDE0NDY3MDQ2NA0200VUJ8M3sn?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TbkJMcmdEOFNJcFZJT28yZzJIell4TXAySDRBSUFHLDE0NDY3MDQ2NA0200VUJ8M3sn/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RrayLCDiOqgoJOUNB3bxf1f
                            [object] => line_item
                            [amount] => 9900
                            [amount_excluding_tax] => 9900
                            [currency] => usd
                            [description] => 1 × gggg (at $99.00 / day)
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RrayLCDiOqgoJOUVmbyI9Rq
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => 
                                    [subscription_item_details] => Array
                                        (
                                            [invoice_item] => 
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => sub_1RoKfkCDiOqgoJOUGvl9Rewo
                                            [subscription_item] => si_SjoIBZzvFFhJW6
                                        )

                                    [type] => subscription_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1754210320
                                    [start] => 1754123920
                                )

                            [plan] => Array
                                (
                                    [id] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                    [object] => plan
                                    [active] => 1
                                    [aggregate_usage] => 
                                    [amount] => 9900
                                    [amount_decimal] => 9900
                                    [billing_scheme] => per_unit
                                    [created] => 1753345386
                                    [currency] => usd
                                    [interval] => day
                                    [interval_count] => 1
                                    [livemode] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [meter] => 
                                    [nickname] => 
                                    [product] => prod_Sjo2eLoEDhLJSz
                                    [tiers_mode] => 
                                    [transform_usage] => 
                                    [trial_period_days] => 
                                    [usage_type] => licensed
                                )

                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1753345386
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_Sjo2eLoEDhLJSz
                                    [recurring] => Array
                                        (
                                            [aggregate_usage] => 
                                            [interval] => day
                                            [interval_count] => 1
                                            [meter] => 
                                            [trial_period_days] => 
                                            [usage_type] => licensed
                                        )

                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => recurring
                                    [unit_amount] => 9900
                                    [unit_amount_decimal] => 9900
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                            [product] => prod_Sjo2eLoEDhLJSz
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 9900
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 1
                            [subscription] => sub_1RoKfkCDiOqgoJOUGvl9Rewo
                            [subscription_item] => si_SjoIBZzvFFhJW6
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1089
                                            [inclusive] => 
                                            [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                                            [taxability_reason] => 
                                            [taxable_amount] => 9900
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1089
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 9900
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => subscription
                            [unit_amount_excluding_tax] => 9900
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1RrayLCDiOqgoJOUVmbyI9Rq/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => HJAMRYO3-0052
    [on_behalf_of] => 
    [paid] => 1
    [paid_out_of_band] => 
    [parent] => Array
        (
            [quote_details] => 
            [subscription_details] => Array
                (
                    [metadata] => Array
                        (
                        )

                    [subscription] => sub_1RoKfkCDiOqgoJOUGvl9Rewo
                )

            [type] => subscription_details
        )

    [payment_intent] => pi_3RrbuzCDiOqgoJOU1AdD4kz6
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1754123920
    [period_start] => 1754037520
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => 
    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => paid
    [status_transitions] => Array
        (
            [finalized_at] => 1754127596
            [marked_uncollectible_at] => 
            [paid_at] => 1754127596
            [voided_at] => 
        )

    [subscription] => sub_1RoKfkCDiOqgoJOUGvl9Rewo
    [subscription_details] => Array
        (
            [metadata] => Array
                (
                )

        )

    [subtotal] => 9900
    [subtotal_excluding_tax] => 9900
    [tax] => 1089
    [test_clock] => 
    [total] => 10989
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 9900
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1089
                    [inclusive] => 
                    [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                    [taxability_reason] => 
                    [taxable_amount] => 9900
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1089
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 9900
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1754123961
)

[02-Aug-2025 10:14:25 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 594.83
                                    [BalanceWithJobs] => 594.83
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 1
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-08-01T02:22:47-07:00
                                            [LastUpdatedTime] => 2025-08-02T03:05:52-07:00
                                        )

                                    [GivenName] => ggg ggg
                                    [FamilyName] => ggg ggg
                                    [FullyQualifiedName] => ggg ggg(nnnn@nnn.com)
                                    [DisplayName] => ggg ggg(nnnn@nnn.com)
                                    [PrintOnCheckName] => ggg ggg ggg ggg
                                    [Active] => 1
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => nnnn@nnn.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-08-02T03:14:25.783-07:00
        )

)

[02-Aug-2025 10:14:25 UTC] Using QBO customer ID: 1
[02-Aug-2025 10:14:25 UTC] Found existing QBO invoice ID: 5
[02-Aug-2025 10:14:26 UTC] Failed to create payment method: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Invalid Enumeration
                                    [Detail] => Invalid Enumeration : OTHER
                                    [code] => 2170
                                    [element] => Type
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-08-02T03:14:26.840-07:00
        )

)

[02-Aug-2025 10:14:26 UTC] Creating QBO payment with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 1
        )

    [TotalAmt] => 109.89
    [TxnDate] => 2025-08-02
    [PaymentRefNum] => pi_3RrbuzCDiOqgoJOU1A
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [DepositToAccountRef] => Array
        (
            [value] => 16
        )

    [PrivateNote] => Stripe Invoice ID: in_1RrayLCDiOqgoJOUVmbyI9Rq
    [Line] => Array
        (
            [0] => Array
                (
                    [Amount] => 109.89
                    [LinkedTxn] => Array
                        (
                            [0] => Array
                                (
                                    [TxnId] => 5
                                    [TxnType] => Invoice
                                )

                        )

                )

        )

)

[02-Aug-2025 10:14:27 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Payment] => Array
                (
                    [CustomerRef] => Array
                        (
                            [value] => 1
                            [name] => ggg ggg(nnnn@nnn.com)
                        )

                    [DepositToAccountRef] => Array
                        (
                            [value] => 16
                        )

                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                        )

                    [PaymentRefNum] => pi_3RrbuzCDiOqgoJOU1A
                    [TotalAmt] => 109.89
                    [UnappliedAmt] => 0
                    [ProcessPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 7
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-08-02T03:14:27-07:00
                            [LastUpdatedTime] => 2025-08-02T03:14:27-07:00
                        )

                    [TxnDate] => 2025-08-02
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Invoice ID: in_1RrayLCDiOqgoJOUVmbyI9Rq
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Amount] => 109.89
                                    [LinkedTxn] => Array
                                        (
                                            [0] => Array
                                                (
                                                    [TxnId] => 5
                                                    [TxnType] => Invoice
                                                )

                                        )

                                    [LineEx] => Array
                                        (
                                            [any] => Array
                                                (
                                                    [0] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnId
                                                                    [Value] => 5
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                    [1] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnOpenBalance
                                                                    [Value] => 109.89
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                    [2] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnReferenceNumber
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                )

                                        )

                                )

                        )

                )

            [time] => 2025-08-02T03:14:27.149-07:00
        )

)

[02-Aug-2025 10:14:27 UTC] Payment created successfully in QBO. Payment ID: 7
[02-Aug-2025 10:14:27 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-new/stripe-app/functions.php on line 392
[02-Aug-2025 10:23:56 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RrcbWCDiOqgoJOU0cTmKN8d)
[02-Aug-2025 10:23:56 UTC] 1
[02-Aug-2025 10:23:56 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-new/stripe-app/functions.php on line 376
[02-Aug-2025 10:23:56 UTC] Starting sales receipt creation process for event: evt_3RrcbWCDiOqgoJOU0cTmKN8d
[02-Aug-2025 10:23:57 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                )

            [time] => 2025-08-02T03:23:56.974-07:00
        )

)

[02-Aug-2025 10:23:57 UTC] Using QBO customer ID: 2
[02-Aug-2025 10:23:57 UTC] Found checkout session: cs_test_a17RYChRTovDAts9x0X8Zn1FlYs5nEmX3kpFggiLTZUsv5hHto2YyKDHwV
[02-Aug-2025 10:23:57 UTC] Session tax amount: $5.28
[02-Aug-2025 10:23:57 UTC] Session subtotal: $66
[02-Aug-2025 10:23:57 UTC] Calculated tax percentage from session: 8%
[02-Aug-2025 10:23:58 UTC] Found checkout session line items: 1
[02-Aug-2025 10:23:58 UTC] Line item: llll, Subtotal: 66, Tax: 5.28, Total: 71.28
[02-Aug-2025 10:23:58 UTC] Total line items amount: 66, Total tax: 5.28
[02-Aug-2025 10:23:59 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 2
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 66
                    [Description] => llll
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 3
                                )

                            [UnitPrice] => 66
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-08-02
    [TotalAmt] => 71.28
    [PrivateNote] => Stripe Payment Intent ID: pi_3RrcbWCDiOqgoJOU0BECBTgi
    [PaymentRefNum] => ch_3RrcbWCDiOqgoJOU0D7iAJDl
    [PaymentMethodRef] => Array
        (
            [value] => 3
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 5.28
        )

)

[02-Aug-2025 10:24:00 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 8
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-08-02T03:24:00-07:00
                            [LastUpdatedTime] => 2025-08-02T03:24:00-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-08-02
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3RrcbWCDiOqgoJOU0BECBTgi
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => llll
                                    [Amount] => 66
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 3
                                                    [name] => llll
                                                )

                                            [UnitPrice] => 66
                                            [Qty] => 1
                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 66
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 3
                                )

                            [TotalTax] => 5.28
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0.58
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 4
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 66
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 1.09
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 5
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.875
                                                    [NetAmountTaxable] => 66
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 3.61
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 3
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 66
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 2
                            [name] => bbb bbb(teste@fsdf.fgfdgd)
                        )

                    [TotalAmt] => 71.28
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 3
                            [name] => Credit Card
                        )

                    [PaymentRefNum] => ch_3RrcbWCDiOqgoJOU0D7iAJDl
                    [DepositToAccountRef] => Array
                        (
                            [value] => 16
                            [name] => Payments to deposit
                        )

                )

            [time] => 2025-08-02T03:24:00.080-07:00
        )

)

[02-Aug-2025 10:24:00 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 8
[02-Aug-2025 10:24:00 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-new/stripe-app/functions.php on line 392
[02-Aug-2025 10:27:30 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RrcexCDiOqgoJOU1TWARo4i)
[02-Aug-2025 10:27:30 UTC] 1
[02-Aug-2025 10:27:30 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-new/stripe-app/functions.php on line 376
[02-Aug-2025 10:27:30 UTC] Starting sales receipt creation process for event: evt_3RrcexCDiOqgoJOU1TWARo4i
[02-Aug-2025 10:27:30 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 484.94
                                    [BalanceWithJobs] => 484.94
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 1
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-08-01T02:22:47-07:00
                                            [LastUpdatedTime] => 2025-08-02T03:14:27-07:00
                                        )

                                    [GivenName] => ggg ggg
                                    [FamilyName] => ggg ggg
                                    [FullyQualifiedName] => ggg ggg(nnnn@nnn.com)
                                    [DisplayName] => ggg ggg(nnnn@nnn.com)
                                    [PrintOnCheckName] => ggg ggg ggg ggg
                                    [Active] => 1
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => nnnn@nnn.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-08-02T03:27:30.493-07:00
        )

)

[02-Aug-2025 10:27:30 UTC] Using QBO customer ID: 1
[02-Aug-2025 10:27:30 UTC] No Checkout Session found for Payment Intent: pi_3RrcexCDiOqgoJOU1m49aLKO
[02-Aug-2025 10:27:30 UTC] No line items found from checkout session, trying to get from invoice
[02-Aug-2025 10:27:31 UTC] Found invoice line items: 1
[02-Aug-2025 10:27:31 UTC] Processing subscription invoice
[02-Aug-2025 10:27:31 UTC] Using product name from Stripe: gggg
[02-Aug-2025 10:27:33 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 1
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 99
                    [Description] => 1 × gggg (at $99.00 / day)
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 5
                                )

                            [UnitPrice] => 99
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-08-02
    [TotalAmt] => 109.89
    [PrivateNote] => Stripe Payment Intent ID: pi_3RrcexCDiOqgoJOU1m49aLKO
    [PaymentRefNum] => ch_3RrcexCDiOqgoJOU1cwnCB85
    [PaymentMethodRef] => Array
        (
            [value] => 3
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 10.89
        )

)

[02-Aug-2025 10:27:34 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 9
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-08-02T03:27:34-07:00
                            [LastUpdatedTime] => 2025-08-02T03:27:34-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-08-02
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3RrcexCDiOqgoJOU1m49aLKO
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => 1 × gggg (at $99.00 / day)
                                    [Amount] => 99
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 5
                                                    [name] => gggg
                                                )

                                            [UnitPrice] => 99
                                            [Qty] => 1
                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 99
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 3
                                )

                            [TotalTax] => 10.89
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 1.19
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 4
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 2.25
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 5
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.875
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 7.45
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 3
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 1
                            [name] => ggg ggg(nnnn@nnn.com)
                        )

                    [TotalAmt] => 109.89
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 3
                            [name] => Credit Card
                        )

                    [PaymentRefNum] => ch_3RrcexCDiOqgoJOU1cwnCB85
                    [DepositToAccountRef] => Array
                        (
                            [value] => 16
                            [name] => Payments to deposit
                        )

                )

            [time] => 2025-08-02T03:27:34.119-07:00
        )

)

[02-Aug-2025 10:27:34 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 9
[02-Aug-2025 10:27:34 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-new/stripe-app/functions.php on line 392
[02-Aug-2025 10:29:53 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RrchGCDiOqgoJOU1AiCBmKP)
[02-Aug-2025 10:29:53 UTC] 1
[02-Aug-2025 10:29:53 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-new/stripe-app/functions.php on line 376
[02-Aug-2025 10:29:53 UTC] Starting sales receipt creation process for event: evt_3RrchGCDiOqgoJOU1AiCBmKP
[02-Aug-2025 10:29:55 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 484.94
                                    [BalanceWithJobs] => 484.94
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 1
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-08-01T02:22:47-07:00
                                            [LastUpdatedTime] => 2025-08-02T03:14:27-07:00
                                        )

                                    [GivenName] => ggg ggg
                                    [FamilyName] => ggg ggg
                                    [FullyQualifiedName] => ggg ggg(nnnn@nnn.com)
                                    [DisplayName] => ggg ggg(nnnn@nnn.com)
                                    [PrintOnCheckName] => ggg ggg ggg ggg
                                    [Active] => 1
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => nnnn@nnn.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-08-02T03:29:55.449-07:00
        )

)

[02-Aug-2025 10:29:55 UTC] Using QBO customer ID: 1
[02-Aug-2025 10:29:55 UTC] No Checkout Session found for Payment Intent: pi_3RrchGCDiOqgoJOU1EsTCI3G
[02-Aug-2025 10:29:55 UTC] No line items found from checkout session, trying to get from invoice
[02-Aug-2025 10:29:56 UTC] Found invoice line items: 1
[02-Aug-2025 10:29:56 UTC] Processing subscription invoice
[02-Aug-2025 10:29:56 UTC] Using product name from Stripe: gggg
[02-Aug-2025 10:29:58 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 1
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 99
                    [Description] => 1 × gggg (at $99.00 / day)
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 5
                                )

                            [UnitPrice] => 99
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-08-02
    [TotalAmt] => 109.89
    [PrivateNote] => Stripe Payment Intent ID: pi_3RrchGCDiOqgoJOU1EsTCI3G
    [PaymentRefNum] => ch_3RrchGCDiOqgoJOU1yGhgWrX
    [PaymentMethodRef] => Array
        (
            [value] => 3
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 10.89
        )

)

[02-Aug-2025 10:29:58 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 10
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-08-02T03:29:59-07:00
                            [LastUpdatedTime] => 2025-08-02T03:29:59-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-08-02
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3RrchGCDiOqgoJOU1EsTCI3G
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => 1 × gggg (at $99.00 / day)
                                    [Amount] => 99
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 5
                                                    [name] => gggg
                                                )

                                            [UnitPrice] => 99
                                            [Qty] => 1
                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 99
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 3
                                )

                            [TotalTax] => 10.89
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 1.19
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 4
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 2.25
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 5
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.875
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 7.45
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 3
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 1
                            [name] => ggg ggg(nnnn@nnn.com)
                        )

                    [TotalAmt] => 109.89
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 3
                            [name] => Credit Card
                        )

                    [PaymentRefNum] => ch_3RrchGCDiOqgoJOU1yGhgWrX
                    [DepositToAccountRef] => Array
                        (
                            [value] => 16
                            [name] => Payments to deposit
                        )

                )

            [time] => 2025-08-02T03:29:58.303-07:00
        )

)

[02-Aug-2025 10:29:58 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 10
[02-Aug-2025 10:29:58 UTC] PHP Notice:  Only variables should be passed by reference in /home/wdsklsxvqb/automationv.com/stripe-new/stripe-app/functions.php on line 392
[02-Aug-2025 11:03:34 UTC] PHP Fatal error:  Uncaught mysqli_sql_exception: Access denied for user 'wdsklsxvqb_stripe_test'@'localhost' (using password: YES) in /home/mhossain/public_html/stripe-app/db.php:5
Stack trace:
#0 /home/mhossain/public_html/stripe-app/db.php(5): mysqli->__construct()
#1 /home/mhossain/public_html/stripe-app/dashboard.php(3): require_once('/home/mhossain/...')
#2 {main}
  thrown in /home/mhossain/public_html/stripe-app/db.php on line 5
[02-Aug-2025 11:22:37 UTC] PHP Fatal error:  Uncaught mysqli_sql_exception: Table 'mhossain_stripe-app.sessions' doesn't exist in /home/mhossain/public_html/stripe-app/session.php:83
Stack trace:
#0 /home/mhossain/public_html/stripe-app/session.php(83): mysqli->query()
#1 /home/mhossain/public_html/stripe-app/session.php(43): clean_expired_sessions1()
#2 /home/mhossain/public_html/stripe-app/session.php(35): validate_session()
#3 /home/mhossain/public_html/stripe-app/includes/header.php(4): start_secure_session()
#4 /home/mhossain/public_html/stripe-app/login.php(68): require_once('/home/mhossain/...')
#5 {main}
  thrown in /home/mhossain/public_html/stripe-app/session.php on line 83
[02-Aug-2025 14:18:47 UTC] Stripe Webhook Received: invoice.finalized (ID: evt_1RrgGoCDiOqgoJOUA7HgvnQV)
[02-Aug-2025 14:18:47 UTC] 1
[02-Aug-2025 15:23:54 UTC] Stripe Webhook Received: invoice.finalized (ID: evt_1RrhHpCDiOqgoJOUDPLmVYdq)
[02-Aug-2025 15:23:54 UTC] 1
[02-Aug-2025 15:23:54 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[02-Aug-2025 15:23:54 UTC] Starting invoice creation process for event: evt_1RrhHpCDiOqgoJOUDPLmVYdq
[02-Aug-2025 15:23:54 UTC] Fetching Stripe invoice: in_1RrhGPCDiOqgoJOUBUkwqZL7
[02-Aug-2025 15:23:54 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RrhGPCDiOqgoJOUBUkwqZL7
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 3780
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 3780
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 1
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 1
            [liability] => Array
                (
                    [type] => self
                )

            [provider] => stripe
            [status] => complete
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1754148145
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_Slm8NRlbsGiXDU
    [customer_address] => Array
        (
            [city] => Alabama
            [country] => US
            [line1] => Alabama
            [line2] => Alabama
            [postal_code] => 35013
            [state] => AL
        )

    [customer_email] => dadad@fdfsdfs.fsdf
    [customer_name] => hh hhh
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1756740232
    [effective_at] => 1754148232
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TbkhxWTAzWWVMUEI4Q1JYb1JYZWNielBlbGpTaDdRLDE0NDY4OTAzNA0200CGBM2cu3?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TbkhxWTAzWWVMUEI4Q1JYb1JYZWNielBlbGpTaDdRLDE0NDY4OTAzNA0200CGBM2cu3/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RrhGxCDiOqgoJOUTqJ57bQL
                            [object] => line_item
                            [amount] => 2000
                            [amount_excluding_tax] => 2000
                            [currency] => usd
                            [description] => Jeans Pant
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RrhGPCDiOqgoJOUBUkwqZL7
                            [invoice_item] => ii_1RrhGxCDiOqgoJOUQfgjj3Ht
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1RrhGxCDiOqgoJOUQfgjj3Ht
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1754148179
                                    [start] => 1754148179
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RrgFdCDiOqgoJOUd8IjXmsX
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1754144253
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SnGn0hZovppSNy
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 2000
                                    [unit_amount_decimal] => 2000
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RrgFdCDiOqgoJOUd8IjXmsX
                                            [product] => prod_SnGn0hZovppSNy
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 2000
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 1
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 160
                                            [inclusive] => 
                                            [tax_rate] => txr_1RmbmQCDiOqgoJOUVl6boLeV
                                            [taxability_reason] => standard_rated
                                            [taxable_amount] => 2000
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 160
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1RmbmQCDiOqgoJOUVl6boLeV
                                                )

                                            [taxability_reason] => standard_rated
                                            [taxable_amount] => 2000
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 2000
                        )

                    [1] => Array
                        (
                            [id] => il_1RrhGhCDiOqgoJOUB6Jj5IDv
                            [object] => line_item
                            [amount] => 1500
                            [amount_excluding_tax] => 1500
                            [currency] => usd
                            [description] => Hoody
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RrhGPCDiOqgoJOUBUkwqZL7
                            [invoice_item] => ii_1RrhGhCDiOqgoJOUKLpLZQfO
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1RrhGhCDiOqgoJOUKLpLZQfO
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1754148163
                                    [start] => 1754148163
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RrgG8CDiOqgoJOUw2xI4cVQ
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1754144284
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SnGnk5V0R6p8an
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 1500
                                    [unit_amount_decimal] => 1500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RrgG8CDiOqgoJOUw2xI4cVQ
                                            [product] => prod_SnGnk5V0R6p8an
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 1500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 1
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 120
                                            [inclusive] => 
                                            [tax_rate] => txr_1RmbmQCDiOqgoJOUVl6boLeV
                                            [taxability_reason] => standard_rated
                                            [taxable_amount] => 1500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 120
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1RmbmQCDiOqgoJOUVl6boLeV
                                                )

                                            [taxability_reason] => standard_rated
                                            [taxable_amount] => 1500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 1500
                        )

                )

            [has_more] => 
            [total_count] => 2
            [url] => /v1/invoices/in_1RrhGPCDiOqgoJOUBUkwqZL7/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => 8V92UGAM-0008
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RrhHoCDiOqgoJOU1ZHLlqAa
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1754231586
    [period_start] => 1754145186
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => open
    [status_transitions] => Array
        (
            [finalized_at] => 1754148232
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 3500
    [subtotal_excluding_tax] => 3500
    [tax] => 280
    [test_clock] => 
    [total] => 3780
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 3500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 280
                    [inclusive] => 
                    [tax_rate] => txr_1RmbmQCDiOqgoJOUVl6boLeV
                    [taxability_reason] => standard_rated
                    [taxable_amount] => 3500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 280
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1RmbmQCDiOqgoJOUVl6boLeV
                        )

                    [taxability_reason] => standard_rated
                    [taxable_amount] => 3500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1754148145
)

[02-Aug-2025 15:23:56 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                )

            [time] => 2025-08-02T08:23:56.484-07:00
        )

)

[02-Aug-2025 15:23:57 UTC] Using QBO customer ID: 3
[02-Aug-2025 15:24:03 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 3
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 20
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 6
                                )

                            [UnitPrice] => 20
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

            [1] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 15
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 7
                                )

                            [UnitPrice] => 15
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-08-02
    [DueDate] => 2025-09-01
    [TotalAmt] => 37.8
    [PrivateNote] => Stripe Invoice ID: in_1RrhGPCDiOqgoJOUBUkwqZL7
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 2.8
        )

)

[02-Aug-2025 15:24:04 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 11
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-08-02T08:24:04-07:00
                            [LastUpdatedTime] => 2025-08-02T08:24:04-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-08-02
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Invoice ID: in_1RrhGPCDiOqgoJOUBUkwqZL7
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 20
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 6
                                                    [name] => Jeans Pant
                                                )

                                            [UnitPrice] => 20
                                            [Qty] => 1
                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Id] => 2
                                    [LineNum] => 2
                                    [Amount] => 15
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 7
                                                    [name] => Hoody
                                                )

                                            [UnitPrice] => 15
                                            [Qty] => 1
                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                        )

                                )

                            [2] => Array
                                (
                                    [Amount] => 35
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 3
                                )

                            [TotalTax] => 2.8
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0.31
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 4
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 35
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0.58
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 5
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.875
                                                    [NetAmountTaxable] => 35
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 1.91
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 3
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 35
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 3
                            [name] => hh hhh(dadad@fdfsdfs.fsdf)
                        )

                    [DueDate] => 2025-09-01
                    [TotalAmt] => 37.8
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 37.8
                )

            [time] => 2025-08-02T08:24:03.925-07:00
        )

)

[02-Aug-2025 15:24:04 UTC] Invoice created successfully in QBO. Invoice ID: 11
[02-Aug-2025 15:24:04 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[02-Aug-2025 15:29:21 UTC] Stripe Webhook Received: invoice.finalized (ID: evt_1RrhN7CDiOqgoJOUcQFnHwBI)
[02-Aug-2025 15:29:21 UTC] 1
[02-Aug-2025 15:29:21 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[02-Aug-2025 15:29:21 UTC] Starting invoice creation process for event: evt_1RrhN7CDiOqgoJOUcQFnHwBI
[02-Aug-2025 15:29:21 UTC] Fetching Stripe invoice: in_1RrgQoCDiOqgoJOUSdpGTAr6
[02-Aug-2025 15:29:22 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1RrhN7CDiOqgoJOUh2u50qsH)
[02-Aug-2025 15:29:22 UTC] 1
[02-Aug-2025 15:29:22 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[02-Aug-2025 15:29:22 UTC] Starting payment process for Stripe invoice: evt_1RrhN7CDiOqgoJOUh2u50qsH
[02-Aug-2025 15:29:22 UTC] Fetching Stripe invoice: in_1RrgQoCDiOqgoJOUSdpGTAr6
[02-Aug-2025 15:29:22 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RrgQoCDiOqgoJOUSdpGTAr6
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 9900
    [amount_overpaid] => 0
    [amount_paid] => 9900
    [amount_remaining] => 0
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 1
    [attempted] => 1
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 1
            [liability] => Array
                (
                    [type] => self
                )

            [provider] => stripe
            [status] => complete
        )

    [automatically_finalizes_at] => 
    [billing_reason] => subscription_cycle
    [charge] => ch_3RrhN3CDiOqgoJOU1zzz4cmi
    [collection_method] => charge_automatically
    [created] => 1754144946
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_Slm4tKm9oJEoFY
    [customer_address] => Array
        (
            [city] => Alabama
            [country] => US
            [line1] => Alabama
            [line2] => Alabama
            [postal_code] => 13035
            [state] => AL
        )

    [customer_email] => baaamrafiul.alam@gmail.com
    [customer_name] => jjj jjjj
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 
    [effective_at] => 1754148556
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9Tbkd5VHdmeGRxckVuWVlSZWQwcE1INmo1S0hnOGRoLDE0NDY4OTM2Mg0200XeAMTPND?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9Tbkd5VHdmeGRxckVuWVlSZWQwcE1INmo1S0hnOGRoLDE0NDY4OTM2Mg0200XeAMTPND/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RrgQoCDiOqgoJOUAJpV3qds
                            [object] => line_item
                            [amount] => 9900
                            [amount_excluding_tax] => 9900
                            [currency] => usd
                            [description] => 1 × gggg (at $99.00 / day)
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RrgQoCDiOqgoJOUSdpGTAr6
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => 
                                    [subscription_item_details] => Array
                                        (
                                            [invoice_item] => 
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => sub_1RqEWBCDiOqgoJOUaZQFv8DH
                                            [subscription_item] => si_Slm4X3y74jzQfi
                                        )

                                    [type] => subscription_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1754231317
                                    [start] => 1754144917
                                )

                            [plan] => Array
                                (
                                    [id] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                    [object] => plan
                                    [active] => 1
                                    [aggregate_usage] => 
                                    [amount] => 9900
                                    [amount_decimal] => 9900
                                    [billing_scheme] => per_unit
                                    [created] => 1753345386
                                    [currency] => usd
                                    [interval] => day
                                    [interval_count] => 1
                                    [livemode] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [meter] => 
                                    [nickname] => 
                                    [product] => prod_Sjo2eLoEDhLJSz
                                    [tiers_mode] => 
                                    [transform_usage] => 
                                    [trial_period_days] => 
                                    [usage_type] => licensed
                                )

                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1753345386
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_Sjo2eLoEDhLJSz
                                    [recurring] => Array
                                        (
                                            [aggregate_usage] => 
                                            [interval] => day
                                            [interval_count] => 1
                                            [meter] => 
                                            [trial_period_days] => 
                                            [usage_type] => licensed
                                        )

                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => recurring
                                    [unit_amount] => 9900
                                    [unit_amount_decimal] => 9900
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                            [product] => prod_Sjo2eLoEDhLJSz
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 9900
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 1
                            [subscription] => sub_1RqEWBCDiOqgoJOUaZQFv8DH
                            [subscription_item] => si_Slm4X3y74jzQfi
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 0
                                            [inclusive] => 
                                            [tax_rate] => txr_1RqEVuCDiOqgoJOUIcZLbys8
                                            [taxability_reason] => not_collecting
                                            [taxable_amount] => 0
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 0
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1RqEVuCDiOqgoJOUIcZLbys8
                                                )

                                            [taxability_reason] => not_collecting
                                            [taxable_amount] => 0
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => subscription
                            [unit_amount_excluding_tax] => 9900
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1RrgQoCDiOqgoJOUSdpGTAr6/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => 0GVZKWVT-0006
    [on_behalf_of] => 
    [paid] => 1
    [paid_out_of_band] => 
    [parent] => Array
        (
            [quote_details] => 
            [subscription_details] => Array
                (
                    [metadata] => Array
                        (
                        )

                    [subscription] => sub_1RqEWBCDiOqgoJOUaZQFv8DH
                )

            [type] => subscription_details
        )

    [payment_intent] => pi_3RrhN3CDiOqgoJOU1v5FYvKL
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => Array
                (
                    [acss_debit] => 
                    [bancontact] => 
                    [card] => Array
                        (
                            [request_three_d_secure] => automatic
                        )

                    [customer_balance] => 
                    [konbini] => 
                    [sepa_debit] => 
                    [us_bank_account] => 
                )

            [payment_method_types] => 
        )

    [period_end] => 1754144917
    [period_start] => 1754058517
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => 
    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => paid
    [status_transitions] => Array
        (
            [finalized_at] => 1754148556
            [marked_uncollectible_at] => 
            [paid_at] => 1754148556
            [voided_at] => 
        )

    [subscription] => sub_1RqEWBCDiOqgoJOUaZQFv8DH
    [subscription_details] => Array
        (
            [metadata] => Array
                (
                )

        )

    [subtotal] => 9900
    [subtotal_excluding_tax] => 9900
    [tax] => 0
    [test_clock] => 
    [total] => 9900
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 9900
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 0
                    [inclusive] => 
                    [tax_rate] => txr_1RqEVuCDiOqgoJOUIcZLbys8
                    [taxability_reason] => not_collecting
                    [taxable_amount] => 0
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 0
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1RqEVuCDiOqgoJOUIcZLbys8
                        )

                    [taxability_reason] => not_collecting
                    [taxable_amount] => 0
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1754144946
)

[02-Aug-2025 15:29:22 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RrgQoCDiOqgoJOUSdpGTAr6
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 9900
    [amount_overpaid] => 0
    [amount_paid] => 9900
    [amount_remaining] => 0
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 1
    [attempted] => 1
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 1
            [liability] => Array
                (
                    [type] => self
                )

            [provider] => stripe
            [status] => complete
        )

    [automatically_finalizes_at] => 
    [billing_reason] => subscription_cycle
    [charge] => ch_3RrhN3CDiOqgoJOU1zzz4cmi
    [collection_method] => charge_automatically
    [created] => 1754144946
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_Slm4tKm9oJEoFY
    [customer_address] => Array
        (
            [city] => Alabama
            [country] => US
            [line1] => Alabama
            [line2] => Alabama
            [postal_code] => 13035
            [state] => AL
        )

    [customer_email] => baaamrafiul.alam@gmail.com
    [customer_name] => jjj jjjj
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 
    [effective_at] => 1754148556
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9Tbkd5VHdmeGRxckVuWVlSZWQwcE1INmo1S0hnOGRoLDE0NDY4OTM2Mg0200XeAMTPND?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9Tbkd5VHdmeGRxckVuWVlSZWQwcE1INmo1S0hnOGRoLDE0NDY4OTM2Mg0200XeAMTPND/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RrgQoCDiOqgoJOUAJpV3qds
                            [object] => line_item
                            [amount] => 9900
                            [amount_excluding_tax] => 9900
                            [currency] => usd
                            [description] => 1 × gggg (at $99.00 / day)
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RrgQoCDiOqgoJOUSdpGTAr6
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => 
                                    [subscription_item_details] => Array
                                        (
                                            [invoice_item] => 
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => sub_1RqEWBCDiOqgoJOUaZQFv8DH
                                            [subscription_item] => si_Slm4X3y74jzQfi
                                        )

                                    [type] => subscription_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1754231317
                                    [start] => 1754144917
                                )

                            [plan] => Array
                                (
                                    [id] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                    [object] => plan
                                    [active] => 1
                                    [aggregate_usage] => 
                                    [amount] => 9900
                                    [amount_decimal] => 9900
                                    [billing_scheme] => per_unit
                                    [created] => 1753345386
                                    [currency] => usd
                                    [interval] => day
                                    [interval_count] => 1
                                    [livemode] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [meter] => 
                                    [nickname] => 
                                    [product] => prod_Sjo2eLoEDhLJSz
                                    [tiers_mode] => 
                                    [transform_usage] => 
                                    [trial_period_days] => 
                                    [usage_type] => licensed
                                )

                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1753345386
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_Sjo2eLoEDhLJSz
                                    [recurring] => Array
                                        (
                                            [aggregate_usage] => 
                                            [interval] => day
                                            [interval_count] => 1
                                            [meter] => 
                                            [trial_period_days] => 
                                            [usage_type] => licensed
                                        )

                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => recurring
                                    [unit_amount] => 9900
                                    [unit_amount_decimal] => 9900
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                            [product] => prod_Sjo2eLoEDhLJSz
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 9900
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 1
                            [subscription] => sub_1RqEWBCDiOqgoJOUaZQFv8DH
                            [subscription_item] => si_Slm4X3y74jzQfi
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 0
                                            [inclusive] => 
                                            [tax_rate] => txr_1RqEVuCDiOqgoJOUIcZLbys8
                                            [taxability_reason] => not_collecting
                                            [taxable_amount] => 0
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 0
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1RqEVuCDiOqgoJOUIcZLbys8
                                                )

                                            [taxability_reason] => not_collecting
                                            [taxable_amount] => 0
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => subscription
                            [unit_amount_excluding_tax] => 9900
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1RrgQoCDiOqgoJOUSdpGTAr6/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => 0GVZKWVT-0006
    [on_behalf_of] => 
    [paid] => 1
    [paid_out_of_band] => 
    [parent] => Array
        (
            [quote_details] => 
            [subscription_details] => Array
                (
                    [metadata] => Array
                        (
                        )

                    [subscription] => sub_1RqEWBCDiOqgoJOUaZQFv8DH
                )

            [type] => subscription_details
        )

    [payment_intent] => pi_3RrhN3CDiOqgoJOU1v5FYvKL
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => Array
                (
                    [acss_debit] => 
                    [bancontact] => 
                    [card] => Array
                        (
                            [request_three_d_secure] => automatic
                        )

                    [customer_balance] => 
                    [konbini] => 
                    [sepa_debit] => 
                    [us_bank_account] => 
                )

            [payment_method_types] => 
        )

    [period_end] => 1754144917
    [period_start] => 1754058517
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => 
    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => paid
    [status_transitions] => Array
        (
            [finalized_at] => 1754148556
            [marked_uncollectible_at] => 
            [paid_at] => 1754148556
            [voided_at] => 
        )

    [subscription] => sub_1RqEWBCDiOqgoJOUaZQFv8DH
    [subscription_details] => Array
        (
            [metadata] => Array
                (
                )

        )

    [subtotal] => 9900
    [subtotal_excluding_tax] => 9900
    [tax] => 0
    [test_clock] => 
    [total] => 9900
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 9900
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 0
                    [inclusive] => 
                    [tax_rate] => txr_1RqEVuCDiOqgoJOUIcZLbys8
                    [taxability_reason] => not_collecting
                    [taxable_amount] => 0
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 0
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1RqEVuCDiOqgoJOUIcZLbys8
                        )

                    [taxability_reason] => not_collecting
                    [taxable_amount] => 0
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1754144946
)

[02-Aug-2025 15:29:23 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                )

            [time] => 2025-08-02T08:29:23.811-07:00
        )

)

[02-Aug-2025 15:29:24 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                )

            [time] => 2025-08-02T08:29:23.969-07:00
        )

)

[02-Aug-2025 15:29:24 UTC] Failed to create customer: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => A business validation error has occurred while processing your request
                                    [Detail] => Business Validation Error: An unexpected error occurred while accessing or saving your data. Please wait a few minutes and try again.  If the problem persists, contact customer support.
                                    [code] => 6000
                                    [element] => 
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-08-02T08:29:24.802-07:00
        )

)

[02-Aug-2025 15:29:24 UTC] Payment creation failed: Failed to find or create customer in QuickBooks
[02-Aug-2025 15:29:24 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[02-Aug-2025 15:29:24 UTC] Using QBO customer ID: 4
[02-Aug-2025 15:29:25 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 4
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 99
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 4
                                )

                            [UnitPrice] => 99
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-08-02
    [DueDate] => 2025-09-01
    [TotalAmt] => 99
    [PrivateNote] => Stripe Invoice ID: in_1RrgQoCDiOqgoJOUSdpGTAr6
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
)

[02-Aug-2025 15:29:27 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 12
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-08-02T08:29:27-07:00
                            [LastUpdatedTime] => 2025-08-02T08:29:27-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-08-02
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Invoice ID: in_1RrgQoCDiOqgoJOUSdpGTAr6
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 99
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 4
                                                    [name] => 1 × gggg (at $99.00 / day)
                                                )

                                            [UnitPrice] => 99
                                            [Qty] => 1
                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 99
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 3
                                )

                            [TotalTax] => 9.03
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0.99
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 4
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 1.86
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 5
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.875
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 6.18
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 3
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 4
                            [name] => jjj jjjj(baaamrafiul.alam@gmail.com)
                        )

                    [DueDate] => 2025-09-01
                    [TotalAmt] => 108.03
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 108.03
                )

            [time] => 2025-08-02T08:29:26.584-07:00
        )

)

[02-Aug-2025 15:29:27 UTC] Invoice created successfully in QBO. Invoice ID: 12
[02-Aug-2025 15:29:27 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[02-Aug-2025 15:29:36 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1RrhNLCDiOqgoJOU0CR8RwoH)
[02-Aug-2025 15:29:36 UTC] 1
[02-Aug-2025 15:29:36 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[02-Aug-2025 15:29:36 UTC] Starting payment process for Stripe invoice: evt_1RrhNLCDiOqgoJOU0CR8RwoH
[02-Aug-2025 15:29:36 UTC] Fetching Stripe invoice: in_1RrhGPCDiOqgoJOUBUkwqZL7
[02-Aug-2025 15:29:36 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RrhGPCDiOqgoJOUBUkwqZL7
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 3780
    [amount_overpaid] => 0
    [amount_paid] => 3780
    [amount_remaining] => 0
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 1
    [attempted] => 1
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 1
            [liability] => Array
                (
                    [type] => self
                )

            [provider] => stripe
            [status] => complete
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => ch_3RrhHoCDiOqgoJOU1wHoDcUP
    [collection_method] => send_invoice
    [created] => 1754148145
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_Slm8NRlbsGiXDU
    [customer_address] => Array
        (
            [city] => Alabama
            [country] => US
            [line1] => Alabama
            [line2] => Alabama
            [postal_code] => 35013
            [state] => AL
        )

    [customer_email] => dadad@fdfsdfs.fsdf
    [customer_name] => hh hhh
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1756740232
    [effective_at] => 1754148232
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TbkhxWTAzWWVMUEI4Q1JYb1JYZWNielBlbGpTaDdRLDE0NDY4OTM3Ng0200UtgDASHW?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TbkhxWTAzWWVMUEI4Q1JYb1JYZWNielBlbGpTaDdRLDE0NDY4OTM3Ng0200UtgDASHW/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RrhGxCDiOqgoJOUTqJ57bQL
                            [object] => line_item
                            [amount] => 2000
                            [amount_excluding_tax] => 2000
                            [currency] => usd
                            [description] => Jeans Pant
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RrhGPCDiOqgoJOUBUkwqZL7
                            [invoice_item] => ii_1RrhGxCDiOqgoJOUQfgjj3Ht
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1RrhGxCDiOqgoJOUQfgjj3Ht
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1754148179
                                    [start] => 1754148179
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RrgFdCDiOqgoJOUd8IjXmsX
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1754144253
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SnGn0hZovppSNy
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 2000
                                    [unit_amount_decimal] => 2000
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RrgFdCDiOqgoJOUd8IjXmsX
                                            [product] => prod_SnGn0hZovppSNy
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 2000
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 1
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 160
                                            [inclusive] => 
                                            [tax_rate] => txr_1RmbmQCDiOqgoJOUVl6boLeV
                                            [taxability_reason] => standard_rated
                                            [taxable_amount] => 2000
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 160
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1RmbmQCDiOqgoJOUVl6boLeV
                                                )

                                            [taxability_reason] => standard_rated
                                            [taxable_amount] => 2000
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 2000
                        )

                    [1] => Array
                        (
                            [id] => il_1RrhGhCDiOqgoJOUB6Jj5IDv
                            [object] => line_item
                            [amount] => 1500
                            [amount_excluding_tax] => 1500
                            [currency] => usd
                            [description] => Hoody
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RrhGPCDiOqgoJOUBUkwqZL7
                            [invoice_item] => ii_1RrhGhCDiOqgoJOUKLpLZQfO
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1RrhGhCDiOqgoJOUKLpLZQfO
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1754148163
                                    [start] => 1754148163
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RrgG8CDiOqgoJOUw2xI4cVQ
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1754144284
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SnGnk5V0R6p8an
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 1500
                                    [unit_amount_decimal] => 1500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RrgG8CDiOqgoJOUw2xI4cVQ
                                            [product] => prod_SnGnk5V0R6p8an
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 1500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 1
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 120
                                            [inclusive] => 
                                            [tax_rate] => txr_1RmbmQCDiOqgoJOUVl6boLeV
                                            [taxability_reason] => standard_rated
                                            [taxable_amount] => 1500
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 120
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1RmbmQCDiOqgoJOUVl6boLeV
                                                )

                                            [taxability_reason] => standard_rated
                                            [taxable_amount] => 1500
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 1500
                        )

                )

            [has_more] => 
            [total_count] => 2
            [url] => /v1/invoices/in_1RrhGPCDiOqgoJOUBUkwqZL7/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => 8V92UGAM-0008
    [on_behalf_of] => 
    [paid] => 1
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RrhHoCDiOqgoJOU1ZHLlqAa
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1754231586
    [period_start] => 1754145186
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => paid
    [status_transitions] => Array
        (
            [finalized_at] => 1754148232
            [marked_uncollectible_at] => 
            [paid_at] => 1754148573
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 3500
    [subtotal_excluding_tax] => 3500
    [tax] => 280
    [test_clock] => 
    [total] => 3780
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 3500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 280
                    [inclusive] => 
                    [tax_rate] => txr_1RmbmQCDiOqgoJOUVl6boLeV
                    [taxability_reason] => standard_rated
                    [taxable_amount] => 3500
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 280
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1RmbmQCDiOqgoJOUVl6boLeV
                        )

                    [taxability_reason] => standard_rated
                    [taxable_amount] => 3500
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1754148145
)

[02-Aug-2025 15:29:38 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 37.8
                                    [BalanceWithJobs] => 37.8
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 3
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-08-02T08:23:57-07:00
                                            [LastUpdatedTime] => 2025-08-02T08:24:05-07:00
                                        )

                                    [GivenName] => hh hhh
                                    [FamilyName] => hh hhh
                                    [FullyQualifiedName] => hh hhh(dadad@fdfsdfs.fsdf)
                                    [DisplayName] => hh hhh(dadad@fdfsdfs.fsdf)
                                    [PrintOnCheckName] => hh hhh hh hhh
                                    [Active] => 1
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => dadad@fdfsdfs.fsdf
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-08-02T08:29:38.057-07:00
        )

)

[02-Aug-2025 15:29:38 UTC] Using QBO customer ID: 3
[02-Aug-2025 15:29:38 UTC] Found existing QBO invoice ID: 11
[02-Aug-2025 15:29:40 UTC] Failed to create payment method: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Invalid Enumeration
                                    [Detail] => Invalid Enumeration : OTHER
                                    [code] => 2170
                                    [element] => Type
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-08-02T08:29:40.853-07:00
        )

)

[02-Aug-2025 15:29:40 UTC] Creating QBO payment with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 3
        )

    [TotalAmt] => 37.8
    [TxnDate] => 2025-08-02
    [PaymentRefNum] => pi_3RrhHoCDiOqgoJOU1Z
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [DepositToAccountRef] => Array
        (
            [value] => 16
        )

    [PrivateNote] => Stripe Invoice ID: in_1RrhGPCDiOqgoJOUBUkwqZL7
    [Line] => Array
        (
            [0] => Array
                (
                    [Amount] => 37.8
                    [LinkedTxn] => Array
                        (
                            [0] => Array
                                (
                                    [TxnId] => 11
                                    [TxnType] => Invoice
                                )

                        )

                )

        )

)

[02-Aug-2025 15:29:42 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Payment] => Array
                (
                    [CustomerRef] => Array
                        (
                            [value] => 3
                            [name] => hh hhh(dadad@fdfsdfs.fsdf)
                        )

                    [DepositToAccountRef] => Array
                        (
                            [value] => 16
                        )

                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                        )

                    [PaymentRefNum] => pi_3RrhHoCDiOqgoJOU1Z
                    [TotalAmt] => 37.8
                    [UnappliedAmt] => 0
                    [ProcessPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 13
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-08-02T08:29:42-07:00
                            [LastUpdatedTime] => 2025-08-02T08:29:42-07:00
                        )

                    [TxnDate] => 2025-08-02
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Invoice ID: in_1RrhGPCDiOqgoJOUBUkwqZL7
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Amount] => 37.8
                                    [LinkedTxn] => Array
                                        (
                                            [0] => Array
                                                (
                                                    [TxnId] => 11
                                                    [TxnType] => Invoice
                                                )

                                        )

                                    [LineEx] => Array
                                        (
                                            [any] => Array
                                                (
                                                    [0] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnId
                                                                    [Value] => 11
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                    [1] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnOpenBalance
                                                                    [Value] => 37.80
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                    [2] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnReferenceNumber
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                )

                                        )

                                )

                        )

                )

            [time] => 2025-08-02T08:29:41.711-07:00
        )

)

[02-Aug-2025 15:29:42 UTC] Payment created successfully in QBO. Payment ID: 13
[02-Aug-2025 15:29:42 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[02-Aug-2025 15:34:02 UTC] Stripe Webhook Received: invoice.finalized (ID: evt_1RrhRdCDiOqgoJOUhQM6Tzir)
[02-Aug-2025 15:34:02 UTC] 1
[02-Aug-2025 15:34:02 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[02-Aug-2025 15:34:02 UTC] Starting invoice creation process for event: evt_1RrhRdCDiOqgoJOUhQM6Tzir
[02-Aug-2025 15:34:02 UTC] Fetching Stripe invoice: in_1RrhP0CDiOqgoJOU4hsXsqhS
[02-Aug-2025 15:34:02 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RrhP0CDiOqgoJOU4hsXsqhS
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => Array
        (
        )

    [amount_due] => 10500
    [amount_overpaid] => 0
    [amount_paid] => 0
    [amount_remaining] => 10500
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 0
    [attempted] => 
    [auto_advance] => 1
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => manual
    [charge] => 
    [collection_method] => send_invoice
    [created] => 1754148678
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_SjkINXkD1L8EPF
    [customer_address] => 
    [customer_email] => aaaaa@aaa.com
    [customer_name] => aaaa aaaaa
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 1756740840
    [effective_at] => 1754148840
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9Tbkh5YUY1NTJXTFBHQWdSdGdLaWdsNmhQY3ZDRnNlLDE0NDY4OTY0Mg0200t9Ko3xQb?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9Tbkh5YUY1NTJXTFBHQWdSdGdLaWdsNmhQY3ZDRnNlLDE0NDY4OTY0Mg0200t9Ko3xQb/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RrhPeCDiOqgoJOUHfSK0Vro
                            [object] => line_item
                            [amount] => 3000
                            [amount_excluding_tax] => 3000
                            [currency] => usd
                            [description] => T Shirt
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RrhP0CDiOqgoJOU4hsXsqhS
                            [invoice_item] => ii_1RrhPeCDiOqgoJOUHG1j42jW
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1RrhPeCDiOqgoJOUHG1j42jW
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1754148718
                                    [start] => 1754148718
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RrgFKCDiOqgoJOUmZIbyNHh
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1754144234
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SnGmNxgns519W0
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 1000
                                    [unit_amount_decimal] => 1000
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RrgFKCDiOqgoJOUmZIbyNHh
                                            [product] => prod_SnGmNxgns519W0
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 1000
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 3
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 1000
                        )

                    [1] => Array
                        (
                            [id] => il_1RrhPHCDiOqgoJOUT0SHQStK
                            [object] => line_item
                            [amount] => 7500
                            [amount_excluding_tax] => 7500
                            [currency] => usd
                            [description] => Hoody
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RrhP0CDiOqgoJOU4hsXsqhS
                            [invoice_item] => ii_1RrhPHCDiOqgoJOU3aVZOiPH
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => Array
                                        (
                                            [invoice_item] => ii_1RrhPHCDiOqgoJOU3aVZOiPH
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => 
                                        )

                                    [subscription_item_details] => 
                                    [type] => invoice_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1754148695
                                    [start] => 1754148695
                                )

                            [plan] => 
                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RrgG8CDiOqgoJOUw2xI4cVQ
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1754144284
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_SnGnk5V0R6p8an
                                    [recurring] => 
                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => one_time
                                    [unit_amount] => 1500
                                    [unit_amount_decimal] => 1500
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RrgG8CDiOqgoJOUw2xI4cVQ
                                            [product] => prod_SnGnk5V0R6p8an
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 1500
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 5
                            [subscription] => 
                            [tax_amounts] => Array
                                (
                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                )

                            [type] => invoiceitem
                            [unit_amount_excluding_tax] => 1500
                        )

                )

            [has_more] => 
            [total_count] => 2
            [url] => /v1/invoices/in_1RrhP0CDiOqgoJOU4hsXsqhS/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => 42JBTFBZ-0003
    [on_behalf_of] => 
    [paid] => 
    [paid_out_of_band] => 
    [parent] => 
    [payment_intent] => pi_3RrhRcCDiOqgoJOU1NQnBWUn
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1756015641
    [period_start] => 1753337241
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => Array
        (
            [amount_tax_display] => 
            [pdf] => Array
                (
                    [page_size] => letter
                )

            [template] => 
            [template_version] => 
        )

    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => open
    [status_transitions] => Array
        (
            [finalized_at] => 1754148840
            [marked_uncollectible_at] => 
            [paid_at] => 
            [voided_at] => 
        )

    [subscription] => 
    [subscription_details] => Array
        (
            [metadata] => 
        )

    [subtotal] => 10500
    [subtotal_excluding_tax] => 10500
    [tax] => 
    [test_clock] => 
    [total] => 10500
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 10500
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
        )

    [total_taxes] => Array
        (
        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1754148678
)

[02-Aug-2025 15:34:04 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                )

            [time] => 2025-08-02T08:34:04.590-07:00
        )

)

[02-Aug-2025 15:34:05 UTC] Using QBO customer ID: 5
[02-Aug-2025 15:34:09 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 5
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 30
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 8
                                )

                            [UnitPrice] => 10
                            [Qty] => 3
                            [TaxCodeRef] => Array
                                (
                                    [value] => NON
                                )

                        )

                )

            [1] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 75
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 7
                                )

                            [UnitPrice] => 15
                            [Qty] => 5
                            [TaxCodeRef] => Array
                                (
                                    [value] => NON
                                )

                        )

                )

        )

    [TxnDate] => 2025-08-02
    [DueDate] => 2025-09-01
    [TotalAmt] => 105
    [PrivateNote] => Stripe Invoice ID: in_1RrhP0CDiOqgoJOU4hsXsqhS
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
)

[02-Aug-2025 15:34:10 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 14
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-08-02T08:34:10-07:00
                            [LastUpdatedTime] => 2025-08-02T08:34:10-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-08-02
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Invoice ID: in_1RrhP0CDiOqgoJOU4hsXsqhS
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 30
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 8
                                                    [name] => T Shirt
                                                )

                                            [UnitPrice] => 10
                                            [Qty] => 3
                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => NON
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Id] => 2
                                    [LineNum] => 2
                                    [Amount] => 75
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 7
                                                    [name] => Hoody
                                                )

                                            [UnitPrice] => 15
                                            [Qty] => 5
                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => NON
                                                )

                                        )

                                )

                            [2] => Array
                                (
                                    [Amount] => 105
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 3
                                )

                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 4
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 5
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.875
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 3
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 5
                            [name] => aaaa aaaaa(aaaaa@aaa.com)
                        )

                    [DueDate] => 2025-09-01
                    [TotalAmt] => 105
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 105
                )

            [time] => 2025-08-02T08:34:09.863-07:00
        )

)

[02-Aug-2025 15:34:10 UTC] Invoice created successfully in QBO. Invoice ID: 14
[02-Aug-2025 15:34:10 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[02-Aug-2025 15:34:44 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1RrhSKCDiOqgoJOUBFLrdWI5)
[02-Aug-2025 15:34:44 UTC] 1
[02-Aug-2025 15:34:44 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[02-Aug-2025 15:34:44 UTC] Starting payment process for Stripe invoice: evt_1RrhSKCDiOqgoJOUBFLrdWI5
[02-Aug-2025 15:34:44 UTC] Fetching Stripe invoice: in_1RrgVZCDiOqgoJOUCNE8TuKu
[02-Aug-2025 15:34:44 UTC] Stripe Webhook Received: invoice.finalized (ID: evt_1RrhSJCDiOqgoJOUl4qPeape)
[02-Aug-2025 15:34:44 UTC] 1
[02-Aug-2025 15:34:44 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[02-Aug-2025 15:34:44 UTC] Starting invoice creation process for event: evt_1RrhSJCDiOqgoJOUl4qPeape
[02-Aug-2025 15:34:44 UTC] Fetching Stripe invoice: in_1RrgVZCDiOqgoJOUCNE8TuKu
[02-Aug-2025 15:34:45 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RrgVZCDiOqgoJOUCNE8TuKu
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 10692
    [amount_overpaid] => 0
    [amount_paid] => 10692
    [amount_remaining] => 0
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 1
    [attempted] => 1
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 1
            [liability] => Array
                (
                    [type] => self
                )

            [provider] => stripe
            [status] => complete
        )

    [automatically_finalizes_at] => 
    [billing_reason] => subscription_cycle
    [charge] => ch_3RrhSGCDiOqgoJOU1yBqmfvk
    [collection_method] => charge_automatically
    [created] => 1754145241
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_Slm8NRlbsGiXDU
    [customer_address] => Array
        (
            [city] => Alabama
            [country] => US
            [line1] => Alabama
            [line2] => Alabama
            [postal_code] => 35013
            [state] => AL
        )

    [customer_email] => dadad@fdfsdfs.fsdf
    [customer_name] => hh hhh
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 
    [effective_at] => 1754148879
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TbkgzZjZhWE5YSUd6MjQ5QllQcGh1UGZZMnZ5Q0lILDE0NDY4OTY4NQ0200sPi5C0Nx?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TbkgzZjZhWE5YSUd6MjQ5QllQcGh1UGZZMnZ5Q0lILDE0NDY4OTY4NQ0200sPi5C0Nx/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RrgVZCDiOqgoJOUi4LjmfvU
                            [object] => line_item
                            [amount] => 9900
                            [amount_excluding_tax] => 9900
                            [currency] => usd
                            [description] => 1 × gggg (at $99.00 / day)
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RrgVZCDiOqgoJOUCNE8TuKu
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => 
                                    [subscription_item_details] => Array
                                        (
                                            [invoice_item] => 
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => sub_1RqEaWCDiOqgoJOU1evlKcYA
                                            [subscription_item] => si_Slm86PwjFirzFK
                                        )

                                    [type] => subscription_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1754231586
                                    [start] => 1754145186
                                )

                            [plan] => Array
                                (
                                    [id] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                    [object] => plan
                                    [active] => 1
                                    [aggregate_usage] => 
                                    [amount] => 9900
                                    [amount_decimal] => 9900
                                    [billing_scheme] => per_unit
                                    [created] => 1753345386
                                    [currency] => usd
                                    [interval] => day
                                    [interval_count] => 1
                                    [livemode] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [meter] => 
                                    [nickname] => 
                                    [product] => prod_Sjo2eLoEDhLJSz
                                    [tiers_mode] => 
                                    [transform_usage] => 
                                    [trial_period_days] => 
                                    [usage_type] => licensed
                                )

                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1753345386
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_Sjo2eLoEDhLJSz
                                    [recurring] => Array
                                        (
                                            [aggregate_usage] => 
                                            [interval] => day
                                            [interval_count] => 1
                                            [meter] => 
                                            [trial_period_days] => 
                                            [usage_type] => licensed
                                        )

                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => recurring
                                    [unit_amount] => 9900
                                    [unit_amount_decimal] => 9900
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                            [product] => prod_Sjo2eLoEDhLJSz
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 9900
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 1
                            [subscription] => sub_1RqEaWCDiOqgoJOU1evlKcYA
                            [subscription_item] => si_Slm86PwjFirzFK
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 792
                                            [inclusive] => 
                                            [tax_rate] => txr_1RmbmQCDiOqgoJOUVl6boLeV
                                            [taxability_reason] => standard_rated
                                            [taxable_amount] => 9900
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 792
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1RmbmQCDiOqgoJOUVl6boLeV
                                                )

                                            [taxability_reason] => standard_rated
                                            [taxable_amount] => 9900
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => subscription
                            [unit_amount_excluding_tax] => 9900
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1RrgVZCDiOqgoJOUCNE8TuKu/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => 8V92UGAM-0009
    [on_behalf_of] => 
    [paid] => 1
    [paid_out_of_band] => 
    [parent] => Array
        (
            [quote_details] => 
            [subscription_details] => Array
                (
                    [metadata] => Array
                        (
                        )

                    [subscription] => sub_1RqEaWCDiOqgoJOU1evlKcYA
                )

            [type] => subscription_details
        )

    [payment_intent] => pi_3RrhSGCDiOqgoJOU10aZZ4y7
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => Array
                (
                    [acss_debit] => 
                    [bancontact] => 
                    [card] => Array
                        (
                            [request_three_d_secure] => automatic
                        )

                    [customer_balance] => 
                    [konbini] => 
                    [sepa_debit] => 
                    [us_bank_account] => 
                )

            [payment_method_types] => 
        )

    [period_end] => 1754145186
    [period_start] => 1754058786
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => 
    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => paid
    [status_transitions] => Array
        (
            [finalized_at] => 1754148879
            [marked_uncollectible_at] => 
            [paid_at] => 1754148879
            [voided_at] => 
        )

    [subscription] => sub_1RqEaWCDiOqgoJOU1evlKcYA
    [subscription_details] => Array
        (
            [metadata] => Array
                (
                )

        )

    [subtotal] => 9900
    [subtotal_excluding_tax] => 9900
    [tax] => 792
    [test_clock] => 
    [total] => 10692
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 9900
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 792
                    [inclusive] => 
                    [tax_rate] => txr_1RmbmQCDiOqgoJOUVl6boLeV
                    [taxability_reason] => standard_rated
                    [taxable_amount] => 9900
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 792
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1RmbmQCDiOqgoJOUVl6boLeV
                        )

                    [taxability_reason] => standard_rated
                    [taxable_amount] => 9900
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1754145241
)

[02-Aug-2025 15:34:45 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RrgVZCDiOqgoJOUCNE8TuKu
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 10692
    [amount_overpaid] => 0
    [amount_paid] => 10692
    [amount_remaining] => 0
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 1
    [attempted] => 1
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 1
            [liability] => Array
                (
                    [type] => self
                )

            [provider] => stripe
            [status] => complete
        )

    [automatically_finalizes_at] => 
    [billing_reason] => subscription_cycle
    [charge] => ch_3RrhSGCDiOqgoJOU1yBqmfvk
    [collection_method] => charge_automatically
    [created] => 1754145241
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_Slm8NRlbsGiXDU
    [customer_address] => Array
        (
            [city] => Alabama
            [country] => US
            [line1] => Alabama
            [line2] => Alabama
            [postal_code] => 35013
            [state] => AL
        )

    [customer_email] => dadad@fdfsdfs.fsdf
    [customer_name] => hh hhh
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 
    [effective_at] => 1754148879
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TbkgzZjZhWE5YSUd6MjQ5QllQcGh1UGZZMnZ5Q0lILDE0NDY4OTY4NQ0200sPi5C0Nx?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9TbkgzZjZhWE5YSUd6MjQ5QllQcGh1UGZZMnZ5Q0lILDE0NDY4OTY4NQ0200sPi5C0Nx/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RrgVZCDiOqgoJOUi4LjmfvU
                            [object] => line_item
                            [amount] => 9900
                            [amount_excluding_tax] => 9900
                            [currency] => usd
                            [description] => 1 × gggg (at $99.00 / day)
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RrgVZCDiOqgoJOUCNE8TuKu
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => 
                                    [subscription_item_details] => Array
                                        (
                                            [invoice_item] => 
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => sub_1RqEaWCDiOqgoJOU1evlKcYA
                                            [subscription_item] => si_Slm86PwjFirzFK
                                        )

                                    [type] => subscription_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1754231586
                                    [start] => 1754145186
                                )

                            [plan] => Array
                                (
                                    [id] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                    [object] => plan
                                    [active] => 1
                                    [aggregate_usage] => 
                                    [amount] => 9900
                                    [amount_decimal] => 9900
                                    [billing_scheme] => per_unit
                                    [created] => 1753345386
                                    [currency] => usd
                                    [interval] => day
                                    [interval_count] => 1
                                    [livemode] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [meter] => 
                                    [nickname] => 
                                    [product] => prod_Sjo2eLoEDhLJSz
                                    [tiers_mode] => 
                                    [transform_usage] => 
                                    [trial_period_days] => 
                                    [usage_type] => licensed
                                )

                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1753345386
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_Sjo2eLoEDhLJSz
                                    [recurring] => Array
                                        (
                                            [aggregate_usage] => 
                                            [interval] => day
                                            [interval_count] => 1
                                            [meter] => 
                                            [trial_period_days] => 
                                            [usage_type] => licensed
                                        )

                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => recurring
                                    [unit_amount] => 9900
                                    [unit_amount_decimal] => 9900
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                            [product] => prod_Sjo2eLoEDhLJSz
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 9900
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 1
                            [subscription] => sub_1RqEaWCDiOqgoJOU1evlKcYA
                            [subscription_item] => si_Slm86PwjFirzFK
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 792
                                            [inclusive] => 
                                            [tax_rate] => txr_1RmbmQCDiOqgoJOUVl6boLeV
                                            [taxability_reason] => standard_rated
                                            [taxable_amount] => 9900
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 792
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1RmbmQCDiOqgoJOUVl6boLeV
                                                )

                                            [taxability_reason] => standard_rated
                                            [taxable_amount] => 9900
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => subscription
                            [unit_amount_excluding_tax] => 9900
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1RrgVZCDiOqgoJOUCNE8TuKu/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => 8V92UGAM-0009
    [on_behalf_of] => 
    [paid] => 1
    [paid_out_of_band] => 
    [parent] => Array
        (
            [quote_details] => 
            [subscription_details] => Array
                (
                    [metadata] => Array
                        (
                        )

                    [subscription] => sub_1RqEaWCDiOqgoJOU1evlKcYA
                )

            [type] => subscription_details
        )

    [payment_intent] => pi_3RrhSGCDiOqgoJOU10aZZ4y7
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => Array
                (
                    [acss_debit] => 
                    [bancontact] => 
                    [card] => Array
                        (
                            [request_three_d_secure] => automatic
                        )

                    [customer_balance] => 
                    [konbini] => 
                    [sepa_debit] => 
                    [us_bank_account] => 
                )

            [payment_method_types] => 
        )

    [period_end] => 1754145186
    [period_start] => 1754058786
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => 
    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => paid
    [status_transitions] => Array
        (
            [finalized_at] => 1754148879
            [marked_uncollectible_at] => 
            [paid_at] => 1754148879
            [voided_at] => 
        )

    [subscription] => sub_1RqEaWCDiOqgoJOU1evlKcYA
    [subscription_details] => Array
        (
            [metadata] => Array
                (
                )

        )

    [subtotal] => 9900
    [subtotal_excluding_tax] => 9900
    [tax] => 792
    [test_clock] => 
    [total] => 10692
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 9900
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 792
                    [inclusive] => 
                    [tax_rate] => txr_1RmbmQCDiOqgoJOUVl6boLeV
                    [taxability_reason] => standard_rated
                    [taxable_amount] => 9900
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 792
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1RmbmQCDiOqgoJOUVl6boLeV
                        )

                    [taxability_reason] => standard_rated
                    [taxable_amount] => 9900
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1754145241
)

[02-Aug-2025 15:34:46 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 3
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-08-02T08:23:57-07:00
                                            [LastUpdatedTime] => 2025-08-02T08:29:42-07:00
                                        )

                                    [GivenName] => hh hhh
                                    [FamilyName] => hh hhh
                                    [FullyQualifiedName] => hh hhh(dadad@fdfsdfs.fsdf)
                                    [DisplayName] => hh hhh(dadad@fdfsdfs.fsdf)
                                    [PrintOnCheckName] => hh hhh hh hhh
                                    [Active] => 1
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => dadad@fdfsdfs.fsdf
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-08-02T08:34:46.680-07:00
        )

)

[02-Aug-2025 15:34:46 UTC] Using QBO customer ID: 3
[02-Aug-2025 15:34:46 UTC] No existing QBO invoice found, creating new one
[02-Aug-2025 15:34:47 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 3
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-08-02T08:23:57-07:00
                                            [LastUpdatedTime] => 2025-08-02T08:29:42-07:00
                                        )

                                    [GivenName] => hh hhh
                                    [FamilyName] => hh hhh
                                    [FullyQualifiedName] => hh hhh(dadad@fdfsdfs.fsdf)
                                    [DisplayName] => hh hhh(dadad@fdfsdfs.fsdf)
                                    [PrintOnCheckName] => hh hhh hh hhh
                                    [Active] => 1
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => dadad@fdfsdfs.fsdf
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-08-02T08:34:46.951-07:00
        )

)

[02-Aug-2025 15:34:47 UTC] Using QBO customer ID: 3
[02-Aug-2025 15:34:47 UTC] Creating new QBO invoice with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 3
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 99
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 4
                                )

                            [UnitPrice] => 99
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-08-02
    [DueDate] => 2025-09-01
    [TotalAmt] => 106.92
    [PrivateNote] => Stripe Invoice ID: in_1RrgVZCDiOqgoJOUCNE8TuKu
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 7.92
        )

)

[02-Aug-2025 15:34:47 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 3
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 99
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 4
                                )

                            [UnitPrice] => 99
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-08-02
    [DueDate] => 2025-09-01
    [TotalAmt] => 106.92
    [PrivateNote] => Stripe Invoice ID: in_1RrgVZCDiOqgoJOUCNE8TuKu
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 7.92
        )

)

[02-Aug-2025 15:34:49 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 15
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-08-02T08:34:49-07:00
                            [LastUpdatedTime] => 2025-08-02T08:34:49-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-08-02
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Invoice ID: in_1RrgVZCDiOqgoJOUCNE8TuKu
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 99
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 4
                                                    [name] => 1 × gggg (at $99.00 / day)
                                                )

                                            [UnitPrice] => 99
                                            [Qty] => 1
                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 99
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 3
                                )

                            [TotalTax] => 7.92
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0.87
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 4
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 1.63
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 5
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.875
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 5.42
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 3
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 3
                            [name] => hh hhh(dadad@fdfsdfs.fsdf)
                        )

                    [DueDate] => 2025-09-01
                    [TotalAmt] => 106.92
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 106.92
                )

            [time] => 2025-08-02T08:34:48.403-07:00
        )

)

[02-Aug-2025 15:34:49 UTC] Created new QBO invoice ID: 15
[02-Aug-2025 15:34:49 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 16
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-08-02T08:34:49-07:00
                            [LastUpdatedTime] => 2025-08-02T08:34:49-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-08-02
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Invoice ID: in_1RrgVZCDiOqgoJOUCNE8TuKu
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 99
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 4
                                                    [name] => 1 × gggg (at $99.00 / day)
                                                )

                                            [UnitPrice] => 99
                                            [Qty] => 1
                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 99
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 3
                                )

                            [TotalTax] => 7.92
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0.87
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 4
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 1.63
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 5
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.875
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 5.42
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 3
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 3
                            [name] => hh hhh(dadad@fdfsdfs.fsdf)
                        )

                    [DueDate] => 2025-09-01
                    [TotalAmt] => 106.92
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 106.92
                )

            [time] => 2025-08-02T08:34:48.658-07:00
        )

)

[02-Aug-2025 15:34:49 UTC] Invoice created successfully in QBO. Invoice ID: 16
[02-Aug-2025 15:34:49 UTC] Invoice creation failed: Duplicate entry '1-in_1RrgVZCDiOqgoJOUCNE8TuKu' for key 'invoice_mappings.unique_mapping'
[02-Aug-2025 15:34:49 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[02-Aug-2025 15:34:51 UTC] Failed to create payment method: Array
(
    [code] => 400
    [body] => Array
        (
            [Fault] => Array
                (
                    [Error] => Array
                        (
                            [0] => Array
                                (
                                    [Message] => Invalid Enumeration
                                    [Detail] => Invalid Enumeration : OTHER
                                    [code] => 2170
                                    [element] => Type
                                )

                        )

                    [type] => ValidationFault
                )

            [time] => 2025-08-02T08:34:51.563-07:00
        )

)

[02-Aug-2025 15:34:51 UTC] Creating QBO payment with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 3
        )

    [TotalAmt] => 106.92
    [TxnDate] => 2025-08-02
    [PaymentRefNum] => pi_3RrhSGCDiOqgoJOU10
    [PaymentMethodRef] => Array
        (
            [value] => 1
        )

    [DepositToAccountRef] => Array
        (
            [value] => 16
        )

    [PrivateNote] => Stripe Invoice ID: in_1RrgVZCDiOqgoJOUCNE8TuKu
    [Line] => Array
        (
            [0] => Array
                (
                    [Amount] => 106.92
                    [LinkedTxn] => Array
                        (
                            [0] => Array
                                (
                                    [TxnId] => 15
                                    [TxnType] => Invoice
                                )

                        )

                )

        )

)

[02-Aug-2025 15:34:52 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Payment] => Array
                (
                    [CustomerRef] => Array
                        (
                            [value] => 3
                            [name] => hh hhh(dadad@fdfsdfs.fsdf)
                        )

                    [DepositToAccountRef] => Array
                        (
                            [value] => 16
                        )

                    [PaymentMethodRef] => Array
                        (
                            [value] => 1
                        )

                    [PaymentRefNum] => pi_3RrhSGCDiOqgoJOU10
                    [TotalAmt] => 106.92
                    [UnappliedAmt] => 0
                    [ProcessPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 17
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-08-02T08:34:52-07:00
                            [LastUpdatedTime] => 2025-08-02T08:34:52-07:00
                        )

                    [TxnDate] => 2025-08-02
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Invoice ID: in_1RrgVZCDiOqgoJOUCNE8TuKu
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Amount] => 106.92
                                    [LinkedTxn] => Array
                                        (
                                            [0] => Array
                                                (
                                                    [TxnId] => 15
                                                    [TxnType] => Invoice
                                                )

                                        )

                                    [LineEx] => Array
                                        (
                                            [any] => Array
                                                (
                                                    [0] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnId
                                                                    [Value] => 15
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                    [1] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnOpenBalance
                                                                    [Value] => 106.92
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                    [2] => Array
                                                        (
                                                            [name] => {http://schema.intuit.com/finance/v3}NameValue
                                                            [declaredType] => com.intuit.schema.finance.v3.NameValue
                                                            [scope] => javax.xml.bind.JAXBElement$GlobalScope
                                                            [value] => Array
                                                                (
                                                                    [Name] => txnReferenceNumber
                                                                )

                                                            [nil] => 
                                                            [globalScope] => 1
                                                            [typeSubstituted] => 
                                                        )

                                                )

                                        )

                                )

                        )

                )

            [time] => 2025-08-02T08:34:52.387-07:00
        )

)

[02-Aug-2025 15:34:52 UTC] Payment created successfully in QBO. Payment ID: 17
[02-Aug-2025 15:34:52 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[02-Aug-2025 15:40:28 UTC] Stripe Webhook Received: invoice.finalized (ID: evt_1RrhXsCDiOqgoJOUkyMiGdv4)
[02-Aug-2025 15:40:28 UTC] 1
[02-Aug-2025 15:40:28 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[02-Aug-2025 15:40:28 UTC] Starting invoice creation process for event: evt_1RrhXsCDiOqgoJOUkyMiGdv4
[02-Aug-2025 15:40:28 UTC] Fetching Stripe invoice: in_1RrgazCDiOqgoJOUw8t3lJi3
[02-Aug-2025 15:40:29 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RrgazCDiOqgoJOUw8t3lJi3
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 10989
    [amount_overpaid] => 0
    [amount_paid] => 10989
    [amount_remaining] => 0
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 1
    [attempted] => 1
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => subscription_cycle
    [charge] => ch_3RrhXoCDiOqgoJOU0AvSwwGV
    [collection_method] => charge_automatically
    [created] => 1754145577
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_Sjo6INOhbQe0LI
    [customer_address] => Array
        (
            [city] => Alabama
            [country] => US
            [line1] => Alabama
            [line2] => Alabama
            [postal_code] => 35015
            [state] => AL
        )

    [customer_email] => nnnn@nnn.com
    [customer_name] => ggg ggg
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                    [object] => tax_rate
                    [active] => 1
                    [country] => US
                    [created] => 1752935198
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => AL
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 
    [effective_at] => 1754149222
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9Tbkg5d2ljdDFVRTVuWWQ3N295bk54NGRLd2Jnd1NrLDE0NDY5MDAyOQ0200ZsuWvSDK?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9Tbkg5d2ljdDFVRTVuWWQ3N295bk54NGRLd2Jnd1NrLDE0NDY5MDAyOQ0200ZsuWvSDK/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RrgazCDiOqgoJOUsvsBN6W4
                            [object] => line_item
                            [amount] => 9900
                            [amount_excluding_tax] => 9900
                            [currency] => usd
                            [description] => 1 × gggg (at $99.00 / day)
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RrgazCDiOqgoJOUw8t3lJi3
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => 
                                    [subscription_item_details] => Array
                                        (
                                            [invoice_item] => 
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => sub_1RqEfyCDiOqgoJOU1i6bjHNW
                                            [subscription_item] => si_SlmEK1QAiJodF9
                                        )

                                    [type] => subscription_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1754231926
                                    [start] => 1754145526
                                )

                            [plan] => Array
                                (
                                    [id] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                    [object] => plan
                                    [active] => 1
                                    [aggregate_usage] => 
                                    [amount] => 9900
                                    [amount_decimal] => 9900
                                    [billing_scheme] => per_unit
                                    [created] => 1753345386
                                    [currency] => usd
                                    [interval] => day
                                    [interval_count] => 1
                                    [livemode] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [meter] => 
                                    [nickname] => 
                                    [product] => prod_Sjo2eLoEDhLJSz
                                    [tiers_mode] => 
                                    [transform_usage] => 
                                    [trial_period_days] => 
                                    [usage_type] => licensed
                                )

                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1753345386
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_Sjo2eLoEDhLJSz
                                    [recurring] => Array
                                        (
                                            [aggregate_usage] => 
                                            [interval] => day
                                            [interval_count] => 1
                                            [meter] => 
                                            [trial_period_days] => 
                                            [usage_type] => licensed
                                        )

                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => recurring
                                    [unit_amount] => 9900
                                    [unit_amount_decimal] => 9900
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                            [product] => prod_Sjo2eLoEDhLJSz
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 9900
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 1
                            [subscription] => sub_1RqEfyCDiOqgoJOU1i6bjHNW
                            [subscription_item] => si_SlmEK1QAiJodF9
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1089
                                            [inclusive] => 
                                            [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                                            [taxability_reason] => 
                                            [taxable_amount] => 9900
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1089
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 9900
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => subscription
                            [unit_amount_excluding_tax] => 9900
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1RrgazCDiOqgoJOUw8t3lJi3/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => HJAMRYO3-0056
    [on_behalf_of] => 
    [paid] => 1
    [paid_out_of_band] => 
    [parent] => Array
        (
            [quote_details] => 
            [subscription_details] => Array
                (
                    [metadata] => Array
                        (
                        )

                    [subscription] => sub_1RqEfyCDiOqgoJOU1i6bjHNW
                )

            [type] => subscription_details
        )

    [payment_intent] => pi_3RrhXoCDiOqgoJOU0d9SB79u
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1754145526
    [period_start] => 1754059126
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => 
    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => paid
    [status_transitions] => Array
        (
            [finalized_at] => 1754149222
            [marked_uncollectible_at] => 
            [paid_at] => 1754149222
            [voided_at] => 
        )

    [subscription] => sub_1RqEfyCDiOqgoJOU1i6bjHNW
    [subscription_details] => Array
        (
            [metadata] => Array
                (
                )

        )

    [subtotal] => 9900
    [subtotal_excluding_tax] => 9900
    [tax] => 1089
    [test_clock] => 
    [total] => 10989
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 9900
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1089
                    [inclusive] => 
                    [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                    [taxability_reason] => 
                    [taxable_amount] => 9900
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1089
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 9900
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1754145577
)

[02-Aug-2025 15:40:29 UTC] Stripe Webhook Received: invoice.paid (ID: evt_1RrhXsCDiOqgoJOUMiY8v2Ju)
[02-Aug-2025 15:40:29 UTC] 1
[02-Aug-2025 15:40:29 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[02-Aug-2025 15:40:29 UTC] Starting payment process for Stripe invoice: evt_1RrhXsCDiOqgoJOUMiY8v2Ju
[02-Aug-2025 15:40:29 UTC] Fetching Stripe invoice: in_1RrgazCDiOqgoJOUw8t3lJi3
[02-Aug-2025 15:40:29 UTC] Fetched Stripe invoice: Array
(
    [id] => in_1RrgazCDiOqgoJOUw8t3lJi3
    [object] => invoice
    [account_country] => US
    [account_name] => ratul test sandbox
    [account_tax_ids] => 
    [amount_due] => 10989
    [amount_overpaid] => 0
    [amount_paid] => 10989
    [amount_remaining] => 0
    [amount_shipping] => 0
    [application] => 
    [application_fee_amount] => 
    [attempt_count] => 1
    [attempted] => 1
    [auto_advance] => 
    [automatic_tax] => Array
        (
            [disabled_reason] => 
            [enabled] => 
            [liability] => 
            [provider] => 
            [status] => 
        )

    [automatically_finalizes_at] => 
    [billing_reason] => subscription_cycle
    [charge] => ch_3RrhXoCDiOqgoJOU0AvSwwGV
    [collection_method] => charge_automatically
    [created] => 1754145577
    [currency] => usd
    [custom_fields] => 
    [customer] => cus_Sjo6INOhbQe0LI
    [customer_address] => Array
        (
            [city] => Alabama
            [country] => US
            [line1] => Alabama
            [line2] => Alabama
            [postal_code] => 35015
            [state] => AL
        )

    [customer_email] => nnnn@nnn.com
    [customer_name] => ggg ggg
    [customer_phone] => 
    [customer_shipping] => 
    [customer_tax_exempt] => none
    [customer_tax_ids] => Array
        (
        )

    [default_payment_method] => 
    [default_source] => 
    [default_tax_rates] => Array
        (
            [0] => Array
                (
                    [id] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                    [object] => tax_rate
                    [active] => 1
                    [country] => US
                    [created] => 1752935198
                    [description] => 
                    [display_name] => Sales tax
                    [effective_percentage] => 11
                    [flat_amount] => 
                    [inclusive] => 
                    [jurisdiction] => 
                    [jurisdiction_level] => 
                    [livemode] => 
                    [metadata] => Array
                        (
                        )

                    [percentage] => 11
                    [rate_type] => percentage
                    [state] => AL
                    [tax_type] => 
                )

        )

    [description] => 
    [discount] => 
    [discounts] => Array
        (
        )

    [due_date] => 
    [effective_at] => 1754149222
    [ending_balance] => 0
    [footer] => 
    [from_invoice] => 
    [hosted_invoice_url] => https://invoice.stripe.com/i/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9Tbkg5d2ljdDFVRTVuWWQ3N295bk54NGRLd2Jnd1NrLDE0NDY5MDAyOQ0200ZsuWvSDK?s=ap
    [invoice_pdf] => https://pay.stripe.com/invoice/acct_1RbNDJCDiOqgoJOU/test_YWNjdF8xUmJOREpDRGlPcWdvSk9VLF9Tbkg5d2ljdDFVRTVuWWQ3N295bk54NGRLd2Jnd1NrLDE0NDY5MDAyOQ0200ZsuWvSDK/pdf?s=ap
    [issuer] => Array
        (
            [type] => self
        )

    [last_finalization_error] => 
    [latest_revision] => 
    [lines] => Array
        (
            [object] => list
            [data] => Array
                (
                    [0] => Array
                        (
                            [id] => il_1RrgazCDiOqgoJOUsvsBN6W4
                            [object] => line_item
                            [amount] => 9900
                            [amount_excluding_tax] => 9900
                            [currency] => usd
                            [description] => 1 × gggg (at $99.00 / day)
                            [discount_amounts] => Array
                                (
                                )

                            [discountable] => 1
                            [discounts] => Array
                                (
                                )

                            [invoice] => in_1RrgazCDiOqgoJOUw8t3lJi3
                            [livemode] => 
                            [metadata] => Array
                                (
                                )

                            [parent] => Array
                                (
                                    [invoice_item_details] => 
                                    [subscription_item_details] => Array
                                        (
                                            [invoice_item] => 
                                            [proration] => 
                                            [proration_details] => Array
                                                (
                                                    [credited_items] => 
                                                )

                                            [subscription] => sub_1RqEfyCDiOqgoJOU1i6bjHNW
                                            [subscription_item] => si_SlmEK1QAiJodF9
                                        )

                                    [type] => subscription_item_details
                                )

                            [period] => Array
                                (
                                    [end] => 1754231926
                                    [start] => 1754145526
                                )

                            [plan] => Array
                                (
                                    [id] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                    [object] => plan
                                    [active] => 1
                                    [aggregate_usage] => 
                                    [amount] => 9900
                                    [amount_decimal] => 9900
                                    [billing_scheme] => per_unit
                                    [created] => 1753345386
                                    [currency] => usd
                                    [interval] => day
                                    [interval_count] => 1
                                    [livemode] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [meter] => 
                                    [nickname] => 
                                    [product] => prod_Sjo2eLoEDhLJSz
                                    [tiers_mode] => 
                                    [transform_usage] => 
                                    [trial_period_days] => 
                                    [usage_type] => licensed
                                )

                            [pretax_credit_amounts] => Array
                                (
                                )

                            [price] => Array
                                (
                                    [id] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                    [object] => price
                                    [active] => 1
                                    [billing_scheme] => per_unit
                                    [created] => 1753345386
                                    [currency] => usd
                                    [custom_unit_amount] => 
                                    [livemode] => 
                                    [lookup_key] => 
                                    [metadata] => Array
                                        (
                                        )

                                    [nickname] => 
                                    [product] => prod_Sjo2eLoEDhLJSz
                                    [recurring] => Array
                                        (
                                            [aggregate_usage] => 
                                            [interval] => day
                                            [interval_count] => 1
                                            [meter] => 
                                            [trial_period_days] => 
                                            [usage_type] => licensed
                                        )

                                    [tax_behavior] => unspecified
                                    [tiers_mode] => 
                                    [transform_quantity] => 
                                    [type] => recurring
                                    [unit_amount] => 9900
                                    [unit_amount_decimal] => 9900
                                )

                            [pricing] => Array
                                (
                                    [price_details] => Array
                                        (
                                            [price] => price_1RoKQgCDiOqgoJOUA0exRgpl
                                            [product] => prod_Sjo2eLoEDhLJSz
                                        )

                                    [type] => price_details
                                    [unit_amount_decimal] => 9900
                                )

                            [proration] => 
                            [proration_details] => Array
                                (
                                    [credited_items] => 
                                )

                            [quantity] => 1
                            [subscription] => sub_1RqEfyCDiOqgoJOU1i6bjHNW
                            [subscription_item] => si_SlmEK1QAiJodF9
                            [tax_amounts] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1089
                                            [inclusive] => 
                                            [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                                            [taxability_reason] => 
                                            [taxable_amount] => 9900
                                        )

                                )

                            [tax_rates] => Array
                                (
                                )

                            [taxes] => Array
                                (
                                    [0] => Array
                                        (
                                            [amount] => 1089
                                            [tax_behavior] => exclusive
                                            [tax_rate_details] => Array
                                                (
                                                    [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                                                )

                                            [taxability_reason] => not_available
                                            [taxable_amount] => 9900
                                            [type] => tax_rate_details
                                        )

                                )

                            [type] => subscription
                            [unit_amount_excluding_tax] => 9900
                        )

                )

            [has_more] => 
            [total_count] => 1
            [url] => /v1/invoices/in_1RrgazCDiOqgoJOUw8t3lJi3/lines
        )

    [livemode] => 
    [metadata] => Array
        (
        )

    [next_payment_attempt] => 
    [number] => HJAMRYO3-0056
    [on_behalf_of] => 
    [paid] => 1
    [paid_out_of_band] => 
    [parent] => Array
        (
            [quote_details] => 
            [subscription_details] => Array
                (
                    [metadata] => Array
                        (
                        )

                    [subscription] => sub_1RqEfyCDiOqgoJOU1i6bjHNW
                )

            [type] => subscription_details
        )

    [payment_intent] => pi_3RrhXoCDiOqgoJOU0d9SB79u
    [payment_settings] => Array
        (
            [default_mandate] => 
            [payment_method_options] => 
            [payment_method_types] => 
        )

    [period_end] => 1754145526
    [period_start] => 1754059126
    [post_payment_credit_notes_amount] => 0
    [pre_payment_credit_notes_amount] => 0
    [quote] => 
    [receipt_number] => 
    [rendering] => 
    [rendering_options] => 
    [shipping_cost] => 
    [shipping_details] => 
    [starting_balance] => 0
    [statement_descriptor] => 
    [status] => paid
    [status_transitions] => Array
        (
            [finalized_at] => 1754149222
            [marked_uncollectible_at] => 
            [paid_at] => 1754149222
            [voided_at] => 
        )

    [subscription] => sub_1RqEfyCDiOqgoJOU1i6bjHNW
    [subscription_details] => Array
        (
            [metadata] => Array
                (
                )

        )

    [subtotal] => 9900
    [subtotal_excluding_tax] => 9900
    [tax] => 1089
    [test_clock] => 
    [total] => 10989
    [total_discount_amounts] => Array
        (
        )

    [total_excluding_tax] => 9900
    [total_pretax_credit_amounts] => Array
        (
        )

    [total_tax_amounts] => Array
        (
            [0] => Array
                (
                    [amount] => 1089
                    [inclusive] => 
                    [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                    [taxability_reason] => 
                    [taxable_amount] => 9900
                )

        )

    [total_taxes] => Array
        (
            [0] => Array
                (
                    [amount] => 1089
                    [tax_behavior] => exclusive
                    [tax_rate_details] => Array
                        (
                            [tax_rate] => txr_1RmbikCDiOqgoJOUwFqB4pkc
                        )

                    [taxability_reason] => not_available
                    [taxable_amount] => 9900
                    [type] => tax_rate_details
                )

        )

    [transfer_data] => 
    [webhooks_delivered_at] => 1754145577
)

[02-Aug-2025 15:40:31 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 484.94
                                    [BalanceWithJobs] => 484.94
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 1
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-08-01T02:22:47-07:00
                                            [LastUpdatedTime] => 2025-08-02T03:14:27-07:00
                                        )

                                    [GivenName] => ggg ggg
                                    [FamilyName] => ggg ggg
                                    [FullyQualifiedName] => ggg ggg(nnnn@nnn.com)
                                    [DisplayName] => ggg ggg(nnnn@nnn.com)
                                    [PrintOnCheckName] => ggg ggg ggg ggg
                                    [Active] => 1
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => nnnn@nnn.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-08-02T08:40:30.974-07:00
        )

)

[02-Aug-2025 15:40:31 UTC] Using QBO customer ID: 1
[02-Aug-2025 15:40:31 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 484.94
                                    [BalanceWithJobs] => 484.94
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 1
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-08-01T02:22:47-07:00
                                            [LastUpdatedTime] => 2025-08-02T03:14:27-07:00
                                        )

                                    [GivenName] => ggg ggg
                                    [FamilyName] => ggg ggg
                                    [FullyQualifiedName] => ggg ggg(nnnn@nnn.com)
                                    [DisplayName] => ggg ggg(nnnn@nnn.com)
                                    [PrintOnCheckName] => ggg ggg ggg ggg
                                    [Active] => 1
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => nnnn@nnn.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-08-02T08:40:31.176-07:00
        )

)

[02-Aug-2025 15:40:31 UTC] Using QBO customer ID: 1
[02-Aug-2025 15:40:31 UTC] No existing QBO invoice found, creating new one
[02-Aug-2025 15:40:31 UTC] Invoice data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 1
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 99
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 4
                                )

                            [UnitPrice] => 99
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-08-02
    [DueDate] => 2025-09-01
    [TotalAmt] => 109.89
    [PrivateNote] => Stripe Invoice ID: in_1RrgazCDiOqgoJOUw8t3lJi3
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 10.89
        )

)

[02-Aug-2025 15:40:32 UTC] Creating new QBO invoice with data: Array
(
    [CustomerRef] => Array
        (
            [value] => 1
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 99
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 4
                                )

                            [UnitPrice] => 99
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-08-02
    [DueDate] => 2025-09-01
    [TotalAmt] => 109.89
    [PrivateNote] => Stripe Invoice ID: in_1RrgazCDiOqgoJOUw8t3lJi3
    [AllowOnlineACHPayment] => 
    [AllowOnlineCreditCardPayment] => 
    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 10.89
        )

)

[02-Aug-2025 15:40:33 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 18
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-08-02T08:40:33-07:00
                            [LastUpdatedTime] => 2025-08-02T08:40:33-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-08-02
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Invoice ID: in_1RrgazCDiOqgoJOUw8t3lJi3
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 99
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 4
                                                    [name] => 1 × gggg (at $99.00 / day)
                                                )

                                            [UnitPrice] => 99
                                            [Qty] => 1
                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 99
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 3
                                )

                            [TotalTax] => 10.89
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 1.19
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 4
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 2.25
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 5
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.875
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 7.45
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 3
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 1
                            [name] => ggg ggg(nnnn@nnn.com)
                        )

                    [DueDate] => 2025-09-01
                    [TotalAmt] => 109.89
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 109.89
                )

            [time] => 2025-08-02T08:40:32.733-07:00
        )

)

[02-Aug-2025 15:40:33 UTC] Invoice created successfully in QBO. Invoice ID: 18
[02-Aug-2025 15:40:33 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[02-Aug-2025 15:40:33 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [Invoice] => Array
                (
                    [AllowIPNPayment] => 
                    [AllowOnlinePayment] => 
                    [AllowOnlineCreditCardPayment] => 
                    [AllowOnlineACHPayment] => 
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 19
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-08-02T08:40:33-07:00
                            [LastUpdatedTime] => 2025-08-02T08:40:33-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-08-02
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Invoice ID: in_1RrgazCDiOqgoJOUw8t3lJi3
                    [LinkedTxn] => Array
                        (
                        )

                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Amount] => 99
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 4
                                                    [name] => 1 × gggg (at $99.00 / day)
                                                )

                                            [UnitPrice] => 99
                                            [Qty] => 1
                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 99
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 3
                                )

                            [TotalTax] => 10.89
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 1.19
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 4
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 2.25
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 5
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.875
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 7.45
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 3
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 1
                            [name] => ggg ggg(nnnn@nnn.com)
                        )

                    [DueDate] => 2025-09-01
                    [TotalAmt] => 109.89
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 109.89
                )

            [time] => 2025-08-02T08:40:32.861-07:00
        )

)

[02-Aug-2025 15:40:33 UTC] Created new QBO invoice ID: 19
[02-Aug-2025 15:40:33 UTC] Payment creation failed: Duplicate entry '1-in_1RrgazCDiOqgoJOUw8t3lJi3' for key 'invoice_mappings.unique_mapping'
[02-Aug-2025 15:40:33 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[02-Aug-2025 16:37:07 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RriQfCDiOqgoJOU1hga3eSJ)
[02-Aug-2025 16:37:07 UTC] 1
[02-Aug-2025 16:37:07 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 568
[02-Aug-2025 16:37:07 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 572
[02-Aug-2025 16:37:07 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[02-Aug-2025 16:37:07 UTC] Starting sales receipt creation process for event: evt_3RriQfCDiOqgoJOU1hga3eSJ
[02-Aug-2025 16:37:08 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                )

            [time] => 2025-08-02T09:37:08.380-07:00
        )

)

[02-Aug-2025 16:37:09 UTC] Using QBO customer ID: 6
[02-Aug-2025 16:37:09 UTC] Found checkout session: cs_test_a1II22Z7ahSvYqNy2t1UZX94Hb2jrEtzlmpgsuYjAIKhepMsmlo4vzOhtq
[02-Aug-2025 16:37:09 UTC] Session tax amount: $0.8
[02-Aug-2025 16:37:09 UTC] Session subtotal: $10
[02-Aug-2025 16:37:09 UTC] Calculated tax percentage from session: 8%
[02-Aug-2025 16:37:10 UTC] Found checkout session line items: 1
[02-Aug-2025 16:37:10 UTC] Line item: T Shirt, Subtotal: 10, Tax: 0.8, Total: 10.8
[02-Aug-2025 16:37:11 UTC] Total line items amount: 10, Total tax: 0.8
[02-Aug-2025 16:37:14 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 6
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 10
                    [Description] => T Shirt
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 8
                                )

                            [UnitPrice] => 10
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-08-02
    [TotalAmt] => 10.8
    [PrivateNote] => Stripe Payment Intent ID: pi_3RriQfCDiOqgoJOU127jT8Br
    [PaymentRefNum] => ch_3RriQfCDiOqgoJOU1slHgGhf
    [PaymentMethodRef] => Array
        (
            [value] => 3
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 0.8
        )

)

[02-Aug-2025 16:37:15 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 20
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-08-02T09:37:16-07:00
                            [LastUpdatedTime] => 2025-08-02T09:37:16-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-08-02
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3RriQfCDiOqgoJOU127jT8Br
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => T Shirt
                                    [Amount] => 10
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 8
                                                    [name] => T Shirt
                                                )

                                            [UnitPrice] => 10
                                            [Qty] => 1
                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 10
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 3
                                )

                            [TotalTax] => 0.8
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0.09
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 4
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 10
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0.16
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 5
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.875
                                                    [NetAmountTaxable] => 10
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0.55
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 3
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 10
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 6
                            [name] => tewt wtwt(bmrafiul.alam@gmail.com)
                        )

                    [TotalAmt] => 10.8
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 3
                            [name] => Credit Card
                        )

                    [PaymentRefNum] => ch_3RriQfCDiOqgoJOU1slHgGhf
                    [DepositToAccountRef] => Array
                        (
                            [value] => 16
                            [name] => Payments to deposit
                        )

                )

            [time] => 2025-08-02T09:37:15.262-07:00
        )

)

[02-Aug-2025 16:37:15 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 20
[02-Aug-2025 16:37:15 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[02-Aug-2025 16:44:38 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RriXxCDiOqgoJOU1m5RXLh0)
[02-Aug-2025 16:44:38 UTC] 1
[02-Aug-2025 16:44:38 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 568
[02-Aug-2025 16:44:38 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 572
[02-Aug-2025 16:44:38 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[02-Aug-2025 16:44:38 UTC] Starting sales receipt creation process for event: evt_3RriXxCDiOqgoJOU1m5RXLh0
[02-Aug-2025 16:44:39 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 6
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-08-02T09:37:09-07:00
                                            [LastUpdatedTime] => 2025-08-02T09:37:09-07:00
                                        )

                                    [GivenName] => tewt wtwt
                                    [FamilyName] => tewt wtwt
                                    [FullyQualifiedName] => tewt wtwt(bmrafiul.alam@gmail.com)
                                    [DisplayName] => tewt wtwt(bmrafiul.alam@gmail.com)
                                    [PrintOnCheckName] => tewt wtwt tewt wtwt
                                    [Active] => 1
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => bmrafiul.alam@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-08-02T09:44:39.776-07:00
        )

)

[02-Aug-2025 16:44:39 UTC] Using QBO customer ID: 6
[02-Aug-2025 16:44:40 UTC] Found checkout session: cs_test_a1TdrzXt33Pk2IXBL7nUxZwzxbLrxwTP3uz4zTYqwl7QITIO6Atm8kzXfV
[02-Aug-2025 16:44:40 UTC] Session tax amount: $0
[02-Aug-2025 16:44:40 UTC] Session subtotal: $10
[02-Aug-2025 16:44:40 UTC] Found checkout session line items: 1
[02-Aug-2025 16:44:40 UTC] Line item: T Shirt, Subtotal: 10, Tax: 0, Total: 10
[02-Aug-2025 16:44:42 UTC] Total line items amount: 10, Total tax: 0
[02-Aug-2025 16:44:43 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 6
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 10
                    [Description] => T Shirt
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 8
                                )

                            [UnitPrice] => 10
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => NON
                                )

                        )

                )

        )

    [TxnDate] => 2025-08-02
    [TotalAmt] => 10
    [PrivateNote] => Stripe Payment Intent ID: pi_3RriXxCDiOqgoJOU178Mo3Po
    [PaymentRefNum] => ch_3RriXxCDiOqgoJOU16IY0VVh
    [PaymentMethodRef] => Array
        (
            [value] => 3
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

)

[02-Aug-2025 16:44:45 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 21
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-08-02T09:44:45-07:00
                            [LastUpdatedTime] => 2025-08-02T09:44:45-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-08-02
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3RriXxCDiOqgoJOU178Mo3Po
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => T Shirt
                                    [Amount] => 10
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 8
                                                    [name] => T Shirt
                                                )

                                            [UnitPrice] => 10
                                            [Qty] => 1
                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => NON
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 10
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 3
                                )

                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 4
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 5
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.875
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 3
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 6
                            [name] => tewt wtwt(bmrafiul.alam@gmail.com)
                        )

                    [TotalAmt] => 10
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 3
                            [name] => Credit Card
                        )

                    [PaymentRefNum] => ch_3RriXxCDiOqgoJOU16IY0VVh
                    [DepositToAccountRef] => Array
                        (
                            [value] => 16
                            [name] => Payments to deposit
                        )

                )

            [time] => 2025-08-02T09:44:44.691-07:00
        )

)

[02-Aug-2025 16:44:45 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 21
[02-Aug-2025 16:44:45 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[03-Aug-2025 09:27:52 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RryCnCDiOqgoJOU0XGCAGDR)
[03-Aug-2025 09:27:52 UTC] 1
[03-Aug-2025 09:27:52 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 568
[03-Aug-2025 09:27:52 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 572
[03-Aug-2025 09:27:52 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[03-Aug-2025 09:27:52 UTC] Starting sales receipt creation process for event: evt_3RryCnCDiOqgoJOU0XGCAGDR
[03-Aug-2025 09:27:53 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => 
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1754213273601
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[03-Aug-2025 09:27:54 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => 
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1754213274318
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[03-Aug-2025 09:27:54 UTC] Sales receipt creation failed: Failed to find or create customer in QuickBooks
[03-Aug-2025 09:27:54 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:671
Stack trace:
#0 /home/mhossain/public_html/stripe-app/stripe-webhook.php(55): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 671
[03-Aug-2025 09:39:57 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RryOUCDiOqgoJOU1KqqKdPU)
[03-Aug-2025 09:39:57 UTC] 1
[03-Aug-2025 09:39:57 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 568
[03-Aug-2025 09:39:57 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 572
[03-Aug-2025 09:39:57 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[03-Aug-2025 09:39:57 UTC] Starting sales receipt creation process for event: evt_3RryOUCDiOqgoJOU1KqqKdPU
[03-Aug-2025 09:39:58 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => 
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1754213998423
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[03-Aug-2025 09:39:59 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => 
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1754213999119
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[03-Aug-2025 09:39:59 UTC] Sales receipt creation failed: Failed to find or create customer in QuickBooks
[03-Aug-2025 09:39:59 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:671
Stack trace:
#0 /home/mhossain/public_html/stripe-app/stripe-webhook.php(55): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 671
[03-Aug-2025 10:06:23 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rryo4CDiOqgoJOU1Y0RHk7D)
[03-Aug-2025 10:06:23 UTC] 1
[03-Aug-2025 10:06:23 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 568
[03-Aug-2025 10:06:23 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 572
[03-Aug-2025 10:06:23 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[03-Aug-2025 10:06:23 UTC] Starting sales receipt creation process for event: evt_3Rryo4CDiOqgoJOU1Y0RHk7D
[03-Aug-2025 10:06:25 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => 
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1754215584936
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[03-Aug-2025 10:06:25 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => 
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1754215585653
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[03-Aug-2025 10:06:25 UTC] Sales receipt creation failed: Failed to find or create customer in QuickBooks
[03-Aug-2025 10:06:25 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:671
Stack trace:
#0 /home/mhossain/public_html/stripe-app/stripe-webhook.php(55): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 671
[03-Aug-2025 10:27:16 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rrz8ICDiOqgoJOU0t1Qqn2h)
[03-Aug-2025 10:27:16 UTC] 1
[03-Aug-2025 10:27:16 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 568
[03-Aug-2025 10:27:16 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 572
[03-Aug-2025 10:27:16 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[03-Aug-2025 10:27:16 UTC] Starting sales receipt creation process for event: evt_3Rrz8ICDiOqgoJOU0t1Qqn2h
[03-Aug-2025 10:27:18 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => 
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1754216837956
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[03-Aug-2025 10:27:18 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => 
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1754216838675
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[03-Aug-2025 10:27:18 UTC] Sales receipt creation failed: Failed to find or create customer in QuickBooks
[03-Aug-2025 10:27:18 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:671
Stack trace:
#0 /home/mhossain/public_html/stripe-app/stripe-webhook.php(55): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 671
[03-Aug-2025 10:30:18 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RrzBDCDiOqgoJOU14elfDLv)
[03-Aug-2025 10:30:18 UTC] 1
[03-Aug-2025 10:30:18 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 568
[03-Aug-2025 10:30:18 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 572
[03-Aug-2025 10:30:18 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[03-Aug-2025 10:30:18 UTC] Starting sales receipt creation process for event: evt_3RrzBDCDiOqgoJOU14elfDLv
[03-Aug-2025 10:30:18 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => 
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1754217018714
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[03-Aug-2025 10:30:19 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => 
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1754217019451
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[03-Aug-2025 10:30:19 UTC] Sales receipt creation failed: Failed to find or create customer in QuickBooks
[03-Aug-2025 10:30:19 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:671
Stack trace:
#0 /home/mhossain/public_html/stripe-app/stripe-webhook.php(55): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 671
[03-Aug-2025 15:29:00 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rs3qHCDiOqgoJOU1mfHig6m)
[03-Aug-2025 15:29:00 UTC] 1
[03-Aug-2025 15:29:00 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 568
[03-Aug-2025 15:29:00 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 572
[03-Aug-2025 15:29:00 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[03-Aug-2025 15:29:00 UTC] Starting sales receipt creation process for event: evt_3Rs3qHCDiOqgoJOU1mfHig6m
[03-Aug-2025 15:29:01 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                )

            [time] => 2025-08-03T08:29:01.380-07:00
        )

)

[03-Aug-2025 15:29:02 UTC] Using QBO customer ID: 7
[03-Aug-2025 15:29:03 UTC] Found checkout session: cs_test_a1gf1BDptt2o38PtpInTZse4lrVs54N53XXLp1fxz1Jkt7258uMHiYuQMx
[03-Aug-2025 15:29:03 UTC] Session tax amount: $0
[03-Aug-2025 15:29:03 UTC] Session subtotal: $99
[03-Aug-2025 15:29:03 UTC] Found checkout session line items: 1
[03-Aug-2025 15:29:03 UTC] Line item: gggg, Subtotal: 99, Tax: 0, Total: 99
[03-Aug-2025 15:29:05 UTC] Total line items amount: 99, Total tax: 0
[03-Aug-2025 15:29:06 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 7
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 99
                    [Description] => gggg
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 5
                                )

                            [UnitPrice] => 99
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => NON
                                )

                        )

                )

        )

    [TxnDate] => 2025-08-03
    [TotalAmt] => 99
    [PrivateNote] => Stripe Payment Intent ID: pi_3Rs3qHCDiOqgoJOU1vtL6Sw5
    [PaymentRefNum] => ch_3Rs3qHCDiOqgoJOU1JmpJyMq
    [PaymentMethodRef] => Array
        (
            [value] => 3
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

)

[03-Aug-2025 15:29:08 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 22
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-08-03T08:29:08-07:00
                            [LastUpdatedTime] => 2025-08-03T08:29:08-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-08-03
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3Rs3qHCDiOqgoJOU1vtL6Sw5
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => gggg
                                    [Amount] => 99
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 5
                                                    [name] => gggg
                                                )

                                            [UnitPrice] => 99
                                            [Qty] => 1
                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => NON
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 99
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 3
                                )

                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 4
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 5
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.875
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 3
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 7
                            [name] => tewt wtwt(ratulbinhasan.integration@gmail.com)
                        )

                    [TotalAmt] => 99
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 3
                            [name] => Credit Card
                        )

                    [PaymentRefNum] => ch_3Rs3qHCDiOqgoJOU1JmpJyMq
                    [DepositToAccountRef] => Array
                        (
                            [value] => 16
                            [name] => Payments to deposit
                        )

                )

            [time] => 2025-08-03T08:29:07.565-07:00
        )

)

[03-Aug-2025 15:29:08 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 22
[03-Aug-2025 15:29:08 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[03-Aug-2025 15:29:43 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rs3qyCDiOqgoJOU0rOUAo95)
[03-Aug-2025 15:29:43 UTC] 1
[03-Aug-2025 15:29:43 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 568
[03-Aug-2025 15:29:43 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 572
[03-Aug-2025 15:29:43 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[03-Aug-2025 15:29:43 UTC] Starting sales receipt creation process for event: evt_3Rs3qyCDiOqgoJOU0rOUAo95
[03-Aug-2025 15:29:44 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 108.03
                                    [BalanceWithJobs] => 108.03
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 4
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-08-02T08:29:25-07:00
                                            [LastUpdatedTime] => 2025-08-02T08:29:27-07:00
                                        )

                                    [GivenName] => jjj jjjj
                                    [FamilyName] => jjj jjjj
                                    [FullyQualifiedName] => jjj jjjj(baaamrafiul.alam@gmail.com)
                                    [DisplayName] => jjj jjjj(baaamrafiul.alam@gmail.com)
                                    [PrintOnCheckName] => jjj jjjj jjj jjjj
                                    [Active] => 1
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => baaamrafiul.alam@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-08-03T08:29:44.034-07:00
        )

)

[03-Aug-2025 15:29:44 UTC] Using QBO customer ID: 4
[03-Aug-2025 15:29:44 UTC] No Checkout Session found for Payment Intent: pi_3Rs3qyCDiOqgoJOU08qzuWXL
[03-Aug-2025 15:29:44 UTC] No line items found from checkout session, trying to get from invoice
[03-Aug-2025 15:29:44 UTC] Found invoice line items: 1
[03-Aug-2025 15:29:44 UTC] Processing subscription invoice
[03-Aug-2025 15:29:45 UTC] Using product name from Stripe: gggg
[03-Aug-2025 15:29:48 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 4
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 99
                    [Description] => 1 × gggg (at $99.00 / day)
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 5
                                )

                            [UnitPrice] => 99
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => NON
                                )

                        )

                )

        )

    [TxnDate] => 2025-08-03
    [TotalAmt] => 99
    [PrivateNote] => Stripe Payment Intent ID: pi_3Rs3qyCDiOqgoJOU08qzuWXL
    [PaymentRefNum] => ch_3Rs3qyCDiOqgoJOU0q45zvju
    [PaymentMethodRef] => Array
        (
            [value] => 3
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

)

[03-Aug-2025 15:29:49 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 23
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-08-03T08:29:50-07:00
                            [LastUpdatedTime] => 2025-08-03T08:29:50-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-08-03
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3Rs3qyCDiOqgoJOU08qzuWXL
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => 1 × gggg (at $99.00 / day)
                                    [Amount] => 99
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 5
                                                    [name] => gggg
                                                )

                                            [UnitPrice] => 99
                                            [Qty] => 1
                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => NON
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 99
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 3
                                )

                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 4
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 5
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.875
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 3
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 4
                            [name] => jjj jjjj(baaamrafiul.alam@gmail.com)
                        )

                    [TotalAmt] => 99
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 3
                            [name] => Credit Card
                        )

                    [PaymentRefNum] => ch_3Rs3qyCDiOqgoJOU0q45zvju
                    [DepositToAccountRef] => Array
                        (
                            [value] => 16
                            [name] => Payments to deposit
                        )

                )

            [time] => 2025-08-03T08:29:49.345-07:00
        )

)

[03-Aug-2025 15:29:49 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 23
[03-Aug-2025 15:29:49 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[03-Aug-2025 15:33:39 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rs3ulCDiOqgoJOU1WLz6Yk0)
[03-Aug-2025 15:33:39 UTC] 1
[03-Aug-2025 15:33:39 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 568
[03-Aug-2025 15:33:39 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 572
[03-Aug-2025 15:33:39 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[03-Aug-2025 15:33:39 UTC] Starting sales receipt creation process for event: evt_3Rs3ulCDiOqgoJOU1WLz6Yk0
[03-Aug-2025 15:33:39 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 6
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-08-02T09:37:09-07:00
                                            [LastUpdatedTime] => 2025-08-02T09:37:09-07:00
                                        )

                                    [GivenName] => tewt wtwt
                                    [FamilyName] => tewt wtwt
                                    [FullyQualifiedName] => tewt wtwt(bmrafiul.alam@gmail.com)
                                    [DisplayName] => tewt wtwt(bmrafiul.alam@gmail.com)
                                    [PrintOnCheckName] => tewt wtwt tewt wtwt
                                    [Active] => 1
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => bmrafiul.alam@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-08-03T08:33:39.775-07:00
        )

)

[03-Aug-2025 15:33:39 UTC] Using QBO customer ID: 6
[03-Aug-2025 15:33:40 UTC] Found checkout session: cs_test_a1j84aHZI7JglQTf5bAM5kYg4hAWf8F8Ah9TqCxGcztoCFm9JAOVuVL0WS
[03-Aug-2025 15:33:40 UTC] Session tax amount: $7.92
[03-Aug-2025 15:33:40 UTC] Session subtotal: $99
[03-Aug-2025 15:33:40 UTC] Calculated tax percentage from session: 8%
[03-Aug-2025 15:33:40 UTC] Found checkout session line items: 1
[03-Aug-2025 15:33:40 UTC] Line item: gggg, Subtotal: 99, Tax: 7.92, Total: 106.92
[03-Aug-2025 15:33:42 UTC] Total line items amount: 99, Total tax: 7.92
[03-Aug-2025 15:33:44 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 6
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 99
                    [Description] => gggg
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 5
                                )

                            [UnitPrice] => 99
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-08-03
    [TotalAmt] => 106.92
    [PrivateNote] => Stripe Payment Intent ID: pi_3Rs3ulCDiOqgoJOU1V1BFxxL
    [PaymentRefNum] => ch_3Rs3ulCDiOqgoJOU1LDvHm5O
    [PaymentMethodRef] => Array
        (
            [value] => 3
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 7.92
        )

)

[03-Aug-2025 15:33:45 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 24
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-08-03T08:33:46-07:00
                            [LastUpdatedTime] => 2025-08-03T08:33:46-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-08-03
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3Rs3ulCDiOqgoJOU1V1BFxxL
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => gggg
                                    [Amount] => 99
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 5
                                                    [name] => gggg
                                                )

                                            [UnitPrice] => 99
                                            [Qty] => 1
                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 99
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 3
                                )

                            [TotalTax] => 7.92
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0.87
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 4
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 1.63
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 5
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.875
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 5.42
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 3
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 6
                            [name] => tewt wtwt(bmrafiul.alam@gmail.com)
                        )

                    [TotalAmt] => 106.92
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 3
                            [name] => Credit Card
                        )

                    [PaymentRefNum] => ch_3Rs3ulCDiOqgoJOU1LDvHm5O
                    [DepositToAccountRef] => Array
                        (
                            [value] => 16
                            [name] => Payments to deposit
                        )

                )

            [time] => 2025-08-03T08:33:45.418-07:00
        )

)

[03-Aug-2025 15:33:45 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 24
[03-Aug-2025 15:33:45 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[03-Aug-2025 15:33:56 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rs3v3CDiOqgoJOU0eaXzyOq)
[03-Aug-2025 15:33:56 UTC] 1
[03-Aug-2025 15:33:56 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 568
[03-Aug-2025 15:33:56 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 572
[03-Aug-2025 15:33:56 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[03-Aug-2025 15:33:56 UTC] Starting sales receipt creation process for event: evt_3Rs3v3CDiOqgoJOU0eaXzyOq
[03-Aug-2025 15:33:57 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 106.92
                                    [BalanceWithJobs] => 106.92
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 3
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-08-02T08:23:57-07:00
                                            [LastUpdatedTime] => 2025-08-02T08:34:52-07:00
                                        )

                                    [GivenName] => hh hhh
                                    [FamilyName] => hh hhh
                                    [FullyQualifiedName] => hh hhh(dadad@fdfsdfs.fsdf)
                                    [DisplayName] => hh hhh(dadad@fdfsdfs.fsdf)
                                    [PrintOnCheckName] => hh hhh hh hhh
                                    [Active] => 1
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => dadad@fdfsdfs.fsdf
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-08-03T08:33:57.205-07:00
        )

)

[03-Aug-2025 15:33:57 UTC] Using QBO customer ID: 3
[03-Aug-2025 15:33:57 UTC] No Checkout Session found for Payment Intent: pi_3Rs3v3CDiOqgoJOU0jU8pVEb
[03-Aug-2025 15:33:57 UTC] No line items found from checkout session, trying to get from invoice
[03-Aug-2025 15:33:57 UTC] Found invoice line items: 1
[03-Aug-2025 15:33:57 UTC] Processing subscription invoice
[03-Aug-2025 15:33:58 UTC] Using product name from Stripe: gggg
[03-Aug-2025 15:34:02 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 3
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 99
                    [Description] => 1 × gggg (at $99.00 / day)
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 5
                                )

                            [UnitPrice] => 99
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-08-03
    [TotalAmt] => 106.92
    [PrivateNote] => Stripe Payment Intent ID: pi_3Rs3v3CDiOqgoJOU0jU8pVEb
    [PaymentRefNum] => ch_3Rs3v3CDiOqgoJOU0GA9NefO
    [PaymentMethodRef] => Array
        (
            [value] => 3
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 7.92
        )

)

[03-Aug-2025 15:34:03 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 25
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-08-03T08:34:04-07:00
                            [LastUpdatedTime] => 2025-08-03T08:34:04-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-08-03
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3Rs3v3CDiOqgoJOU0jU8pVEb
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => 1 × gggg (at $99.00 / day)
                                    [Amount] => 99
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 5
                                                    [name] => gggg
                                                )

                                            [UnitPrice] => 99
                                            [Qty] => 1
                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 99
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 3
                                )

                            [TotalTax] => 7.92
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0.87
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 4
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 1.63
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 5
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.875
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 5.42
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 3
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 3
                            [name] => hh hhh(dadad@fdfsdfs.fsdf)
                        )

                    [TotalAmt] => 106.92
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 3
                            [name] => Credit Card
                        )

                    [PaymentRefNum] => ch_3Rs3v3CDiOqgoJOU0GA9NefO
                    [DepositToAccountRef] => Array
                        (
                            [value] => 16
                            [name] => Payments to deposit
                        )

                )

            [time] => 2025-08-03T08:34:03.318-07:00
        )

)

[03-Aug-2025 15:34:03 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 25
[03-Aug-2025 15:34:03 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[03-Aug-2025 15:39:07 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rs403CDiOqgoJOU1RdlNmix)
[03-Aug-2025 15:39:07 UTC] 1
[03-Aug-2025 15:39:07 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 568
[03-Aug-2025 15:39:07 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 572
[03-Aug-2025 15:39:07 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[03-Aug-2025 15:39:07 UTC] Starting sales receipt creation process for event: evt_3Rs403CDiOqgoJOU1RdlNmix
[03-Aug-2025 15:39:08 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 6
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-08-02T09:37:09-07:00
                                            [LastUpdatedTime] => 2025-08-02T09:37:09-07:00
                                        )

                                    [GivenName] => tewt wtwt
                                    [FamilyName] => tewt wtwt
                                    [FullyQualifiedName] => tewt wtwt(bmrafiul.alam@gmail.com)
                                    [DisplayName] => tewt wtwt(bmrafiul.alam@gmail.com)
                                    [PrintOnCheckName] => tewt wtwt tewt wtwt
                                    [Active] => 1
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => bmrafiul.alam@gmail.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-08-03T08:39:08.021-07:00
        )

)

[03-Aug-2025 15:39:08 UTC] Using QBO customer ID: 6
[03-Aug-2025 15:39:08 UTC] Found checkout session: cs_test_a1encvdU3Nnya3Yc2ZxwIEIJMTBpPoZ4p1aREDTFjUBXtWFXpXydqaaozf
[03-Aug-2025 15:39:08 UTC] Session tax amount: $7.92
[03-Aug-2025 15:39:08 UTC] Session subtotal: $99
[03-Aug-2025 15:39:08 UTC] Calculated tax percentage from session: 8%
[03-Aug-2025 15:39:08 UTC] Found checkout session line items: 1
[03-Aug-2025 15:39:08 UTC] Line item: gggg, Subtotal: 99, Tax: 7.92, Total: 106.92
[03-Aug-2025 15:39:10 UTC] Total line items amount: 99, Total tax: 7.92
[03-Aug-2025 15:39:13 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 6
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 99
                    [Description] => gggg
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 5
                                )

                            [UnitPrice] => 99
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-08-03
    [TotalAmt] => 106.92
    [PrivateNote] => Stripe Payment Intent ID: pi_3Rs403CDiOqgoJOU1F8FNFCs
    [PaymentRefNum] => ch_3Rs403CDiOqgoJOU12V1JugB
    [PaymentMethodRef] => Array
        (
            [value] => 3
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 7.92
        )

)

[03-Aug-2025 15:39:14 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 26
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-08-03T08:39:14-07:00
                            [LastUpdatedTime] => 2025-08-03T08:39:14-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-08-03
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3Rs403CDiOqgoJOU1F8FNFCs
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => gggg
                                    [Amount] => 99
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 5
                                                    [name] => gggg
                                                )

                                            [UnitPrice] => 99
                                            [Qty] => 1
                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 99
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 3
                                )

                            [TotalTax] => 7.92
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0.87
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 4
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 1.63
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 5
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.875
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 5.42
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 3
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 6
                            [name] => tewt wtwt(bmrafiul.alam@gmail.com)
                        )

                    [TotalAmt] => 106.92
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 3
                            [name] => Credit Card
                        )

                    [PaymentRefNum] => ch_3Rs403CDiOqgoJOU12V1JugB
                    [DepositToAccountRef] => Array
                        (
                            [value] => 16
                            [name] => Payments to deposit
                        )

                )

            [time] => 2025-08-03T08:39:13.745-07:00
        )

)

[03-Aug-2025 15:39:14 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 26
[03-Aug-2025 15:39:14 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[03-Aug-2025 15:39:57 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rs40tCDiOqgoJOU1sVRllQg)
[03-Aug-2025 15:39:57 UTC] 1
[03-Aug-2025 15:39:57 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 568
[03-Aug-2025 15:39:57 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 572
[03-Aug-2025 15:39:57 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[03-Aug-2025 15:39:57 UTC] Starting sales receipt creation process for event: evt_3Rs40tCDiOqgoJOU1sVRllQg
[03-Aug-2025 15:39:59 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 704.72
                                    [BalanceWithJobs] => 704.72
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 1
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-08-01T02:22:47-07:00
                                            [LastUpdatedTime] => 2025-08-02T08:40:33-07:00
                                        )

                                    [GivenName] => ggg ggg
                                    [FamilyName] => ggg ggg
                                    [FullyQualifiedName] => ggg ggg(nnnn@nnn.com)
                                    [DisplayName] => ggg ggg(nnnn@nnn.com)
                                    [PrintOnCheckName] => ggg ggg ggg ggg
                                    [Active] => 1
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => nnnn@nnn.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-08-03T08:39:59.305-07:00
        )

)

[03-Aug-2025 15:39:59 UTC] Using QBO customer ID: 1
[03-Aug-2025 15:39:59 UTC] No Checkout Session found for Payment Intent: pi_3Rs40tCDiOqgoJOU1s7vvvCf
[03-Aug-2025 15:39:59 UTC] No line items found from checkout session, trying to get from invoice
[03-Aug-2025 15:40:00 UTC] Found invoice line items: 1
[03-Aug-2025 15:40:00 UTC] Processing subscription invoice
[03-Aug-2025 15:40:00 UTC] Using product name from Stripe: gggg
[03-Aug-2025 15:40:04 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 1
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 99
                    [Description] => 1 × gggg (at $99.00 / day)
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 5
                                )

                            [UnitPrice] => 99
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-08-03
    [TotalAmt] => 109.89
    [PrivateNote] => Stripe Payment Intent ID: pi_3Rs40tCDiOqgoJOU1s7vvvCf
    [PaymentRefNum] => ch_3Rs40tCDiOqgoJOU1CspOjj0
    [PaymentMethodRef] => Array
        (
            [value] => 3
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 10.89
        )

)

[03-Aug-2025 15:40:06 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 27
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-08-03T08:40:06-07:00
                            [LastUpdatedTime] => 2025-08-03T08:40:06-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-08-03
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3Rs40tCDiOqgoJOU1s7vvvCf
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => 1 × gggg (at $99.00 / day)
                                    [Amount] => 99
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 5
                                                    [name] => gggg
                                                )

                                            [UnitPrice] => 99
                                            [Qty] => 1
                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 99
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 3
                                )

                            [TotalTax] => 10.89
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 1.19
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 4
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 2.25
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 5
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.875
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 7.45
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 3
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 1
                            [name] => ggg ggg(nnnn@nnn.com)
                        )

                    [TotalAmt] => 109.89
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 3
                            [name] => Credit Card
                        )

                    [PaymentRefNum] => ch_3Rs40tCDiOqgoJOU1CspOjj0
                    [DepositToAccountRef] => Array
                        (
                            [value] => 16
                            [name] => Payments to deposit
                        )

                )

            [time] => 2025-08-03T08:40:05.554-07:00
        )

)

[03-Aug-2025 15:40:06 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 27
[03-Aug-2025 15:40:06 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[03-Aug-2025 15:43:52 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rs44fCDiOqgoJOU1TxLkrBQ)
[03-Aug-2025 15:43:52 UTC] 1
[03-Aug-2025 15:43:52 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 568
[03-Aug-2025 15:43:52 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 572
[03-Aug-2025 15:43:52 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[03-Aug-2025 15:43:52 UTC] Starting sales receipt creation process for event: evt_3Rs44fCDiOqgoJOU1TxLkrBQ
[03-Aug-2025 15:43:53 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                )

            [time] => 2025-08-03T08:43:53.350-07:00
        )

)

[03-Aug-2025 15:43:54 UTC] Using QBO customer ID: 8
[03-Aug-2025 15:43:54 UTC] Found checkout session: cs_test_a1cBTJNuK6Evjw9ZET6jCWbzKDFH3dskrS9VeMDQpUnmWPbaQ83bsMLXDP
[03-Aug-2025 15:43:54 UTC] Session tax amount: $7.92
[03-Aug-2025 15:43:54 UTC] Session subtotal: $99
[03-Aug-2025 15:43:54 UTC] Calculated tax percentage from session: 8%
[03-Aug-2025 15:43:55 UTC] Found checkout session line items: 1
[03-Aug-2025 15:43:55 UTC] Line item: gggg, Subtotal: 99, Tax: 7.92, Total: 106.92
[03-Aug-2025 15:43:56 UTC] Total line items amount: 99, Total tax: 7.92
[03-Aug-2025 15:43:59 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 8
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 99
                    [Description] => gggg
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 5
                                )

                            [UnitPrice] => 99
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-08-03
    [TotalAmt] => 106.92
    [PrivateNote] => Stripe Payment Intent ID: pi_3Rs44fCDiOqgoJOU1XbO6ZYk
    [PaymentRefNum] => ch_3Rs44fCDiOqgoJOU1P6S1BtC
    [PaymentMethodRef] => Array
        (
            [value] => 3
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 7.92
        )

)

[03-Aug-2025 15:44:00 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 28
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-08-03T08:44:00-07:00
                            [LastUpdatedTime] => 2025-08-03T08:44:00-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-08-03
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3Rs44fCDiOqgoJOU1XbO6ZYk
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => gggg
                                    [Amount] => 99
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 5
                                                    [name] => gggg
                                                )

                                            [UnitPrice] => 99
                                            [Qty] => 1
                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 99
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 3
                                )

                            [TotalTax] => 7.92
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0.87
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 4
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 1.63
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 5
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.875
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 5.42
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 3
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 8
                            [name] => Root(as@y.com)
                        )

                    [TotalAmt] => 106.92
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 3
                            [name] => Credit Card
                        )

                    [PaymentRefNum] => ch_3Rs44fCDiOqgoJOU1P6S1BtC
                    [DepositToAccountRef] => Array
                        (
                            [value] => 16
                            [name] => Payments to deposit
                        )

                )

            [time] => 2025-08-03T08:43:59.907-07:00
        )

)

[03-Aug-2025 15:44:00 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 28
[03-Aug-2025 15:44:00 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[03-Aug-2025 15:47:24 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rs484CDiOqgoJOU1KJrr5IW)
[03-Aug-2025 15:47:24 UTC] 1
[03-Aug-2025 15:47:24 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 568
[03-Aug-2025 15:47:24 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 572
[03-Aug-2025 15:47:24 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[03-Aug-2025 15:47:24 UTC] Starting sales receipt creation process for event: evt_3Rs484CDiOqgoJOU1KJrr5IW
[03-Aug-2025 15:47:24 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 8
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-08-03T08:43:54-07:00
                                            [LastUpdatedTime] => 2025-08-03T08:43:54-07:00
                                        )

                                    [GivenName] => Root
                                    [FamilyName] => Root
                                    [FullyQualifiedName] => Root(as@y.com)
                                    [DisplayName] => Root(as@y.com)
                                    [PrintOnCheckName] => Root Root
                                    [Active] => 1
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => as@y.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-08-03T08:47:24.744-07:00
        )

)

[03-Aug-2025 15:47:24 UTC] Using QBO customer ID: 8
[03-Aug-2025 15:47:25 UTC] No Checkout Session found for Payment Intent: pi_3Rs484CDiOqgoJOU1nq7noZC
[03-Aug-2025 15:47:25 UTC] No line items found from checkout session, trying to get from invoice
[03-Aug-2025 15:47:25 UTC] Found invoice line items: 1
[03-Aug-2025 15:47:25 UTC] Processing subscription invoice
[03-Aug-2025 15:47:25 UTC] Using product name from Stripe: hhhhh
[03-Aug-2025 15:47:32 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 8
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 24
                    [Description] => 1 × hhhhh (at $24.00 / month)
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 9
                                )

                            [UnitPrice] => 24
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-08-03
    [TotalAmt] => 25.92
    [PrivateNote] => Stripe Payment Intent ID: pi_3Rs484CDiOqgoJOU1nq7noZC
    [PaymentRefNum] => ch_3Rs484CDiOqgoJOU1pDrVh3E
    [PaymentMethodRef] => Array
        (
            [value] => 3
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 1.92
        )

)

[03-Aug-2025 15:47:33 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 29
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-08-03T08:47:33-07:00
                            [LastUpdatedTime] => 2025-08-03T08:47:33-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-08-03
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3Rs484CDiOqgoJOU1nq7noZC
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => 1 × hhhhh (at $24.00 / month)
                                    [Amount] => 24
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 9
                                                    [name] => hhhhh
                                                )

                                            [UnitPrice] => 24
                                            [Qty] => 1
                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 24
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 3
                                )

                            [TotalTax] => 1.92
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0.21
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 4
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 24
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0.39
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 5
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.875
                                                    [NetAmountTaxable] => 24
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 1.32
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 3
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 24
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 8
                            [name] => Root(as@y.com)
                        )

                    [TotalAmt] => 25.92
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 3
                            [name] => Credit Card
                        )

                    [PaymentRefNum] => ch_3Rs484CDiOqgoJOU1pDrVh3E
                    [DepositToAccountRef] => Array
                        (
                            [value] => 16
                            [name] => Payments to deposit
                        )

                )

            [time] => 2025-08-03T08:47:33.145-07:00
        )

)

[03-Aug-2025 15:47:33 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 29
[03-Aug-2025 15:47:33 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[03-Aug-2025 16:06:54 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3Rs4QyCDiOqgoJOU0q9TQqHO)
[03-Aug-2025 16:06:54 UTC] 1
[03-Aug-2025 16:06:54 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 568
[03-Aug-2025 16:06:54 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 572
[03-Aug-2025 16:06:54 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[03-Aug-2025 16:06:54 UTC] Starting sales receipt creation process for event: evt_3Rs4QyCDiOqgoJOU0q9TQqHO
[03-Aug-2025 16:06:55 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 8
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-08-03T08:43:54-07:00
                                            [LastUpdatedTime] => 2025-08-03T08:43:54-07:00
                                        )

                                    [GivenName] => Root
                                    [FamilyName] => Root
                                    [FullyQualifiedName] => Root(as@y.com)
                                    [DisplayName] => Root(as@y.com)
                                    [PrintOnCheckName] => Root Root
                                    [Active] => 1
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => as@y.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-08-03T09:06:55.705-07:00
        )

)

[03-Aug-2025 16:06:55 UTC] Using QBO customer ID: 8
[03-Aug-2025 16:06:56 UTC] No Checkout Session found for Payment Intent: pi_3Rs4QyCDiOqgoJOU0skJemWl
[03-Aug-2025 16:06:56 UTC] No line items found from checkout session, trying to get from invoice
[03-Aug-2025 16:06:56 UTC] Found invoice line items: 1
[03-Aug-2025 16:06:56 UTC] Processing subscription invoice
[03-Aug-2025 16:06:56 UTC] Using product name from Stripe: gggg
[03-Aug-2025 16:07:01 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 8
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 99
                    [Description] => 1 × gggg (at $99.00 / day)
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 5
                                )

                            [UnitPrice] => 99
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => TAX
                                )

                        )

                )

        )

    [TxnDate] => 2025-08-03
    [TotalAmt] => 109.89
    [PrivateNote] => Stripe Payment Intent ID: pi_3Rs4QyCDiOqgoJOU0skJemWl
    [PaymentRefNum] => ch_3Rs4QyCDiOqgoJOU0R5AYu26
    [PaymentMethodRef] => Array
        (
            [value] => 3
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

    [TxnTaxDetail] => Array
        (
            [TxnTaxCodeRef] => Array
                (
                    [value] => TAX
                )

            [TotalTax] => 10.89
        )

)

[03-Aug-2025 16:07:02 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 30
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-08-03T09:07:02-07:00
                            [LastUpdatedTime] => 2025-08-03T09:07:02-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-08-03
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3Rs4QyCDiOqgoJOU0skJemWl
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => 1 × gggg (at $99.00 / day)
                                    [Amount] => 99
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 5
                                                    [name] => gggg
                                                )

                                            [UnitPrice] => 99
                                            [Qty] => 1
                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => TAX
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 99
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 3
                                )

                            [TotalTax] => 10.89
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 1.19
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 4
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 2.25
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 5
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.875
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 7.45
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 3
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 99
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 8
                            [name] => Root(as@y.com)
                        )

                    [TotalAmt] => 109.89
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 3
                            [name] => Credit Card
                        )

                    [PaymentRefNum] => ch_3Rs4QyCDiOqgoJOU0R5AYu26
                    [DepositToAccountRef] => Array
                        (
                            [value] => 16
                            [name] => Payments to deposit
                        )

                )

            [time] => 2025-08-03T09:07:02.065-07:00
        )

)

[03-Aug-2025 16:07:02 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 30
[03-Aug-2025 16:07:02 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[04-Aug-2025 09:27:39 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RsKg8CDiOqgoJOU1YvnwXil)
[04-Aug-2025 09:27:39 UTC] 1
[04-Aug-2025 09:27:39 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 568
[04-Aug-2025 09:27:39 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 572
[04-Aug-2025 09:27:39 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[04-Aug-2025 09:27:39 UTC] Starting sales receipt creation process for event: evt_3RsKg8CDiOqgoJOU1YvnwXil
[04-Aug-2025 09:27:40 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => 
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1754299659963
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[04-Aug-2025 09:27:40 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => 
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1754299660678
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[04-Aug-2025 09:27:40 UTC] Sales receipt creation failed: Failed to find or create customer in QuickBooks
[04-Aug-2025 09:27:40 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:671
Stack trace:
#0 /home/mhossain/public_html/stripe-app/stripe-webhook.php(55): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 671
[04-Aug-2025 09:40:07 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RsKsCCDiOqgoJOU1wllOwcc)
[04-Aug-2025 09:40:07 UTC] 1
[04-Aug-2025 09:40:07 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 568
[04-Aug-2025 09:40:07 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 572
[04-Aug-2025 09:40:07 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[04-Aug-2025 09:40:07 UTC] Starting sales receipt creation process for event: evt_3RsKsCCDiOqgoJOU1wllOwcc
[04-Aug-2025 09:40:08 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => 
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1754300408240
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[04-Aug-2025 09:40:09 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => 
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1754300408956
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[04-Aug-2025 09:40:09 UTC] Sales receipt creation failed: Failed to find or create customer in QuickBooks
[04-Aug-2025 09:40:09 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:671
Stack trace:
#0 /home/mhossain/public_html/stripe-app/stripe-webhook.php(55): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 671
[04-Aug-2025 10:06:27 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RsLHhCDiOqgoJOU0W0ks1ta)
[04-Aug-2025 10:06:27 UTC] 1
[04-Aug-2025 10:06:27 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 568
[04-Aug-2025 10:06:27 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 572
[04-Aug-2025 10:06:27 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[04-Aug-2025 10:06:27 UTC] Starting sales receipt creation process for event: evt_3RsLHhCDiOqgoJOU0W0ks1ta
[04-Aug-2025 10:06:28 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => 
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1754301988837
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[04-Aug-2025 10:06:29 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => 
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1754301989552
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[04-Aug-2025 10:06:29 UTC] Sales receipt creation failed: Failed to find or create customer in QuickBooks
[04-Aug-2025 10:06:29 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:671
Stack trace:
#0 /home/mhossain/public_html/stripe-app/stripe-webhook.php(55): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 671
[04-Aug-2025 10:26:48 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RsLbNCDiOqgoJOU1Y1oWaHi)
[04-Aug-2025 10:26:48 UTC] 1
[04-Aug-2025 10:26:48 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 568
[04-Aug-2025 10:26:48 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 572
[04-Aug-2025 10:26:48 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[04-Aug-2025 10:26:48 UTC] Starting sales receipt creation process for event: evt_3RsLbNCDiOqgoJOU1Y1oWaHi
[04-Aug-2025 10:26:49 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => 
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1754303208971
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[04-Aug-2025 10:26:49 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => 
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1754303209689
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[04-Aug-2025 10:26:49 UTC] Sales receipt creation failed: Failed to find or create customer in QuickBooks
[04-Aug-2025 10:26:49 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:671
Stack trace:
#0 /home/mhossain/public_html/stripe-app/stripe-webhook.php(55): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 671
[04-Aug-2025 10:30:30 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RsLexCDiOqgoJOU1io8DC3x)
[04-Aug-2025 10:30:30 UTC] 1
[04-Aug-2025 10:30:30 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 568
[04-Aug-2025 10:30:30 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 572
[04-Aug-2025 10:30:30 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[04-Aug-2025 10:30:30 UTC] Starting sales receipt creation process for event: evt_3RsLexCDiOqgoJOU1io8DC3x
[04-Aug-2025 10:30:31 UTC] Customer lookup result: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => 
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1754303431381
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[04-Aug-2025 10:30:32 UTC] Failed to create customer: Array
(
    [code] => 401
    [body] => Array
        (
            [warnings] => 
            [intuitObject] => 
            [fault] => Array
                (
                    [error] => Array
                        (
                            [0] => Array
                                (
                                    [message] => message=AuthenticationFailed; errorCode=003200; statusCode=401
                                    [detail] => 
                                    [code] => 3200
                                    [element] => 
                                )

                        )

                    [type] => AUTHENTICATION
                )

            [report] => 
            [queryResponse] => 
            [batchItemResponse] => Array
                (
                )

            [attachableResponse] => Array
                (
                )

            [syncErrorResponse] => 
            [requestId] => 
            [time] => 1754303432100
            [status] => 
            [cdcresponse] => Array
                (
                )

        )

)

[04-Aug-2025 10:30:32 UTC] Sales receipt creation failed: Failed to find or create customer in QuickBooks
[04-Aug-2025 10:30:32 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type mysqli_result as array in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php:671
Stack trace:
#0 /home/mhossain/public_html/stripe-app/stripe-webhook.php(55): process_stripe_payment_intent_succeeded_to_qbo_sales_receipt()
#1 {main}
  thrown in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 671
[04-Aug-2025 14:40:36 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RsPZ0CDiOqgoJOU1RjpKJQ8)
[04-Aug-2025 14:40:36 UTC] 1
[04-Aug-2025 14:40:36 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 568
[04-Aug-2025 14:40:36 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 572
[04-Aug-2025 14:40:36 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[04-Aug-2025 14:40:36 UTC] Starting sales receipt creation process for event: evt_3RsPZ0CDiOqgoJOU1RjpKJQ8
[04-Aug-2025 14:40:37 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 8
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-08-03T08:43:54-07:00
                                            [LastUpdatedTime] => 2025-08-03T08:43:54-07:00
                                        )

                                    [GivenName] => Root
                                    [FamilyName] => Root
                                    [FullyQualifiedName] => Root(as@y.com)
                                    [DisplayName] => Root(as@y.com)
                                    [PrintOnCheckName] => Root Root
                                    [Active] => 1
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => as@y.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-08-04T07:40:37.469-07:00
        )

)

[04-Aug-2025 14:40:37 UTC] Using QBO customer ID: 8
[04-Aug-2025 14:40:37 UTC] No Checkout Session found for Payment Intent: pi_3RsPZ0CDiOqgoJOU1QXGAdhZ
[04-Aug-2025 14:40:37 UTC] No line items found from checkout session, trying to get from invoice
[04-Aug-2025 14:40:37 UTC] No line items found from checkout session or invoice, using default line item
[04-Aug-2025 14:40:43 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 8
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 50
                    [Description] => Payment
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 10
                                )

                            [UnitPrice] => 50
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => NON
                                )

                        )

                )

        )

    [TxnDate] => 2025-08-04
    [TotalAmt] => 50
    [PrivateNote] => Stripe Payment Intent ID: pi_3RsPZ0CDiOqgoJOU1QXGAdhZ
    [PaymentRefNum] => ch_3RsPZ0CDiOqgoJOU1475ELHu
    [PaymentMethodRef] => Array
        (
            [value] => 3
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

)

[04-Aug-2025 14:40:44 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 31
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-08-04T07:40:44-07:00
                            [LastUpdatedTime] => 2025-08-04T07:40:44-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-08-04
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3RsPZ0CDiOqgoJOU1QXGAdhZ
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => Payment
                                    [Amount] => 50
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 10
                                                    [name] => Payment
                                                )

                                            [UnitPrice] => 50
                                            [Qty] => 1
                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => NON
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 50
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 3
                                )

                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 4
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 5
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.875
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 3
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 8
                            [name] => Root(as@y.com)
                        )

                    [TotalAmt] => 50
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 3
                            [name] => Credit Card
                        )

                    [PaymentRefNum] => ch_3RsPZ0CDiOqgoJOU1475ELHu
                    [DepositToAccountRef] => Array
                        (
                            [value] => 16
                            [name] => Payments to deposit
                        )

                )

            [time] => 2025-08-04T07:40:43.943-07:00
        )

)

[04-Aug-2025 14:40:44 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 31
[04-Aug-2025 14:40:44 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[04-Aug-2025 14:51:21 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RsPjPCDiOqgoJOU04CTD1CO)
[04-Aug-2025 14:51:21 UTC] 1
[04-Aug-2025 14:51:21 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 568
[04-Aug-2025 14:51:21 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 572
[04-Aug-2025 14:51:21 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[04-Aug-2025 14:51:21 UTC] Starting sales receipt creation process for event: evt_3RsPjPCDiOqgoJOU04CTD1CO
[04-Aug-2025 14:51:22 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 8
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-08-03T08:43:54-07:00
                                            [LastUpdatedTime] => 2025-08-03T08:43:54-07:00
                                        )

                                    [GivenName] => Root
                                    [FamilyName] => Root
                                    [FullyQualifiedName] => Root(as@y.com)
                                    [DisplayName] => Root(as@y.com)
                                    [PrintOnCheckName] => Root Root
                                    [Active] => 1
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => as@y.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-08-04T07:51:22.463-07:00
        )

)

[04-Aug-2025 14:51:22 UTC] Using QBO customer ID: 8
[04-Aug-2025 14:51:22 UTC] No Checkout Session found for Payment Intent: pi_3RsPjPCDiOqgoJOU07sgTdPj
[04-Aug-2025 14:51:22 UTC] No line items found from checkout session, trying to get from invoice
[04-Aug-2025 14:51:22 UTC] No line items found from checkout session or invoice, using default line item
[04-Aug-2025 14:51:27 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 8
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 50
                    [Description] => Stripe Payment
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 11
                                )

                            [UnitPrice] => 50
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => NON
                                )

                        )

                )

        )

    [TxnDate] => 2025-08-04
    [TotalAmt] => 50
    [PrivateNote] => Stripe Payment Intent ID: pi_3RsPjPCDiOqgoJOU07sgTdPj
    [PaymentRefNum] => ch_3RsPjPCDiOqgoJOU0j8hd8aL
    [PaymentMethodRef] => Array
        (
            [value] => 3
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

)

[04-Aug-2025 14:51:29 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 32
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-08-04T07:51:29-07:00
                            [LastUpdatedTime] => 2025-08-04T07:51:29-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-08-04
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3RsPjPCDiOqgoJOU07sgTdPj
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => Stripe Payment
                                    [Amount] => 50
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 11
                                                    [name] => Stripe Payment
                                                )

                                            [UnitPrice] => 50
                                            [Qty] => 1
                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => NON
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 50
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 3
                                )

                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 4
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 5
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.875
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 3
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 8
                            [name] => Root(as@y.com)
                        )

                    [TotalAmt] => 50
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 3
                            [name] => Credit Card
                        )

                    [PaymentRefNum] => ch_3RsPjPCDiOqgoJOU0j8hd8aL
                    [DepositToAccountRef] => Array
                        (
                            [value] => 16
                            [name] => Payments to deposit
                        )

                )

            [time] => 2025-08-04T07:51:28.699-07:00
        )

)

[04-Aug-2025 14:51:29 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 32
[04-Aug-2025 14:51:29 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[04-Aug-2025 14:57:24 UTC] Stripe Webhook Received: payment_intent.succeeded (ID: evt_3RsPpGCDiOqgoJOU1PhhrqEd)
[04-Aug-2025 14:57:24 UTC] 1
[04-Aug-2025 14:57:24 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 568
[04-Aug-2025 14:57:24 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/mhossain/public_html/stripe-app/stripe-payment-intent-succeeded-to-qbo-sales-receipt.php on line 572
[04-Aug-2025 14:57:24 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 376
[04-Aug-2025 14:57:24 UTC] Starting sales receipt creation process for event: evt_3RsPpGCDiOqgoJOU1PhhrqEd
[04-Aug-2025 14:57:25 UTC] Customer lookup result: Array
(
    [code] => 200
    [body] => Array
        (
            [QueryResponse] => Array
                (
                    [Customer] => Array
                        (
                            [0] => Array
                                (
                                    [Taxable] => 1
                                    [Notes] => Created via Stripe integration
                                    [Job] => 
                                    [BillWithParent] => 
                                    [Balance] => 0
                                    [BalanceWithJobs] => 0
                                    [CurrencyRef] => Array
                                        (
                                            [value] => USD
                                            [name] => United States Dollar
                                        )

                                    [PreferredDeliveryMethod] => None
                                    [domain] => QBO
                                    [sparse] => 
                                    [Id] => 8
                                    [SyncToken] => 0
                                    [MetaData] => Array
                                        (
                                            [CreateTime] => 2025-08-03T08:43:54-07:00
                                            [LastUpdatedTime] => 2025-08-03T08:43:54-07:00
                                        )

                                    [GivenName] => Root
                                    [FamilyName] => Root
                                    [FullyQualifiedName] => Root(as@y.com)
                                    [DisplayName] => Root(as@y.com)
                                    [PrintOnCheckName] => Root Root
                                    [Active] => 1
                                    [PrimaryEmailAddr] => Array
                                        (
                                            [Address] => as@y.com
                                        )

                                )

                        )

                    [startPosition] => 1
                    [maxResults] => 1
                )

            [time] => 2025-08-04T07:57:25.209-07:00
        )

)

[04-Aug-2025 14:57:25 UTC] Using QBO customer ID: 8
[04-Aug-2025 14:57:25 UTC] No Checkout Session found for Payment Intent: pi_3RsPpGCDiOqgoJOU1GtfQ8Kw
[04-Aug-2025 14:57:25 UTC] No line items found from checkout session, trying to get from invoice
[04-Aug-2025 14:57:25 UTC] No line items found from checkout session or invoice, using default line item
[04-Aug-2025 14:57:30 UTC] Sales receipt data prepared: Array
(
    [CustomerRef] => Array
        (
            [value] => 8
        )

    [Line] => Array
        (
            [0] => Array
                (
                    [DetailType] => SalesItemLineDetail
                    [Amount] => 100
                    [Description] => test nn
                    [SalesItemLineDetail] => Array
                        (
                            [ItemRef] => Array
                                (
                                    [value] => 12
                                )

                            [UnitPrice] => 100
                            [Qty] => 1
                            [TaxCodeRef] => Array
                                (
                                    [value] => NON
                                )

                        )

                )

        )

    [TxnDate] => 2025-08-04
    [TotalAmt] => 100
    [PrivateNote] => Stripe Payment Intent ID: pi_3RsPpGCDiOqgoJOU1GtfQ8Kw
    [PaymentRefNum] => ch_3RsPpGCDiOqgoJOU17tTzZxl
    [PaymentMethodRef] => Array
        (
            [value] => 3
        )

    [CurrencyRef] => Array
        (
            [value] => USD
        )

)

[04-Aug-2025 14:57:32 UTC] QBO API response: Array
(
    [code] => 200
    [body] => Array
        (
            [SalesReceipt] => Array
                (
                    [domain] => QBO
                    [sparse] => 
                    [Id] => 33
                    [SyncToken] => 0
                    [MetaData] => Array
                        (
                            [CreateTime] => 2025-08-04T07:57:32-07:00
                            [LastUpdatedTime] => 2025-08-04T07:57:32-07:00
                        )

                    [CustomField] => Array
                        (
                        )

                    [TxnDate] => 2025-08-04
                    [CurrencyRef] => Array
                        (
                            [value] => USD
                            [name] => United States Dollar
                        )

                    [PrivateNote] => Stripe Payment Intent ID: pi_3RsPpGCDiOqgoJOU1GtfQ8Kw
                    [Line] => Array
                        (
                            [0] => Array
                                (
                                    [Id] => 1
                                    [LineNum] => 1
                                    [Description] => test nn
                                    [Amount] => 100
                                    [DetailType] => SalesItemLineDetail
                                    [SalesItemLineDetail] => Array
                                        (
                                            [ItemRef] => Array
                                                (
                                                    [value] => 12
                                                    [name] => test nn
                                                )

                                            [UnitPrice] => 100
                                            [Qty] => 1
                                            [TaxCodeRef] => Array
                                                (
                                                    [value] => NON
                                                )

                                        )

                                )

                            [1] => Array
                                (
                                    [Amount] => 100
                                    [DetailType] => SubTotalLineDetail
                                    [SubTotalLineDetail] => Array
                                        (
                                        )

                                )

                        )

                    [TxnTaxDetail] => Array
                        (
                            [TxnTaxCodeRef] => Array
                                (
                                    [value] => 3
                                )

                            [TotalTax] => 0
                            [TaxLine] => Array
                                (
                                    [0] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 4
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 5
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 1.875
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                    [2] => Array
                                        (
                                            [Amount] => 0
                                            [DetailType] => TaxLineDetail
                                            [TaxLineDetail] => Array
                                                (
                                                    [TaxRateRef] => Array
                                                        (
                                                            [value] => 3
                                                        )

                                                    [PercentBased] => 1
                                                    [TaxPercent] => 6.25
                                                    [NetAmountTaxable] => 0
                                                )

                                        )

                                )

                        )

                    [CustomerRef] => Array
                        (
                            [value] => 8
                            [name] => Root(as@y.com)
                        )

                    [TotalAmt] => 100
                    [ApplyTaxAfterDiscount] => 
                    [PrintStatus] => NeedToPrint
                    [EmailStatus] => NotSet
                    [Balance] => 0
                    [PaymentMethodRef] => Array
                        (
                            [value] => 3
                            [name] => Credit Card
                        )

                    [PaymentRefNum] => ch_3RsPpGCDiOqgoJOU17tTzZxl
                    [DepositToAccountRef] => Array
                        (
                            [value] => 16
                            [name] => Payments to deposit
                        )

                )

            [time] => 2025-08-04T07:57:31.522-07:00
        )

)

[04-Aug-2025 14:57:32 UTC] Sales receipt created successfully in QBO. Sales Receipt ID: 33
[04-Aug-2025 14:57:32 UTC] PHP Notice:  Only variables should be passed by reference in /home/mhossain/public_html/stripe-app/functions.php on line 392
[25-Aug-2025 10:38:30 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 35
[25-Aug-2025 10:38:30 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 41
[25-Aug-2025 10:38:30 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 47
[25-Aug-2025 10:38:30 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 54
[25-Aug-2025 10:38:30 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 72
[25-Aug-2025 10:38:38 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 35
[25-Aug-2025 10:38:38 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 41
[25-Aug-2025 10:38:38 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 47
[25-Aug-2025 10:38:38 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 54
[25-Aug-2025 10:38:38 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 72
[25-Aug-2025 10:39:00 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 35
[25-Aug-2025 10:39:00 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 41
[25-Aug-2025 10:39:00 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 47
[25-Aug-2025 10:39:00 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 54
[25-Aug-2025 10:39:00 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 72
[25-Aug-2025 14:43:56 UTC] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 35
[25-Aug-2025 14:43:56 UTC] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 41
[25-Aug-2025 14:43:56 UTC] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 47
[25-Aug-2025 14:43:56 UTC] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 54
[25-Aug-2025 14:43:56 UTC] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 72
[25-Aug-2025 14:44:33 UTC] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 35
[25-Aug-2025 14:44:33 UTC] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 41
[25-Aug-2025 14:44:33 UTC] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 47
[25-Aug-2025 14:44:33 UTC] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 54
[25-Aug-2025 14:44:33 UTC] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 72
[25-Aug-2025 16:02:51 UTC] PHP Warning:  require_once(/home/wdsklsxvqb/automationv.com/stripe-app/includes/onboarding/config.php): Failed to open stream: No such file or directory in /home/wdsklsxvqb/automationv.com/stripe-app/includes/onboarding/admin_account.php on line 7
[25-Aug-2025 16:02:51 UTC] PHP Fatal error:  Uncaught Error: Failed opening required '/home/wdsklsxvqb/automationv.com/stripe-app/includes/onboarding/config.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/wdsklsxvqb/automationv.com/stripe-app/includes/onboarding/admin_account.php:7
Stack trace:
#0 /home/wdsklsxvqb/automationv.com/stripe-app/onboarding.php(851): include()
#1 {main}
  thrown in /home/wdsklsxvqb/automationv.com/stripe-app/includes/onboarding/admin_account.php on line 7
[26-Aug-2025 03:18:35 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 35
[26-Aug-2025 03:18:35 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 41
[26-Aug-2025 03:18:35 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 47
[26-Aug-2025 03:18:35 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 54
[26-Aug-2025 03:18:35 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 72
[26-Aug-2025 03:18:42 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 35
[26-Aug-2025 03:18:42 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 41
[26-Aug-2025 03:18:42 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 47
[26-Aug-2025 03:18:42 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 54
[26-Aug-2025 03:18:42 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 72
[26-Aug-2025 03:19:21 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 35
[26-Aug-2025 03:19:21 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 41
[26-Aug-2025 03:19:21 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 47
[26-Aug-2025 03:19:21 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 54
[26-Aug-2025 03:19:21 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 72
[26-Aug-2025 03:19:28 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 35
[26-Aug-2025 03:19:28 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 41
[26-Aug-2025 03:19:28 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 47
[26-Aug-2025 03:19:28 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 54
[26-Aug-2025 03:19:28 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 72
[26-Aug-2025 03:19:30 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 35
[26-Aug-2025 03:19:30 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 41
[26-Aug-2025 03:19:30 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 47
[26-Aug-2025 03:19:30 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 54
[26-Aug-2025 03:19:30 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 72
[26-Aug-2025 03:21:23 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 35
[26-Aug-2025 03:21:23 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 41
[26-Aug-2025 03:21:23 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 47
[26-Aug-2025 03:21:23 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 54
[26-Aug-2025 03:21:23 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 72
[26-Aug-2025 03:21:24 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 35
[26-Aug-2025 03:21:24 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 41
[26-Aug-2025 03:21:24 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 47
[26-Aug-2025 03:21:24 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 54
[26-Aug-2025 03:21:24 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 72
[26-Aug-2025 03:21:34 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 35
[26-Aug-2025 03:21:34 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 41
[26-Aug-2025 03:21:34 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 47
[26-Aug-2025 03:21:34 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 54
[26-Aug-2025 03:21:34 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 67
[26-Aug-2025 07:21:40 UTC] PHP Notice:  session_start(): Ignoring session_start() because a session is already active in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 5
[26-Aug-2025 07:21:40 UTC] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 35
[26-Aug-2025 07:21:40 UTC] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 41
[26-Aug-2025 07:21:40 UTC] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 47
[26-Aug-2025 07:21:40 UTC] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 54
[26-Aug-2025 07:21:40 UTC] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 67
[26-Aug-2025 03:22:32 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 35
[26-Aug-2025 03:22:32 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 41
[26-Aug-2025 03:22:32 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 47
[26-Aug-2025 03:22:32 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 54
[26-Aug-2025 03:22:32 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 67
[26-Aug-2025 07:22:45 UTC] PHP Notice:  session_start(): Ignoring session_start() because a session is already active in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 5
[26-Aug-2025 07:22:45 UTC] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 35
[26-Aug-2025 07:22:45 UTC] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 41
[26-Aug-2025 07:22:45 UTC] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 47
[26-Aug-2025 07:22:45 UTC] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 54
[26-Aug-2025 07:22:45 UTC] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 67
[26-Aug-2025 03:22:48 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 35
[26-Aug-2025 03:22:48 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 41
[26-Aug-2025 03:22:48 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 47
[26-Aug-2025 03:22:48 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 54
[26-Aug-2025 03:22:48 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 67
[26-Aug-2025 03:23:35 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 35
[26-Aug-2025 03:23:35 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 41
[26-Aug-2025 03:23:35 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 47
[26-Aug-2025 03:23:35 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 54
[26-Aug-2025 03:23:35 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 67
[26-Aug-2025 04:40:37 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 35
[26-Aug-2025 04:40:37 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 41
[26-Aug-2025 04:40:37 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 47
[26-Aug-2025 04:40:37 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 54
[26-Aug-2025 04:40:37 America/New_York] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 67
[26-Aug-2025 08:41:02 UTC] PHP Notice:  session_start(): Ignoring session_start() because a session is already active in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 5
[26-Aug-2025 08:41:02 UTC] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 35
[26-Aug-2025 08:41:02 UTC] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 41
[26-Aug-2025 08:41:02 UTC] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 47
[26-Aug-2025 08:41:02 UTC] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 54
[26-Aug-2025 08:41:02 UTC] PHP Warning:  Undefined variable $current_page in /home/wdsklsxvqb/automationv.com/stripe-app/includes/header.php on line 67
[26-Aug-2025 12:13:05 UTC] PHP Warning:  Undefined array key "stripe_customer_created_to_qbo_customer" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 337
[26-Aug-2025 12:13:05 UTC] PHP Warning:  Undefined array key "stripe_customer_updated_to_qbo_customer" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 346
[26-Aug-2025 12:13:05 UTC] PHP Warning:  Undefined array key "stripe_customer_deleted_to_qbo_customer" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 355
[26-Aug-2025 12:13:05 UTC] PHP Deprecated:  htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 120
[26-Aug-2025 12:13:05 UTC] PHP Warning:  Undefined array key "webhook_url" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 443
[26-Aug-2025 12:13:05 UTC] PHP Deprecated:  htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 120
[26-Aug-2025 12:13:14 UTC] PHP Warning:  Undefined array key "stripe_customer_created_to_qbo_customer" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 337
[26-Aug-2025 12:13:14 UTC] PHP Warning:  Undefined array key "stripe_customer_updated_to_qbo_customer" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 346
[26-Aug-2025 12:13:14 UTC] PHP Warning:  Undefined array key "stripe_customer_deleted_to_qbo_customer" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 355
[26-Aug-2025 12:13:14 UTC] PHP Warning:  Undefined array key "tax_code_ref" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 387
[26-Aug-2025 12:13:14 UTC] PHP Warning:  Undefined array key "tax_code_ref" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 387
[26-Aug-2025 12:13:14 UTC] PHP Warning:  Undefined array key "tax_code_ref" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 387
[26-Aug-2025 12:13:14 UTC] PHP Warning:  Undefined array key "tax_code_ref" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 387
[26-Aug-2025 12:13:14 UTC] PHP Warning:  Undefined array key "tax_code_ref" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 387
[26-Aug-2025 12:13:14 UTC] PHP Warning:  Undefined array key "tax_code_ref" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 387
[26-Aug-2025 12:13:14 UTC] PHP Warning:  Undefined array key "tax_code_ref" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 387
[26-Aug-2025 12:13:14 UTC] PHP Deprecated:  htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 120
[26-Aug-2025 12:13:14 UTC] PHP Warning:  Undefined array key "webhook_url" in /home/wdsklsxvqb/automationv.com/stripe-app/sync-settings.php on line 443
[26-Aug-2025 12:13:14 UTC] PHP Deprecated:  htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in /home/wdsklsxvqb/automationv.com/stripe-app/functions.php on line 120
