diff --git a/addons/payment_sips/models/payment_transaction.py b/addons/payment_sips/models/payment_transaction.py index 139c2e7e1bcaf988aac4cd2360e205ff86310f86..ff005e9f5ca59359d4eec9a918ba7357290a368c 100644 --- a/addons/payment_sips/models/payment_transaction.py +++ b/addons/payment_sips/models/payment_transaction.py @@ -163,6 +163,6 @@ class PaymentTransaction(models.Model): def _sips_data_to_object(self, data): res = {} for element in data.split('|'): - key, value = element.split('=') + key, value = element.split('=', 1) res[key] = value return res diff --git a/addons/payment_sips/tests/test_sips.py b/addons/payment_sips/tests/test_sips.py index f9ae40d4ee4a5dbdb8dda19364f32ab68c436fee..b423483b461061d0497372c3a63e86214ff54103 100644 --- a/addons/payment_sips/tests/test_sips.py +++ b/addons/payment_sips/tests/test_sips.py @@ -75,8 +75,9 @@ class SipsTest(SipsCommon): 'paymentMeanBrand=IDEAL|paymentMeanType=CREDIT_TRANSFER|' 'customerIpAddress=127.0.0.1|returnContext={"return_url": ' '"/payment/process", "reference": ' - '"SO100x1"}|holderAuthentRelegation=N|holderAuthentStatus=|' - 'transactionOrigin=INTERNET|paymentPattern=ONE_SHOT|customerMobilePhone=null|' + '"SO100x1"}|scoreValue=-3.0|scoreColor=GREEN|scoreInfo=A3;N;N#SC;N;TRANS=3:2;CUMUL=4500:250000|' + 'scoreProfile=25_BUSINESS_SCORE_PRE_AUTHORISATION|scoreThreshold=-7;-5|holderAuthentRelegation=N|' + 'holderAuthentStatus=|transactionOrigin=INTERNET|paymentPattern=ONE_SHOT|customerMobilePhone=null|' 'mandateAuthentMethod=null|mandateUsage=null|transactionActors=null|' 'mandateId=null|captureLimitDate=20200408|dccStatus=null|dccResponseCode=null|' 'dccAmount=null|dccCurrencyCode=null|dccExchangeRate=null|' @@ -109,7 +110,9 @@ class SipsTest(SipsCommon): 'transactionDateTime=2020-04-08T06:24:08+02:00|transactionReference=SO100x2|' 'keyVersion=1|amount=31400|customerIpAddress=127.0.0.1|returnContext={"return_url": ' '"/payment/process", "reference": ' - '"SO100x2"}|paymentPattern=ONE_SHOT|customerMobilePhone=null|mandateAuthentMethod=null|' + '"SO100x2"}|scoreValue=-3.0|scoreColor=GREEN|scoreInfo=A3;N;N#SC;N;TRANS=3:2;CUMUL=4500:250000|' + 'scoreProfile=25_BUSINESS_SCORE_PRE_AUTHORISATION|scoreThreshold=-7;-5' + '|paymentPattern=ONE_SHOT|customerMobilePhone=null|mandateAuthentMethod=null|' 'mandateUsage=null|transactionActors=null|mandateId=null|captureLimitDate=null|' 'dccStatus=null|dccResponseCode=null|dccAmount=null|dccCurrencyCode=null|' 'dccExchangeRate=null|dccExchangeRateValidity=null|dccProvider=null|'