Skip to content

Instantly share code, notes, and snippets.

@KabakiAntony
Created November 16, 2023 08:33
Show Gist options
  • Save KabakiAntony/13d9361ec5f7d10d22d599eb70c3485d to your computer and use it in GitHub Desktop.
Save KabakiAntony/13d9361ec5f7d10d22d599eb70c3485d to your computer and use it in GitHub Desktop.
a function for querying transaction status
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