mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-25 02:31:59 -05:00
Removed empty customer email from checkout session payload
- removes customerEmail sent as empty string when missing in some cases, which causes Stripe error in checkout session creation
This commit is contained in:
parent
25f9c852b2
commit
cd76b9fb6d
1 changed files with 6 additions and 2 deletions
|
@ -335,9 +335,13 @@ function setupGhostApi({siteUrl = window.location.origin, apiUrl, apiKey}) {
|
|||
identity: identity,
|
||||
metadata: metadataObj,
|
||||
successUrl,
|
||||
cancelUrl,
|
||||
customerEmail: customerEmail
|
||||
cancelUrl
|
||||
};
|
||||
|
||||
if (customerEmail) {
|
||||
body.customerEmail = customerEmail;
|
||||
}
|
||||
|
||||
if (tierId && cadence) {
|
||||
delete body.priceId;
|
||||
body.tierId = offerId ? null : tierId;
|
||||
|
|
Loading…
Add table
Reference in a new issue