ali-zahedi / az-iranian-bank-gateways

درگاه اتصال به بانک های ایرانی ( درگاه پرداخت بانک ملی ایران،بانک سامان، بانک ملت، درگاه پرداخت زرین پال و ... ) با استفاده از پایتون
MIT License
504 stars 87 forks source link

موقع برگشت از سداد پکیج به مشکل میخوره #126

Open mojtabaakbari221b opened 1 month ago

mojtabaakbari221b commented 1 month ago

متنش اینه :

File "/usr/local/lib/python3.9/site-packages/azbankgateways/views/banks.py", line 24, in callback_view bank.verify_from_gateway(request) File "/usr/local/lib/python3.9/site-packages/azbankgateways/banks/bmi.py", line 129, in verify_from_gateway super(BMI, self).verify_from_gateway(request) File "/usr/local/lib/python3.9/site-packages/azbankgateways/banks/banks.py", line 145, in verify_from_gateway self.prepare_verify_from_gateway() File "/usr/local/lib/python3.9/site-packages/azbankgateways/banks/bmi.py", line 124, in prepare_verify_from_gateway raise BankGatewayStateInvalid azbankgateways.exceptions.exceptions.BankGatewayStateInvalid Stack (most recent call last): File "/usr/local/bin/gunicorn", line 8, in <module> sys.exit(run()) File "/usr/local/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 67, in run WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run() File "/usr/local/lib/python3.9/site-packages/gunicorn/app/base.py", line 231, in run super().run() File "/usr/local/lib/python3.9/site-packages/gunicorn/app/base.py", line 72, in run Arbiter(self).run() File "/usr/local/lib/python3.9/site-packages/gunicorn/arbiter.py", line 202, in run self.manage_workers() File "/usr/local/lib/python3.9/site-packages/gunicorn/arbiter.py", line 551, in manage_workers self.spawn_workers() File "/usr/local/lib/python3.9/site-packages/gunicorn/arbiter.py", line 622, in spawn_workers self.spawn_worker() File "/usr/local/lib/python3.9/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker worker.init_process() File "/usr/local/lib/python3.9/site-packages/gunicorn/workers/base.py", line 142, in init_process self.run() File "/usr/local/lib/python3.9/site-packages/gunicorn/workers/sync.py", line 125, in run self.run_for_one(timeout) File "/usr/local/lib/python3.9/site-packages/gunicorn/workers/sync.py", line 69, in run_for_one self.accept(listener) File "/usr/local/lib/python3.9/site-packages/gunicorn/workers/sync.py", line 31, in accept self.handle(listener, client, addr) File "/usr/local/lib/python3.9/site-packages/gunicorn/workers/sync.py", line 136, in handle self.handle_request(listener, req, client, addr) File "/usr/local/lib/python3.9/site-packages/gunicorn/workers/sync.py", line 179, in handle_request respiter = self.wsgi(environ, resp.start_response) File "/usr/local/lib/python3.9/site-packages/django/core/handlers/wsgi.py", line 133, in __call__ response = self.get_response(request) File "/usr/local/lib/python3.9/site-packages/django/core/handlers/base.py", line 130, in get_response response = self._middleware_chain(request) File "/usr/local/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner response = get_response(request) File "/usr/local/lib/python3.9/site-packages/django/utils/deprecation.py", line 117, in __call__ response = response or self.get_response(request) File "/usr/local/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner response = get_response(request) File "/usr/local/lib/python3.9/site-packages/django/utils/deprecation.py", line 117, in __call__ response = response or self.get_response(request) File "/usr/local/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner response = get_response(request) File "/usr/local/lib/python3.9/site-packages/django/utils/deprecation.py", line 117, in __call__ response = response or self.get_response(request) File "/usr/local/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner response = get_response(request) File "/usr/local/lib/python3.9/site-packages/django/utils/deprecation.py", line 117, in __call__ response = response or self.get_response(request) File "/usr/local/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner response = get_response(request) File "/usr/local/lib/python3.9/site-packages/django/utils/deprecation.py", line 117, in __call__ response = response or self.get_response(request) File "/usr/local/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner response = get_response(request) File "/usr/local/lib/python3.9/site-packages/django/utils/deprecation.py", line 117, in __call__ response = response or self.get_response(request) File "/usr/local/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner response = get_response(request) File "/usr/local/lib/python3.9/site-packages/django/utils/deprecation.py", line 117, in __call__ response = response or self.get_response(request) File "/usr/local/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner response = get_response(request) File "/usr/local/lib/python3.9/site-packages/django/utils/deprecation.py", line 117, in __call__ response = response or self.get_response(request) File "/usr/local/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner response = get_response(request) File "/usr/local/lib/python3.9/site-packages/django/utils/deprecation.py", line 117, in __call__ response = response or self.get_response(request) File "/usr/local/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner response = get_response(request) File "/usr/local/lib/python3.9/site-packages/django/utils/deprecation.py", line 117, in __call__ response = response or self.get_response(request) File "/usr/local/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner response = get_response(request) File "/usr/local/lib/python3.9/site-packages/django/utils/deprecation.py", line 117, in __call__ response = response or self.get_response(request) File "/usr/local/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner response = get_response(request) File "/usr/local/lib/python3.9/site-packages/django/utils/deprecation.py", line 117, in __call__ response = response or self.get_response(request) File "/usr/local/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner response = get_response(request) File "/usr/local/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/usr/local/lib/python3.9/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view return view_func(*args, **kwargs) File "/usr/local/lib/python3.9/site-packages/azbankgateways/views/banks.py", line 26, in callback_view logging.exception("Verify from gateway failed.", stack_info=True) ERROR:django.request:Internal Server Error: /api/bankgateways/callback/ Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner response = get_response(request) File "/usr/local/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/usr/local/lib/python3.9/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view return view_func(*args, **kwargs) File "/usr/local/lib/python3.9/site-packages/azbankgateways/views/banks.py", line 27, in callback_view return bank.redirect_client_callback() File "/usr/local/lib/python3.9/site-packages/azbankgateways/banks/banks.py", line 160, in redirect_client_callback return redirect(self.get_client_callback_url()) File "/usr/local/lib/python3.9/site-packages/azbankgateways/banks/banks.py", line 153, in get_client_callback_url self._bank.callback_url, AttributeError: 'NoneType' object has no attribute 'callback_url'

amirnejati commented 1 month ago

من هم به همین ایراد برخوردم

ali-zahedi commented 1 month ago

@birddevelper شما تونستین تست بگیرین این مورد و؟

birddevelper commented 1 month ago

@birddevelper شما تونستین تست بگیرین این مورد و؟

بله. تست کردم. مشکلی که مطرح شده وجود داره.

image

در برگشت از بانک _bank نان میشه

birddevelper commented 1 month ago

@mojtabaakbari221b @amirnejati سلام ممکنه بفرمایید آیا روی آدرس اصلی سداد این خطا رو میگیرید یا روی سندباکس و محیط تست؟