diff --git a/src/PServerCMS/Entity/DonateLog.php b/src/PServerCMS/Entity/DonateLog.php index 65071a4..0f999a3 100644 --- a/src/PServerCMS/Entity/DonateLog.php +++ b/src/PServerCMS/Entity/DonateLog.php @@ -14,6 +14,7 @@ class DonateLog const TYPE_PAYMENT_WALL = 'paymentwall'; const TYPE_SUPER_REWARD = 'superreward'; + const TYPE_XSOLLA = 'xsolla'; const TYPE_INTERNAL = 'internal'; const STATUS_SUCCESS = 1; diff --git a/src/PServerCMS/Entity/Repository/DonateLog.php b/src/PServerCMS/Entity/Repository/DonateLog.php index e0c2998..80221cb 100644 --- a/src/PServerCMS/Entity/Repository/DonateLog.php +++ b/src/PServerCMS/Entity/Repository/DonateLog.php @@ -75,7 +75,11 @@ public function getDonationDataSuccess(\DateTime $dateTime) ->andWhere('p.type in (:type)') ->setParameter( 'type', - [Entity::TYPE_PAYMENT_WALL, Entity::TYPE_SUPER_REWARD], + [ + Entity::TYPE_PAYMENT_WALL, + Entity::TYPE_SUPER_REWARD, + Entity::TYPE_XSOLLA, + ], \Doctrine\DBAL\Connection::PARAM_STR_ARRAY ) ->getQuery(); @@ -91,6 +95,7 @@ public function getDonateTypes() return [ Entity::TYPE_PAYMENT_WALL, Entity::TYPE_SUPER_REWARD, + Entity::TYPE_XSOLLA, Entity::TYPE_INTERNAL ]; } diff --git a/src/PServerCMS/Service/PaymentValidation.php b/src/PServerCMS/Service/PaymentValidation.php new file mode 100644 index 0000000..3f75e09 --- /dev/null +++ b/src/PServerCMS/Service/PaymentValidation.php @@ -0,0 +1,29 @@ +getUserService()->getUser4Id($userId); + return (bool) $user; + } + + /** + * @return User + */ + protected function getUserService() + { + return $this->getServiceManager()->get('small_user_service'); + } + +} \ No newline at end of file