summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Dauvergne <bdauvergne@entrouvert.com>2020-10-12 14:10:54 (GMT)
committerBenjamin Dauvergne <bdauvergne@entrouvert.com>2020-10-27 08:54:29 (GMT)
commit3256b346f23857c39d65fce8251a60a27469dd1b (patch)
tree637f0faea0d8da5a5c3c999f040f1b039b7041fd
parented22f7e18229648391f09bb46c3129ebbd751979 (diff)
downloadeopayment-3256b346f23857c39d65fce8251a60a27469dd1b.zip
eopayment-3256b346f23857c39d65fce8251a60a27469dd1b.tar.gz
eopayment-3256b346f23857c39d65fce8251a60a27469dd1b.tar.bz2
dummy: use uuid4() instead of transaction_id() (#47584)
-rw-r--r--eopayment/dummy.py5
1 files 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 <http://www.gnu.org/licenses/>.
-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, "