Projet

Général

Profil

0002-keyware-map-more-statuses-9746.patch

Benjamin Dauvergne, 12 octobre 2020 15:59

Télécharger (1,16 ko)

Voir les différences:

Subject: [PATCH 2/2] keyware: map more statuses (#9746)

 eopayment/keyware.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
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
-