zarinpal-django-py3 icon indicating copy to clipboard operation
zarinpal-django-py3 copied to clipboard

list indices must be integers or slices, not str

Open taregh-n opened this issue 3 years ago • 4 comments

thanx for update, but i have some eror:

TypeError at /order/request/59146000

list indices must be integers or slices, not str
Request Method: GET
http://127.0.0.1:8000/order/request/59146000
3.2.4
TypeError
list indices must be integers or slices, not str
E:\WorkSpace\django\website\order\views.py, line 72, in send_request
E:\WorkSpace\django\venv\Scripts\python.exe
3.9.5
['E:\WorkSpace\django\website', 'C:\Program Files\Python39\python39.zip', 'C:\Program Files\Python39\DLLs', 'C:\Program Files\Python39\lib', 'C:\Program Files\Python39', 'E:\WorkSpace\django\venv', 'E:\WorkSpace\django\venv\lib\site-packages']
Mon, 09 Aug 2021 16:57:21 +0430

Traceback Switch to copy-and-paste view

  • E:\WorkSpace\django\venv\lib\site-packages\django\core\handlers\exception.py, line 47, in inner
    1.                 response = get_response(request)
  • E:\WorkSpace\django\venv\lib\site-packages\django\core\handlers\base.py, line 181, in _get_response
    1.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)
  • E:\WorkSpace\django\website\order\views.py, line 72, in send_request
    1.     authority = auth_data['data']['authority']

taregh-n avatar Aug 09 '21 12:08 taregh-n

could you find the solution ? nobody care here

verico1 avatar Sep 19 '21 09:09 verico1

Any solution?

MRA-AK avatar Nov 28 '21 13:11 MRA-AK

Hi, I also have this error !

MasihJavidan avatar Feb 02 '22 23:02 MasihJavidan

Zarinpal deactivated The Sandbox service, so you get this error. Test your portal with real merchant id and server address. I used this merchant id: 1344b5d4-0048-11e8-94db-005056a205be ; If you don't have real merchant id, you can use it. It is in Zarinpal docs as a example: https://docs.zarinpal.com/paymentGateway/guide/#%D8%A8%D8%A7%D8%B2%DA%AF%D8%B4%D8%AA-%D8%A8%D9%87-%D8%B3%D8%A7%DB%8C%D8%AA-%D9%BE%D8%B0%DB%8C%D8%B1%D9%86%D8%AF%D9%87

hrfahimi avatar Sep 06 '22 17:09 hrfahimi