Removed logic to set default urls for checkout
refs https://github.com/TryGhost/Team/issues/1067 Checkout success/cancel URLs are handled by the server, and should only be passed if we particularly want a custom one!
This commit is contained in:
parent
b26c0aefce
commit
709b5b2af6
@ -216,11 +216,6 @@ function setupGhostApi({siteUrl = window.location.origin}) {
|
||||
const siteUrlObj = new URL(siteUrl);
|
||||
const identity = await api.member.identity();
|
||||
const url = endpointFor({type: 'members', resource: 'create-stripe-checkout-session'});
|
||||
if (!successUrl) {
|
||||
const checkoutSuccessUrl = new URL(siteUrl);
|
||||
checkoutSuccessUrl.searchParams.set('stripe', 'success');
|
||||
successUrl = checkoutSuccessUrl.href;
|
||||
}
|
||||
|
||||
if (!cancelUrl) {
|
||||
const checkoutCancelUrl = window.location.href.startsWith(siteUrlObj.href) ? new URL(window.location.href) : new URL(siteUrl);
|
||||
|
Loading…
Reference in New Issue
Block a user