getAppname example



    public function reset(): void
    {
        $this->registrationRequest = null;
        $this->confirmationRequest = null;
    }

    private function buildAppResponse(RequestInterface $request): string
    {
        $shopUrl = $this->getQueryParameter($request, 'shop-url');
        $appname = $this->getAppname($request);
        $shopId = $this->getQueryParameter($request, 'shop-id');

        $proof = \hash_hmac('sha256', $shopId . $shopUrl . $appname, self::TEST_SETUP_SECRET);

        return (string) \json_encode(['proof' => $proof, 'secret' => self::APP_SECRET, 'confirmation_url' => self::CONFIRMATION_URL], \JSON_THROW_ON_ERROR);
    }

    private function isRegistration(RequestInterface $request): bool
    {
        $path = $request->getUri()->getPath();
        $pathElems = \explode('/', $path);

        
Home | Imprint | This part of the site doesn't use cookies.