Fixes the setting of a payment method

This commit is contained in:
olivermrbl committed 2020-07-10 16:29:51 +02:00
1 parent e9bf18fc47
commit 9f17ab5861
4 files changed
+69 -75

No files matched your search

@@ -213,9 +213,11 @@ class KlarnaProviderService extends PaymentService {
const order = await this.klarna_.get(
`${this.klarnaOrderUrl_}/${order_id}`
)
// TODO: Klarna docs does not provide a list of statues, so we need to
// play around our selves to figure it out
let status = "initial"
if (order.status === "AUTHORIZED") {
status = "authorized"
}
return status
} catch (error) {
throw error