• Resolved thisiselmurod

    (@thisiselmurod)


    Hello! I’m having a problem with the good price. In the interface and the database I see the price to be an integer, but when the checkout is complete it gets converted to float, causing the server to reject the client request. The logs look like this, where the original price was 549390,70:

    {
    
    ? ? ? "Name": "35330-60060",
    
    ? ? ? "SPIC": "08708001374000000",
    
    ? ? ? "PackageCode": "1530084",
    
    ? ? ? "GoodPrice": 54939069.99999999,
    
    ? ? ? "Price": 54939069.99999999,
    
    ? ? ? "Amount": 1000,
    
    ? ? ? "VAT": 5886300,
    
    ? ? ? "VATPercent": 12,
    
    ? ? ? "Discount": 0
    
    }

    Another interesting thing is that it only happens with one product, others worked well so far. Can you help me find the snippet of code that might have this feature so that I can later fix the issue? What do you think might causing this problem?

    Thank you!

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter thisiselmurod

    (@thisiselmurod)

    Code 6: failed to parse json: json: cannot unmarshal number 54939069.99999999 into Go struct field ReceiptItem.Items.GoodPrice of type uint64
    The error message for the reference.

    Hey there, @thisiselmurod! Thanks for contacting us. I’m happy to help you.

    Have you used any third-party plugins/custom code to modify this product?

    Furthermore, I’d like to understand your site properly. Please share with us the necessary information below for us to investigate the issue further:

    System Status Report which you can find via WooCommerce > Status > Get system report > Copy for support.
    Fatal error logs (if any) under WooCommerce > Status > Logs. Then you can use the selector to search for Fatal Errors.
    You could copy and paste your reply here or paste it via https://gist.github.com/ and send the link here.

    Looking forward to your reply.

    Have a wonderful day!

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – we’ll be here if and/or when you are ready to continue.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Good price gets converted to float. Rejected by the server.’ is closed to new replies.