Error on Klarna-Integration
-
Hi!
First of all, cool plugin and thank you for the support!
I am currently working on the integration on our staging environment and for credit cards everything seems to be working fine.
I also want to use the Klarna integration. Unfortunately, this payment method throws errors all the time and I cannot identify what kind of error this is.
When I select Klarna and hit the purchase button I get the following error: BAD_VALUE|||Bad value: locale
I already talked to the Stripe support and they say that Klarna rejects the request. It tested it in test and live mode but the error occurs all the time.
This is how the requests looks in the logs:
{
“type”: “klarna”,
“amount”: “5444”,
“currency”: “EUR”,
“statement_descriptor”: “Order 3364”,
“owner”: {
“name”: “Michael XXXXX”,
“email”: “[email protected]”,
“address”: {
“city”: “Berlin”,
“country”: “DE”,
“line1”: “XXXXXX Stra?e”,
“line2”: “33”,
“postal_code”: “10589”,
“state”: “”
}
},
“redirect”: {
“return_url”: “https://XXXXX.myraidbox.de/checkout/?_payment_nonce=XXXXXX&wc-stripe-local-gateway=stripe_klarna”
},
“klarna”: {
“product”: “payment”,
“purchase_country”: “DE”,
“first_name”: “Michael”,
“last_name”: “XXXXX”,
“locale”: “de-DE-formal”,
“shipping_first_name”: “Michael”,
“shipping_last_name”: “luwado”
},
“source_order”: {
“shipping”: {
“address”: {
“city”: “Berlin”,
“country”: “DE”,
“line1”: “XXXXX Stra?e”,
“line2”: “10”,
“postal_code”: “10589”,
“state”: “”
}
},
“items”: {
“0”: {
“type”: “sku”,
“amount”: “4693”,
“currency”: “EUR”,
“quantity”: “1”,
“description”: “Duo Hydra Beaute 300 ml”
},
“1”: {
“type”: “shipping”,
“amount”: “0”,
“currency”: “EUR”,
“quantity”: “1”,
“description”: “Shipping”
},
“2”: {
“type”: “tax”,
“amount”: “751”,
“description”: “Tax”,
“quantity”: “1”,
“currency”: “EUR”
}
}
},
“metadata”: {
“order_id”: “44792”,
“created”: “1602754618”
}
}Return in the logs:
{
“error”: {
“code”: “invalid_request_error”,
“message”: “BAD_VALUE|||Bad value: locale”,
“type”: “invalid_request_error”
}
}Do you have any clue why this error occurs and how I could fix it?
Maybe the request value for locale “de-DE-formal” is incorrect?Thanks a lot!
Best
MichaelThe page I need help with: [log in to see the link]
- The topic ‘Error on Klarna-Integration’ is closed to new replies.