keyware: map more statuses (#9746)
This commit is contained in:
parent
26758d925f
commit
100315ee6a
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue