netflie / whatsapp-cloud-api

The first PHP API to send and receive messages using a cloud-hosted version of the WhatsApp Business Platform
https://netflie.es/portfolio/whatsapp-business-cloud-api-php-sdk/
MIT License
449 stars 163 forks source link

Webhook notifications 2.0 updated new version. #81

Closed murugapandiyan closed 1 year ago

murugapandiyan commented 1 year ago

after your upgrading netflie, try to get notification ,

the Webhook verification is working good.

Webhook notifications not working.

kindly to the needful to solve this issue to guide ...thanks below code :

require '../vendor/autoload.php';

define('STDOUT', fopen('php://stdout', 'w'));

use Netflie\WhatsAppCloudApi\WebHook;

$payload = file_get_contents('php://input'); fwrite(STDOUT, print_r($payload, true) . "\n");

// Instantiate the Webhook super class. $webhook = new WebHook();

fwrite(STDOUT, print_r($webhook->read(json_decode($payload, true)), true) . "\n");

aalbarca commented 1 year ago

Hi @murugapandiyan

It's just a sample. You have to adapt the code to the characteristics of your project.

BTW, when you open a issue please provide some screenshots or code about why the code is not working. Just say "the code doens't work" is not helpful.

Thanks.