#banyman-express vs standard
1 messages · Page 1 of 1 (latest)
I don't know what type of account they have. it is important for me that they log in through an existing account. Yesterday here in the support service they told me that it doesn't matter what type of account they have, so I created Type Express for everyone.
it's really more complex than that
How can I solve this?
let me try to explain the difference
after building an account, I get an account link, which I redirect the user to for authorization in stripe..
you can either link existing Standard Accounts to your Platform Account or you can create a new Express Account that cannot be shared with another Platform
I need to be sure to link an existing account to my platform. The next step is to generate a report in my user account and download this report.
How do I redirect the user to Authorize an existing account.
if it's a Standard account then this is what you need to do https://stripe.com/docs/connect/oauth-standard-accounts
https://stripe.com/docs/connect/oauth-standard-accounts#redirected
I understood the first 2 steps. Does the user automatically return to which page? And how can I get the return data so that I can link his account in my database and recognize his Account Id
Does the user automatically return to which page?
Theredirect_uriyou set in the Dashboard
And how can I get the return data so that I can link his account in my database and recognize his Account Id
See step 4 on that page
https://connect.stripe.com/connect/default/oauth/test?scope=read_write&code={AUTHORIZATION_CODE}
Should I use the curl method to get the data?
Can this link be used only in test mode or in live too?
Which curl method?
That's a test mode link (you can see the /test path in the URL). There'll be a different URL for a live mode connection
I mean PHP cURL GET request Or how do I get this data? I do not understand.
state - for which is this parameter?
Read step 4. Once the user is directed to your redirect_uri you need to make the additional API call their using the code parameter in the URL
Really you should just use Account Links and do hosted onboarding
I have already done so and started this discussion with this question. This method does not work for me because Users need to create a new account in the Stripe. I need to use an existing account for integration.
\Stripe\Stripe::setApiKey('sk_live_51H...
');
$response = \Stripe\OAuth::token([
'grant_type' => 'authorization_code',
'code' => Get('code'),
]);
// Access the connected account id in the response
$connected_account_id = $response->stripe_user_id;
/*
{
"token_type": "bearer",
"stripe_publishable_key": "{PUBLISHABLE_KEY}",
"scope": "read_write",
"livemode": false,
"stripe_user_id": "{ACCOUNT_ID}",
"refresh_token": "{REFRESH_TOKEN}",
"access_token": "{ACCESS_TOKEN}"
}
*/
if (!empty($connected_account_id->stripe_user_id)) {
ExecuteStatement("UPDATE accounts SET
stripe_account = '" . $connected_account_id->stripe_user_id . "',
stripe_publishable_key = '" . $connected_account_id->stripe_publishable_key . "',
stripe_user_id = '" . $connected_account_id->stripe_user_id . "'
WHERE id = '" . $userid ."' ");
}
ob_start();
header('Location: getfunds');
ob_end_flush();
die();
After redirect on my page I have empty data.
this Code I have in my page
What I need to do in this page too?
I guess at that point the onboarding is complete, so you'd provision access to your app/service
But I don't have any data in my database. And I don't see user account stripe In my connect section On dashboard.
I need to use an existing account for integration.
That's not possible for Express.
But I don't have any data in my database.
not sure how we can help you with that? it's your code and your database, we can't debug that as well as you can.
And I don't see user account stripe In my connect section On dashboard.
did your code run? What was the value of$connected_account_idwhen that code executed?
Let me test it. And I tell you.
Slim Application Error Type: Stripe\Exception\ApiConnectionException Code: 0 Message: Unexpected error communicating with Stripe. If this problem persists, let us know at support@stripe.com. (Network error [errno 92]: HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1)) File: /home/mei/public_html/vendor/stripe/stripe-php/lib/HttpClient/CurlClient.php Line: 579 Trace: #966284336129273886
hmm, interesting error
what version of our stripe-php library are you using?
there was an issue in older versions that caused that error but it's been fixed for over a year or so now(https://github.com/stripe/stripe-php/issues/633#issuecomment-484617402)
do you know what version of PHP and the libcurl package you are using?
if it helps you can also try disabling HTTP/2. Instructions here: https://github.com/stripe/stripe-php/issues/625#issuecomment-658784955
https://stripe.com/docs/connect/oauth-standard-accounts#redirected it is Get or post request?
The call to https://connect.stripe.com/connect/default/oauth/test should be a POST response here
Or are you talking about another call in that doc?
After connection the user returns to my site, data arrives to me. $_POST['code'] or $_GET['code'] ?