new \PatryQHyper\Dpay\Secure\Styles\DefaultStyle();
new \PatryQHyper\Dpay\Secure\Styles\DarkStyle();
new \PatryQHyper\Dpay\Secure\Styles\GreenStyle();
new \PatryQHyper\Dpay\Secure\Styles\OrangeStyle();
You may call verify() function to verify parameters, http method and signature. On failure it throws DpayNotificationException.
try {
$notification->verify();
// Your rest of code, for example finding transaction in database, validating price etc.
$notification->responseOk();
}
catch(\PatryQHyper\Dpay\Exceptions\DpayNotificationException $exception) {
echo $exception->getMessage();
die();
}
You may also verify notification by yourself, and only call function generateSignature() which returns string of generated signature, you have to manually verify it.
This function should be used everytime in notifications because of strange Dpay parsing responses, it sometimes contains blank spaces, which will fail IPN on dpay's side. I've received this solution from Dpay's staff.