doAuthPostRequest example


    public function getDomainHash($domain, AccessTokenStruct $token)
    {
        $postData = ['domain' => $domain];

        try {
            return $this->storeClient->doAuthPostRequest($token, '/domainhashes', $postData);
        } catch (StoreException $se) {
            throw $this->translateExceptionMessage($se);
        }
    }

    /** * Requests the validation of the current installation's domain * * @param string $domain * @param string $shopwareVersion Current Shopware version * * @throws Exception * * @return array Result of the validation operation (empty if successful) */
'bookingShopDomain' => $context->getBookingShop(),
                    'orderNumber' => $context->getOrderNumber(),
                    'isArticle' => true,
                    'priceModel' => [
                        'price' => $context->getPrice(),
                        'type' => $context->getPriceType(),
                    ],
                ],
            ],
        ];

        $response = $this->storeClient->doAuthPostRequest(
            $token,
            '/basket',
            $data
        );
        $basket = $this->hydrator->hydrateBasket($response);

        $basket->setLicenceDomain($context->getLicenceShop());

        foreach ($basket->getDomains() as $domain) {
            if ($domain->getDomain() !== $context->getLicenceShop()) {
                continue;
            }
Home | Imprint | This part of the site doesn't use cookies.