#Ppp-checkout-redirect

1 messages ยท Page 1 of 1 (latest)

ivory knoll
#

Hey, can you share your front-end code

cedar turtle
#

hi

#

<div class="ui-component ui-radio">
<input type="radio" name="processor[]" value="stripe"><span class="ui-fake-radio"></span>
<div class="ui-label">Stripe</div>
</div>

#

the developer is saying, all should work, but I believe not, as there some parts are missing

ivory knoll
#

So something weird is going on with your redirect

ivory knoll
#

How are you redirecting? In theory you can just do window.location.replace(session.url)

#

Can you share the code that handles the redirect

cedar turtle
#

I think we are missing this part, in our .php

#

๐Ÿ˜ฎ

ivory knoll
#

Well, you can't do that in PHP (it uses the Window object from the browser)

#

I assumed you were redirecting from the client-side

cedar turtle
#

hm

#

but I'm not redirecting

#

'success_url' => $this->store->full_url . '?page=success',
'cancel_url' => $this->store->full_url . '?page=cart&return_type=cancel',
]);
} catch (\Exception $exception) {
if(DEBUG) {
$_SESSION['error'][] = $exception->getCode() . ' - ' . $exception->getMessage();
}

        $_SESSION['error'][] = $this->language->global->error_message->basic;
        header('Location: ' . $this->store->full_url . '?page=cart&return_type=cancel'); die();
    }

    header('Location: ' . $stripe_session->id); die();
}
ivory knoll
#

header('Location: ' . $stripe_session->id); die(); is the redirect

cedar turtle
#

yes, but in redirecting me to the

ivory knoll
#

Well id is the wrong field for starters, so I guess that's the issue

#

header('Location: ' . $stripe_session->url); die();

cedar turtle
#

url is not definied ๐Ÿ™‚

ivory knoll
#

It should be, you can see it's returned from the API call I shared

cedar turtle
#

okay, thank you, will investigate

#

it worked ๐Ÿ˜„

ivory knoll
#

๐ŸŽ‰

cedar turtle
#

hahaha

#

thank you

ivory knoll
#

np!

cedar turtle
#

no, we have a 2nd issue

#

webhook ๐Ÿ˜ฆ