Created
November 16, 2023 08:33
-
-
Save KabakiAntony/13d9361ec5f7d10d22d599eb70c3485d to your computer and use it in GitHub Desktop.
a function for querying transaction status
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def query_transaction_status(self, checkout_request_id): | |
query_data = { | |
"BusinessShortCode": self.shortcode, | |
"Password": self.password, | |
"Timestamp": self.timestamp, | |
"CheckoutRequestID": checkout_request_id | |
} | |
response = requests.post( | |
self.query_status_url, | |
json=query_data, | |
headers=self.headers | |
) | |
response_data = response.json() | |
return response_data |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment