问题描述
我正在尝试根据用户在我的应用中购买或订阅时来自Google的推送通知来更新数据库。为此,我将使用PHP。 将会发生什么:
我为pub子通知提供了URL,我需要解析数据,发出请求以获取更新的数据并相应地更新数据库。 我知道如何发出请求
$client = new \Google_Client();
$client->setAuthConfig('credentials.json');
$client->addScope('https://www.googleapis.com/auth/androidpublisher');
$service = new \Google_Service_AndroidPublisher($client);
$subscription = $service->purchases_subscriptions->get($package_name,$product_id,$token);
但是我不知道如何处理来自PubSub的订阅或购买并进行相应的处理。我该怎么办?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)