test pna views
This commit is contained in:
parent
2602ecaebf
commit
47ba971d15
1 changed files with 11 additions and 2 deletions
13
utils/pna.py
13
utils/pna.py
|
|
@ -25,6 +25,10 @@ class PNAClient:
|
|||
response = requests.post(self.normal_sale_request_url, json=data)
|
||||
print(response.json())
|
||||
|
||||
tmp = {}
|
||||
for key, value in response.json().items():
|
||||
tmp[key.lower()] = value
|
||||
|
||||
response_json_sample = {
|
||||
"Token": "MTIzNDU2Nzg5MTA=",
|
||||
"Message": "عملیات موفق",
|
||||
|
|
@ -44,7 +48,7 @@ class PNAClient:
|
|||
'traceId': '00-2e5835d18d02352de88318defe53ebc7-bf6082b6fb9f964c-00'
|
||||
}
|
||||
|
||||
return response.json()
|
||||
return tmp
|
||||
|
||||
def request_normal_sale_confirm(self, token):
|
||||
data = {
|
||||
|
|
@ -63,7 +67,12 @@ class PNAClient:
|
|||
|
||||
response = requests.post(self.normal_sale_confirm_url, json=data)
|
||||
print(response.json())
|
||||
return response.json()
|
||||
|
||||
tmp = {}
|
||||
for key, value in response.json().items():
|
||||
tmp[key.lower()] = value
|
||||
|
||||
return tmp
|
||||
|
||||
def request_normal_sale_reverse(self, token):
|
||||
data = {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue