update bank gateway
This commit is contained in:
@@ -68,6 +68,7 @@ class Mellat(BaseBank):
|
||||
"callBackUrl": self._get_gateway_callback_url(),
|
||||
"payerId": 0,
|
||||
}
|
||||
data.update(self.get_custom_data())
|
||||
return data
|
||||
|
||||
def prepare_pay(self):
|
||||
@@ -163,9 +164,7 @@ class Mellat(BaseBank):
|
||||
status_text = "Payment ID is incorrect"
|
||||
elif response == "414":
|
||||
status_text = "The organization issuing the bill is invalid"
|
||||
elif response == "415":
|
||||
status_text = "The working session has ended"
|
||||
elif response == "416":
|
||||
elif response in ["415", "416"]:
|
||||
status_text = "The working session has ended"
|
||||
elif response == "417":
|
||||
status_text = "Payer ID is invalid"
|
||||
@@ -187,12 +186,12 @@ class Mellat(BaseBank):
|
||||
def prepare_verify_from_gateway(self):
|
||||
super(Mellat, self).prepare_verify_from_gateway()
|
||||
post = self.get_request().POST
|
||||
token = post.get("RefId", None)
|
||||
token = post.get("RefId")
|
||||
if not token:
|
||||
return
|
||||
self._set_reference_number(token)
|
||||
self._set_bank_record()
|
||||
self._bank.extra_information = dumps(dict(zip(post.keys(), post.values())))
|
||||
self._bank.extra_information = dumps(dict(post.items()))
|
||||
self._bank.save()
|
||||
|
||||
def verify_from_gateway(self, request):
|
||||
@@ -250,7 +249,7 @@ class Mellat(BaseBank):
|
||||
|
||||
@staticmethod
|
||||
def _get_client():
|
||||
transport = Transport(timeout=5, operation_timeout=5)
|
||||
transport = Transport(timeout=Mellat.get_timeout(), operation_timeout=Mellat.get_timeout())
|
||||
client = Client("https://bpm.shaparak.ir/pgwchannel/services/pgw?wsdl", transport=transport)
|
||||
return client
|
||||
|
||||
|
||||
Reference in New Issue
Block a user