i trying use webhooks send emails whether subscriptions charged or not. use bt_challenge code register webhook on braintree's dashboard:
if(isset($_get["bt_challenge"])) { echo(braintree_webhooknotification::verify($_get["bt_challenge"])); }
however, when use subscription information $webhook notification:
if(isset($_post["bt_signature"]) && isset($_post["bt_payload"])) { $webhooknotification = braintree_webhooknotification::parse( $_post["bt_signature"], $_post["bt_payload"] ); }
i don't email sent. furthermore, when try re-register webhook braintree dashboard, won't recognize second snippet of code in file. both of these snippets meant in same file? part unclear me.
following these 2 snippets, have phpmailer code, configured , sends email when script called not via webhook. phpmailer code not contained within "if" statement of either of these first 2 code blocks.
Comments
Post a Comment