replaced smart_text with smart_str equivalent (#68183)
This commit is contained in:
parent
b8269f4d3c
commit
25884a02cc
|
@ -40,7 +40,7 @@ from django.shortcuts import get_object_or_404
|
|||
from django.template.response import TemplateResponse
|
||||
from django.urls import reverse
|
||||
from django.utils import dateparse
|
||||
from django.utils.encoding import force_str, smart_text
|
||||
from django.utils.encoding import force_str, smart_str
|
||||
from django.utils.http import urlencode
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.views.decorators.csrf import csrf_exempt
|
||||
|
@ -304,7 +304,7 @@ class ValidateTransactionApiView(View):
|
|||
|
||||
amount = LocaleDecimal(request.GET['amount'])
|
||||
|
||||
logger.info('validating amount %s for transaction %s', amount, smart_text(transaction.id))
|
||||
logger.info('validating amount %s for transaction %s', amount, smart_str(transaction.id))
|
||||
try:
|
||||
result = transaction.make_eopayment(request=request).backend.validate(
|
||||
amount, transaction.bank_data
|
||||
|
@ -343,7 +343,7 @@ class CancelTransactionApiView(View):
|
|||
|
||||
amount = LocaleDecimal(request.GET['amount'])
|
||||
|
||||
logger.info('cancelling amount %s for transaction %s', amount, smart_text(transaction.id))
|
||||
logger.info('cancelling amount %s for transaction %s', amount, smart_str(transaction.id))
|
||||
try:
|
||||
result = transaction.make_eopayment(request=request).backend.cancel(amount, transaction.bank_data)
|
||||
except eopayment.ResponseError as e:
|
||||
|
@ -464,8 +464,8 @@ class PayMixin:
|
|||
return HttpResponseRedirect(get_payment_status_view(next_url=next_url))
|
||||
logger.info(
|
||||
'emitted payment request with id %s',
|
||||
smart_text(order_id),
|
||||
extra={'eopayment_order_id': smart_text(order_id), 'eopayment_data': repr(data)},
|
||||
smart_str(order_id),
|
||||
extra={'eopayment_order_id': smart_str(order_id), 'eopayment_data': repr(data)},
|
||||
)
|
||||
transaction.order_id = order_id
|
||||
transaction.save()
|
||||
|
|
Loading…
Reference in New Issue