I'm trying to send a request using Opencart to test Klarna payment, we can create order (For the testing environment they use https://api.playground.klarna.com/ + rest of URL), But when I'm trying to send request, It says that
BAD_VALUE: total_tax_amount
I have followed this solution link below BAD VALUE: order_tax_amount
This is my array structure -
[order_lines] => Array
(
[0] => Array
(
[type] => shipping_fee
[name] => Free freight for orders over 600 Kr
[quantity] => 1
[unit_price] => 0
[tax_rate] => 0
[total_amount] => 0
[total_tax_amount] => 0
[total_discount_amount] => 0
)
[1] => Array
(
[type] => physical
[reference] => 239082
[name] => Tricky Ceiling Light
[quantity] => 1
[quantity_unit] => pcs
[unit_price] => 389900
[tax_rate] => 2501
[total_amount] => 389900
[total_tax_amount] => 78000
[merchant_data] => 8funuYNjVnsI0TzV-mUCThlZs-NH2SPmZ83oC8HCqU8,
[total_discount_amount] => 0
)
[2] => Array
(
[type] => physical
[reference] => 239614
[name] => Leeds Taklampa Råsilver 38cm
[quantity] => 1
[quantity_unit] => pcs
[unit_price] => 299900
[tax_rate] => 2501
[total_amount] => 299900
[total_tax_amount] => 60000
[merchant_data] => 8funuYNjVnsI0TzV-mUCThlZs-NH2SPmZ83oC8HCqU8,
[total_discount_amount] => 0
)
)
When I send only one product ([name] => Leeds Taklampa Råsilver 38cm), it's working fine and created orders But when the two products are sent together, then get this error.