Spaces:
Sleeping
Sleeping
williamagyapong
commited on
Update main.py
Browse files
main.py
CHANGED
@@ -58,8 +58,7 @@ def messenger_button(recipient_phone, message, header='Transaction Confirmation'
|
|
58 |
},
|
59 |
)
|
60 |
|
61 |
-
def messenger_reply_button(recipient_phone, message,
|
62 |
-
header_message = "*Please confirm the details below before we proceed*:\n\n"
|
63 |
messenger.send_reply_button(
|
64 |
recipient_id=f"{recipient_phone}",
|
65 |
button={
|
@@ -121,8 +120,9 @@ def process_user_msg(message, mobile):
|
|
121 |
else:
|
122 |
# Persist transaction data temporarily for Create, Update, or Delete operations
|
123 |
persist_temporary_transaction(parsed_trans_data, mobile)
|
|
|
124 |
# Give user the chance to confirm/cancel transaction before processing other intents
|
125 |
-
messenger_reply_button(mobile, f"Raw Response
|
126 |
|
127 |
return True
|
128 |
|
|
|
58 |
},
|
59 |
)
|
60 |
|
61 |
+
def messenger_reply_button(recipient_phone, message, header_message = "*Please confirm the details below before we proceed*:\n\n"):
|
|
|
62 |
messenger.send_reply_button(
|
63 |
recipient_id=f"{recipient_phone}",
|
64 |
button={
|
|
|
120 |
else:
|
121 |
# Persist transaction data temporarily for Create, Update, or Delete operations
|
122 |
persist_temporary_transaction(parsed_trans_data, mobile)
|
123 |
+
messenger.send_message(f"{response} \n\n {parsed_trans_data}", mobile)
|
124 |
# Give user the chance to confirm/cancel transaction before processing other intents
|
125 |
+
messenger_reply_button(mobile, f"*Raw Response*: {response}, \n \n *Parsed Response*: {parsed_trans_data}")
|
126 |
|
127 |
return True
|
128 |
|