done with payment callback service
This commit is contained in:
@@ -110,7 +110,7 @@ class SimbrellaClient:
|
|||||||
try:
|
try:
|
||||||
logger.info(f"Here is your Disbursement Request data ***** : {data}")
|
logger.info(f"Here is your Disbursement Request data ***** : {data}")
|
||||||
# response = requests.post(api_url, json=data, headers=get_headers())
|
# response = requests.post(api_url, json=data, headers=get_headers())
|
||||||
logger.info(f"Disbursement response: {response.json()}")
|
# logger.info(f"Disbursement response: {response.json()}")
|
||||||
|
|
||||||
# return response.json()
|
# return response.json()
|
||||||
|
|
||||||
@@ -119,3 +119,22 @@ class SimbrellaClient:
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.info(f"Failed to call Disbursement endpoint: {e}")
|
logger.info(f"Failed to call Disbursement endpoint: {e}")
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def payment_callback(data):
|
||||||
|
api_url = f"{SimbrellaClient.BANK_CALL_BASE_URL}/Payment"
|
||||||
|
logger.info(f"BANK_CALL_BASE_URL = {SimbrellaClient.BANK_CALL_BASE_URL}")
|
||||||
|
logger.info(f"Calling Payment Callback endpoint with data: {data}")
|
||||||
|
|
||||||
|
try:
|
||||||
|
logger.info(f"Here is your Payment Callback Request data ***** : {data}")
|
||||||
|
# response = requests.post(api_url, json=data, headers=get_headers())
|
||||||
|
# logger.info(f"Payment Callback response: {response.json()}")
|
||||||
|
|
||||||
|
# return response.json()
|
||||||
|
|
||||||
|
return data
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
logger.info(f"Failed to call Payment Callback endpoint: {e}")
|
||||||
|
raise
|
||||||
@@ -30,4 +30,7 @@ def disbursement():
|
|||||||
def payment_callback():
|
def payment_callback():
|
||||||
data = request.json()
|
data = request.json()
|
||||||
logger.info(f"Calling Callback Components")
|
logger.info(f"Calling Callback Components")
|
||||||
return jsonify(data), 200
|
|
||||||
|
response = SimbrellaClient.payment_callback(data)
|
||||||
|
|
||||||
|
return jsonify(response), 200
|
||||||
Reference in New Issue
Block a user