From 1d82e2a7d90b955e045347c669847c602eb21b64 Mon Sep 17 00:00:00 2001 From: thomas girod <56346771+imperosol@users.noreply.github.com> Date: Mon, 12 Dec 2022 22:54:31 +0100 Subject: [PATCH] Change country id to ISO 3166 1 numeric for 3DSV2 (#510) --- counter/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/counter/models.py b/counter/models.py index bea151b3..4f6f25ea 100644 --- a/counter/models.py +++ b/counter/models.py @@ -175,13 +175,13 @@ class BillingInfo(models.Model): "Address1": self.address_1, "ZipCode": self.zip_code, "City": self.city, - "CountryCode": self.country, + "CountryCode": self.country.numeric, # ISO-3166-1 numeric code } } if self.address_2: data["Address"]["Address2"] = self.address_2 xml = dict2xml(data, wrap="Billing", newlines=False) - return '' + xml + return '\n' + xml def __str__(self): return f"{self.first_name} {self.last_name}"