0002-keyware-map-more-statuses-9746.patch
eopayment/keyware.py | ||
---|---|---|
80 | 80 |
order_id = fields['order_id'][0] |
81 | 81 |
resp = self.call_endpoint('GET', 'orders/' + order_id) |
82 | 82 | |
83 |
# XXX: to add accepted we need to handle the capture mode (manual or |
|
84 |
# delayed), see |
|
85 |
# https://dev.online.emspay.eu/rest-api/features/authorizations-captures-and-voiding |
|
83 | 86 |
status = resp['status'] |
84 | 87 |
if status == 'completed': |
85 | 88 |
result = PAID |
86 |
elif status == 'processing':
|
|
89 |
elif status in ('new', 'processing'):
|
|
87 | 90 |
result = WAITING |
88 |
elif status == 'cancelled':
|
|
91 |
elif status in ('cancelled', 'expired'):
|
|
89 | 92 |
result = CANCELLED |
90 | 93 |
else: |
91 | 94 |
result = ERROR |
92 |
- |