use WechatMiniProgramCustomServiceBundle\Entity\TextMessage;
use WechatMiniProgramCustomServiceBundle\Request\SendMessageRequest;
// Create a text message
$textMessage = new TextMessage();
$textMessage->setTouser('user_openid');
$textMessage->setContent('Hello from WeChat Mini Program!');
$textMessage->setAccount($account);
// Send the message
$request = new SendMessageRequest();
$request->setMessage($textMessage);
$request->setAccount($account);
// Use your HTTP client to send the request
$textMessage = new TextMessage();
$textMessage->setTouser('user_openid')
->setContent('Your message content')
->setAccount($account);
$imageMessage = new ImageMessage();
$imageMessage->setTouser('user_openid')
->setMediaId('media_id_from_wechat')
->setAccount($account);
$mpPageMessage = new MpPageMessage();
$mpPageMessage->setTouser('user_openid')
->setTitle('Page Title')
->setPagePath('pages/index/index')
->setThumbMediaId('thumb_media_id')
->setAccount($account);
use WechatMiniProgramCustomServiceBundle\EventSubscriber\MessageListener;
// The MessageListener automatically handles message events
// when integrated with the WeChat Mini Program bundle
bash
php bin/console doctrine:migrations:migrate
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.