diff --git a/eopayment/keyware.py b/eopayment/keyware.py index 6a41337..6a4ff1f 100644 --- a/eopayment/keyware.py +++ b/eopayment/keyware.py @@ -80,12 +80,15 @@ class Payment(PaymentCommon): order_id = fields['order_id'][0] resp = self.call_endpoint('GET', 'orders/' + order_id) + # XXX: to add accepted we need to handle the capture mode (manual or + # delayed), see + # https://dev.online.emspay.eu/rest-api/features/authorizations-captures-and-voiding status = resp['status'] if status == 'completed': result = PAID - elif status == 'processing': + elif status in ('new', 'processing'): result = WAITING - elif status == 'cancelled': + elif status in ('cancelled', 'expired'): result = CANCELLED else: result = ERROR