for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Xsolla\SDK\Webhook\Response;
use Xsolla\SDK\API\XsollaClient;
use Xsolla\SDK\Exception\Webhook\XsollaWebhookException;
use Xsolla\SDK\Webhook\WebhookResponse;
class PinCodeResponse extends WebhookResponse
{
public function __construct($pinCode)
$this->validatePinCode($pinCode);
parent::__construct(200, XsollaClient::jsonEncode(array('pin_code' => (string)$pinCode)));
}
private function validatePinCode($pinCode)
if (empty($pinCode)) {
throw new XsollaWebhookException('$pinCode should be a not empty string');