-
Notifications
You must be signed in to change notification settings - Fork 2
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
Feature/guest checkout #9
Conversation
As per our discussions, I went back to accepting This means that if you don’t pass anything as a I also unified how the checkout is generated in all 3 cases: via controller action ( |
Description
This PR addresses a few bugs and slightly changes the behaviour of the
src\services\Checkout->getCheckoutUrl()
method to allow truly anonymous checkout.customer_email
to null, causing a Stripe API errorsrc\services\Checkout->getCheckoutUrl()
now acceptsfalse
as the$user
parameter too. Ifnull
is passed (or the parameter is not explicitly used, in which case it’ll default tonull
), the method will continue to attempt to get the currently logged-in user. Iffalse
is passed, no such attempt will be made, the checkout URL will be anonymous, and the customer will have to fill out their email address on Stripe’s checkout page. (README adjusted accordingly.)src\elements\Price->getCheckoutUrl()
now accepts parameters ($customer
,$successUrl
,$cancelUrl
,$params
), all defaulting tonull
, and no longer assumes that the current user should always be used when generating the checkout URL.Related issues
n/a