simonlevy5 / plaid-ios-link

Plaid Link experience built natively for iOS
MIT License
34 stars 10 forks source link

Generate Stripe bank token using public_token and account_id provided by Plaid. #23

Open Rashesh-Bosamiya opened 6 years ago

Rashesh-Bosamiya commented 6 years ago

Hello,

Thank you for this library. I am looking for generating Stripe bank token _btok__ using publicToken and account_id provided by Plaid.

I am successfully able to generate publicToken and _accountid.

Now, the problem is, How can I generate stripe bank token btok_?

Currently in Android developers are able to generate stripe bank token using Plaid.

But in iOS, I am facing difficulties in order to generate stripe bank token.

I went through following issue.

https://github.com/simonlevy5/plaid-ios-link/issues/14

I am not understand following method.

func linkNavigationContoller(navigationController: PLDLinkNavigationViewController!, didFinishWithAccessToken accessToken: String!, didFinishWithAccountId accountId: String!) {
        print("success \(accessToken)")
        linkPlaidBankAccount({ (stripeBankToken, accessToken) in
                // completion handler with the necessary tokens
        }, accessToken: accessToken, accountId: accountId) // send these two to the backend
}

especially, following lines of code I didn't get.

linkPlaidBankAccount({ (stripeBankToken, accessToken) in
                // completion handler with the necessary tokens
        }, accessToken: accessToken, accountId: accountId) // send these two to the backend

Can you please help me out?

Thank you.