简体   繁体   中英

mrt:accounts-stripe - meteor stripe login

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 technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM