Fixes the setting of a payment method

This commit is contained in:
olivermrbl
2020-07-10 16:29:51 +02:00
parent e9bf18fc47
commit 9f17ab5861
4 changed files with 69 additions and 75 deletions
@@ -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