mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: use OAuth for stripe connect
This commit is contained in:
parent
93c0838fab
commit
0449d6f87c
9 changed files with 266 additions and 50 deletions
|
|
@ -56,6 +56,15 @@ export async function getStripeOnboardingLink(orgId: number, access_token: strin
|
|||
return res;
|
||||
}
|
||||
|
||||
export async function verifyStripeConnection(orgId: number, code: string, access_token: string) {
|
||||
const result = await fetch(
|
||||
`${getAPIUrl()}payments/stripe/oauth/callback?code=${code}&org_id=${orgId}`,
|
||||
RequestBodyWithAuthHeader('GET', null, null, access_token)
|
||||
);
|
||||
const res = await errorHandling(result);
|
||||
return res;
|
||||
}
|
||||
|
||||
export async function deletePaymentConfig(orgId: number, id: string, access_token: string) {
|
||||
const result = await fetch(
|
||||
`${getAPIUrl()}payments/${orgId}/config?id=${id}`,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue