mollie: map more payment status (#9746)

This commit is contained in:
Benjamin Dauvergne 2020-10-11 15:31:59 +02:00
parent 27e2b29a7f
commit 26758d925f
1 changed files with 6 additions and 1 deletions

View File

@ -20,7 +20,8 @@ import requests
from six.moves.urllib.parse import parse_qs, urljoin
from .common import (CANCELLED, ERROR, PAID, URL, PaymentCommon,
PaymentException, PaymentResponse, ResponseError)
PaymentException, PaymentResponse, ResponseError, WAITING,
ACCEPTED)
__all__ = ['Payment']
@ -103,6 +104,10 @@ class Payment(PaymentCommon):
result = PAID
elif status in ('canceled', 'expired'):
result = CANCELLED
elif status in ('open', 'pending'):
result = WAITING
elif status == 'authorized':
result = ACCEPTED
else:
result = ERROR