The library help you to verify Admob callback in server.
composer require junker/symfony-admob-ssv
use Junker\AdMobSSV\AdMobSSV;
use Symfony\Component\HttpFoundation\Request;
public function callback(Request $request) {
$ssv = new AdMobSSV($request);
if ($ssv->validate()) {
// success
} else {
// failed
}
}
use Junker\AdMobSSV\AdMobSSV;
use Symfony\Component\HttpFoundation\Request;
use Kevinrob\GuzzleCache\Strategy\PrivateCacheStrategy;
use Kevinrob\GuzzleCache\Storage\DoctrineCacheStorage;
use Doctrine\Common\Cache\FilesystemCache;
public function callback(Request $request) {
$ssv = new AdMobSSV($request);
$ssv->setCacheStrategy(
new PrivateCacheStrategy(
new DoctrineCacheStorage(
new FilesystemCache('/tmp/')
)
)
);
if ($ssv->validate()) {
// success
} else {
// failed
}
}