netsuitephp / netsuite-php

NetSuite PHP API Client with namespaces and autoloading
Other
189 stars 85 forks source link

PHP 8 Soap call Issue ? #111

Closed ezequiel9 closed 3 years ago

ezequiel9 commented 3 years ago

Sorry guys for posting this, I am trying to solve this problem and I can't make it work.

It works fine for PHP 7.2 but not for 7.4 and 8.0

See the image of the error. Any suggest you can give me? thank you

image

The issue appear when posting a sales order.

jrebs commented 3 years ago

Looks like some data in your add request is incorrect. Impossible to tell more without complete request/response data for the 'add' call. ¯_(ツ)_/¯

neclimdul commented 3 years ago

the date in the exception looks like its working with unix time 0. wonder if there's a requirement around sales order dates being "reasonable"?

ezequiel9 commented 3 years ago

Here the request and response:

screencapture-dev-allguard-studiopublica-co-nz-checkout-step-process-on-account-2021-10-07-09_37_29

Seems like the problem is on the ItemList object

ezequiel9 commented 3 years ago

I think I figured it out, The quantity of items have to be String typed. Shit, 4 hours debugging it.. The error disappear if the qty is casted to string

$inventory_item->quantity = (string) $item['quantity'];
neclimdul commented 3 years ago

Oh man... Sorry. That was a terrible error message to be attached to that but looks like that's netsuite's fault. :(