Updated paid signup action of member to include name

refs https://github.com/TryGhost/members.js/issues/29

- Uses updated API endpoint for checkout to pass member name in stripe checkout session metadata
This commit is contained in:
Rish 2020-05-20 00:10:46 +05:30
parent 43106c037e
commit 2b34ee5c28

View File

@ -156,11 +156,11 @@ export default class ParentContainer extends React.Component {
page: 'magiclink'
});
} else if (action === 'signup') {
const {plan, email} = data;
const {plan, email, name} = data;
if (plan.toLowerCase() === 'free') {
await this.GhostApi.member.sendMagicLink(data);
} else {
await this.GhostApi.member.checkoutPlan({plan, email});
await this.GhostApi.member.checkoutPlan({plan, email, name});
}
this.setState({
action: 'signup:success',