I'm using mrt/accounts-stripe package to connect users' Stripe
account to create transfers (payouts) to their account.
Basically what I've done so far, is to let the users login or create the account in my platform (even if it's not a Stripe
one) and allow them to login via stripe to connect the account and let them receiving money from my service.
The problem is that once called the Meteor.loginWithStripe
function of the package, it performs a logout and a login with the Stripe
email and I don't want this kind of situation as it must keep the user's informations and connect the account instead of create a new one.
I'm using also these packages
accounts-ui
accounts-oauth
client side
Meteor.loginWithStripe({
stripe_landing: 'login',
scope : "read_write"
}, function (err) {
if (err){
console.log('stripe error : ' + err);
} else {
console.log('NO ERROR ON LOGIN');
}
});
startup and settings
ServiceConfiguration.configurations.upsert({ service: 'stripe' },{
$set: {
service: 'stripe',
appId: stripeAppId ,
secret: stripeSecret,
scope: 'read_write',
stripe_landing : "login"
}
});
How to keep the logged user and connect the Stripe account instead of logout and login with the Stripe account user infos?
The solution was just to add the accounts-meld package to the meteor project