laravel / cashier-paddle

Cashier Paddle provides an expressive, fluent interface to Paddle's subscription billing services.
https://laravel.com/docs/cashier-paddle
MIT License
238 stars 57 forks source link

returnTo function added to checkout does not redirect #229

Closed Baronium closed 8 months ago

Baronium commented 8 months ago

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.

driesvints commented 8 months ago

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 commented 8 months ago

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

ryanhalliday commented 8 months ago

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

driesvints commented 8 months ago

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

ryanhalliday commented 8 months ago

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

Baronium commented 8 months ago

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!