From 3256b346f23857c39d65fce8251a60a27469dd1b Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Mon, 12 Oct 2020 16:10:54 +0200 Subject: [PATCH] dummy: use uuid4() instead of transaction_id() (#47584) --- eopayment/dummy.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/eopayment/dummy.py b/eopayment/dummy.py index 8f491f5..3128a68 100644 --- a/eopayment/dummy.py +++ b/eopayment/dummy.py @@ -14,8 +14,8 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -import string import logging +import uuid import warnings from six.moves.urllib.parse import parse_qs, urlencode @@ -37,7 +37,6 @@ def N_(message): SERVICE_URL = 'http://dummy-payment.demo.entrouvert.com/' -ALPHANUM = string.ascii_letters + string.digits LOGGER = logging.getLogger(__name__) @@ -140,7 +139,7 @@ class Payment(PaymentCommon): '%s amount %s name %s address %s email %s phone %s' ' next_url %s info1 %s info2 %s info3 %s kwargs: %s', __name__, amount, name, address, email, phone, info1, info2, info3, next_url, kwargs) - transaction_id = self.transaction_id(30, ALPHANUM, 'dummy') + transaction_id = str(uuid.uuid4().hex) normal_return_url = self.normal_return_url if next_url and not normal_return_url: warnings.warn("passing next_url to request() is deprecated, "