mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-30 21:40:39 +03:00
Allowed requestSrc
in stripe checkout metadata flow
refs https://github.com/TryGhost/Ghost/issues/12253 Allows reading `requestSrc` from Stripe checkout flow metadata to send signup emails with customized action param when requesting from Portal
This commit is contained in:
parent
1ba68ce72f
commit
18fa6ead56
@ -121,7 +121,7 @@ module.exports = function MembersApi({
|
||||
Member
|
||||
});
|
||||
|
||||
async function sendEmailWithMagicLink({email, requestedType, requestSrc, tokenData, options = {forceEmailType: false}}) {
|
||||
async function sendEmailWithMagicLink({email, requestedType, tokenData, options = {forceEmailType: false}, requestSrc = ''}) {
|
||||
let type = requestedType;
|
||||
if (!options.forceEmailType) {
|
||||
const member = await users.get({email});
|
||||
@ -389,6 +389,7 @@ module.exports = function MembersApi({
|
||||
});
|
||||
let member = await users.get({email: customer.email});
|
||||
const checkoutType = _.get(event, 'data.object.metadata.checkoutType');
|
||||
const requestSrc = _.get(event, 'data.object.metadata.requestSrc') || '';
|
||||
if (!member) {
|
||||
const metadataName = _.get(event, 'data.object.metadata.name');
|
||||
const payerName = _.get(customer, 'subscriptions.data[0].default_payment_method.billing_details.name');
|
||||
|
Loading…
Reference in New Issue
Block a user