I’m working with eBay API and for some stupid reason prices have to be in double format even if zero.
For example:
I have a price of value 100
I need to send it to eBay as 100.00 but it must NOT be a string.
No matter what I’ve tried I get float(100) and not 100.00
I’ve tried (double), (int), doubleval() without any success.
number_format is out of the question because output is a string.
I’ve spend way too much time trying to get this right.
Please help.
LE:
Value passed to eBay: [value] => 120
Returned error: You have entered invalid start price or Buy It Now price.
I’m using ebay-sdk-php and the type I’m supposed to pass is documented here
2
Answers
try this
Formated number types don’t exist in PHP. They also wouldn’t make any sense without a specific context.
But the SDK you use provides custom types for creating the XML you send to eBay. For price it should be:
If that doesn’t work, post the code that produces the error. I doubt anybody can help without it.