diff --git a/invader_payment_adyen/models/payment_transaction.py b/invader_payment_adyen/models/payment_transaction.py index 7960b2bd..331f7017 100644 --- a/invader_payment_adyen/models/payment_transaction.py +++ b/invader_payment_adyen/models/payment_transaction.py @@ -203,7 +203,8 @@ def _update_with_adyen_response(self, response): payment_data = response.message.get("paymentData") if payment_data: vals.update({"adyen_payment_data": payment_data}) - psp_reference = response.message.get("pspReference") + # In some strange case, we doesn't have this pspReference + psp_reference = response.message.get("pspReference") or response.psp if psp_reference: vals.update({"acquirer_reference": psp_reference}) result_code = response.message.get("resultCode")