Skip to content
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

returnTo function added to checkout does not redirect #229

Closed
Baronium opened this issue Dec 31, 2023 · 6 comments
Closed

returnTo function added to checkout does not redirect #229

Baronium opened this issue Dec 31, 2023 · 6 comments

Comments

@Baronium
Copy link

Baronium commented Dec 31, 2023

Cashier Paddle Version

2.0.6

Laravel Version

10.5.1

PHP Version

8.2.4

Database Driver & Version

No response

Description

Using the default example for subscription checkouts, the returnTo method does not have any effect. Using overlay checkout.

Expected: After doing the checkout successfully and closing it on the end screen (green checkmark screen) via the "X" button in its top right corner, the user should be directed to the route specified.
Actual result: The overlay closes. Nothing else happens (user stays on the same page).

Steps To Reproduce

Controller code:

$checkout = auth()->user()->subscribe($price, 'default')
    ->returnTo(route('home'));

Blade code:

<a href="#!" class="paddle_button btn btn-primary my-4" role="button" data-allow-logout='false'
  data-items='{{ json_encode($checkout->getItems()) }}'
  data-success-url='{{ $checkout->getReturnUrl() }}'
>Checkout</a>
  1. Use overlay checkout for subscriptions as stated in the documentation (see above)
  2. Proceed to checkout completion using test credit card
  3. Checkout success screen is shown, close using "X" button in top right corner
  4. See redirect not happening

No errors are thrown in the console.

@Baronium Baronium changed the title returnTo function added to checkout does not returnTo function added to checkout does not redirect Dec 31, 2023
@driesvints
Copy link
Member

I can confirm this doesn't work anymore with either HTML attributes or Paddle.open(). I'll contact Paddle to see what's wrong.

@driesvints
Copy link
Member

Sorry @Baronium. I can't get a hold on Paddle. Maybe it's best that you try their support?

@ryanhalliday
Copy link

I've contacted them about this too, will post a reply when I hear back

@driesvints
Copy link
Member

@Baronium @ry167 Paddle let me know that they now fixed this. Could you confirm?

@ryanhalliday
Copy link

ryanhalliday commented Jan 9, 2024

@driesvints Yep it appears to be working now (in Sandbox, I was waiting for it to be fixed before going live)

@Baronium
Copy link
Author

Can confirm this works in Sandbox. I still have an issue but it seems to be related to how my dynamic routes are set up. Thank you very much for raising this with Paddle and following up @driesvints @ry167!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants