mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 03:44:29 +03:00
Supported payment URL in Portal
refs https://github.com/TryGhost/Team/issues/2078 As part of decoupling Stripe from the members feature, we are going to be using payment URLs rather than Stripe sepcific session ids and publick keys. This prepares Portal to work with the new system, whilst retainign the existing functionality
This commit is contained in:
parent
fbc23a624e
commit
4f54cbc37a
@ -392,6 +392,9 @@ function setupGhostApi({siteUrl = window.location.origin, apiUrl, apiKey}) {
|
||||
}
|
||||
return res.json();
|
||||
}).then(function (result) {
|
||||
if (result.url) {
|
||||
return window.location.assign(result.url);
|
||||
}
|
||||
const stripe = window.Stripe(result.publicKey);
|
||||
return stripe.redirectToCheckout({
|
||||
sessionId: result.sessionId
|
||||
|
Loading…
Reference in New Issue
Block a user