$shopId =
$this->shopIdProvider->
getShopId();
} catch (AppUrlChangeDetectedException
) { throw AppRegistrationException::
registrationFailed( $app->
getName(),
'The app url changed. Please resolve how the apps should handle this change.'
);
} // We can safely assume that the app has an integration because it is created together with the app
// and explicitly fetched in the ::getApp() method below.
/** @var IntegrationEntity $integration */
$integration =
$app->
getIntegration();
return [ 'apiKey' =>
$integration->
getAccessKey(),
'secretKey' =>
$secretAccessKey,
'timestamp' =>
(string) (new \
DateTime())->
getTimestamp(),
'shopUrl' =>
$this->shopUrl,
'shopId' =>
$shopId,
];
} /**
* @param array<string, string> $body
*/