Is there any way to send payment messages using this library? #53
-
I am following this documentation to send payment messages. My code looks like this:
But this doesnt send the payment message as expected. Is there any way to make it work? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hello! First of all, sorry for my late answer. As you can see in the whatsapp/ext/_buttons.py on line 49, the dictionary you are inserting is getting parsed by the create_button() internal function on line 15, which only takes the button components and removes all the other keys: data = {"type": "list", "action": button.get("action")}
if button.get("header"):
data["header"] = {"type": "text", "text": button.get("header")}
if button.get("body"):
data["body"] = {"text": button.get("body")}
if button.get("footer"):
data["footer"] = {"text": button.get("footer")}
return data The returned data element doesn't contain the type key, so you seem to be sending an interactive button when you actually aren't. Thanks for the thread! |
Beta Was this translation helpful? Give feedback.
Hello! First of all, sorry for my late answer.
I looked this up on the Facebook docs.
I think that just to send the payment message you need to have the payment methods etc set up, however i'm not sure about it.
However this is an issue in the library, as i just found out.
As you can see in the whatsapp/ext/_buttons.py on line 49, the dictionary you are inserting is getting parsed by the create_button() internal function on line 15, which only takes the button components and removes all the other keys: