feat(PaymentMethods): create endpoint.
This commit is contained in:
@@ -170,6 +170,14 @@ def purchase_json_summary(request, id):
|
||||
return JsonResponse(to_response, safe=False)
|
||||
|
||||
|
||||
def payment_methods_to_select(request):
|
||||
methods = [
|
||||
{'text': choice[1], 'value': choice[0]}
|
||||
for choice in PaymentMethods.choices
|
||||
]
|
||||
return JsonResponse(methods, safe=False)
|
||||
|
||||
|
||||
def _mask_phone(phone):
|
||||
digits = str(phone)[-3:] if phone else " " * 3
|
||||
return "X" * 7 + digits
|
||||
|
||||
Reference in New Issue
Block a user