New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot set Referrer #16
Comments
@Edofre how did you make the request? Can you maybe share that portion of the code? |
Below you will find the code, env('BOL_API_KEY') & env('BOL_PARTNER_SITE_ID') are correct and use the correct values. $apiClient = new \BolCom\Client(env('BOL_API_KEY'), 'json', true);
// Get and set session
$session = $apiClient->getSessionId();
$apiClient->setSessionId($session->sessionId);
// Get and set referrer
$referrerFromUrl = $this->getReferrerFromPartnerUrl();
// Here is where I can the CannotSetReferrer response
$response = $apiClient->setReferrer($referrerFromUrl);
function getReffererFromPartnerUrl() {
$siteid = urlencode(env('BOL_PARTNER_SITE_ID'));
$externalUrl = urlencode($this->external_url);
$naam = $this->wishlistItem->item;
// $url = "http://partnerprogramma.bol.com/click/click?p=1&t=url&s={$siteid}&url={$externalUrl}&f=API";
$url = 'http://partner.bol.com/click/click?p=1&t=url&s=' . urlencode(env('BOL_PARTNER_SITE_ID')) . '&f=API&url=' . urlencode($this->external_url);
$headerResponse = get_headers($url);
$location = explode(" ", $headerResponse[6]);
$referrer = $location[1];
return $referrer;
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello, I seem to be unable to set a referrer.
The X-OpenAPI-Session-ID is set in the header request and I've also managed to get the referrer id (ADVNLxxx) from the request I make to the partnerprogramma.bol.com URL.
I've noticed that I can get the referrer ID from two URLs
Once I make the setReferrer() request from the client I get the following response:
I'd like advice on what to try next.
The text was updated successfully, but these errors were encountered: