PATH:
home
/
sparklp6
/
public_html
/
website_356c8563
/
nitropack
/
nitropack-sdk
/
NitroPack
/
SDK
<?php namespace NitroPack\SDK; class IntegrationUrl { private $path; public static function getBaseUrl() { $hostname = getenv("NITROPACKIO_HOST"); if (!$hostname) { $hostname = "nitropack.io"; } return "https://{$hostname}/integration/"; } public function __construct($widget, $siteId, $siteSecret, $version = null, $additional_params = array()) { $timestamp = time(); $query = array( "site_id" => $siteId, "timestamp" => $timestamp, ); $nonce = $this->getNonce($query, $siteSecret); $query["nonce"] = $nonce; if ($version !== null) { $query["ver"] = $version; } $query = array_merge($query, $additional_params); $this->path = $widget . "?" . http_build_query($query); } public function getNonce($query, $secret) { return hash_hmac("sha256", http_build_query($query), $secret); } public function getUrl() { return self::getBaseUrl() . $this->path; } public function getPath() { return $this->path; } }
[-] Filesystem.php
[edit]
[-] ServiceDownException.php
[edit]
[-] HealthStatus.php
[edit]
[-] ConfigFetcherException.php
[edit]
[+]
Url
[-] .htaccess
[edit]
[-] EmptyConfigException.php
[edit]
[-] FileHandle.php
[edit]
[+]
Utils
[-] BacklogReplayTimeoutException.php
[edit]
[+]
Integrations
[+]
Api
[-] ChallengeProcessingException.php
[edit]
[-] Website.php
[edit]
[-] Backlog.php
[edit]
[-] ChallengeVerificationException.php
[edit]
[-] ExcludeEntry.php
[edit]
[-] Pagecache.php
[edit]
[-] IntegrationUrl.php
[edit]
[-] NoConfigException.php
[edit]
[-] Crypto.php
[edit]
[-] NitroPack.php
[edit]
[-] StorageException.php
[edit]
[-] VariationCookieException.php
[edit]
[-] ExcludeOperationType.php
[edit]
[-] DeviceType.php
[edit]
[-] Api.php
[edit]
[-] ElementRevision.php
[edit]
[-] Device.php
[edit]
[+]
..
[-] PurgeType.php
[edit]
[+]
StorageDriver
[-] WebhookException.php
[edit]