-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
configured stripe client and added connect and disconnect resolvers
- Loading branch information
1 parent
2f62ebf
commit 1760a7d
Showing
4 changed files
with
100 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
export interface LogInArgs { | ||
input: { code: string } | null; | ||
} | ||
export interface StripeConnectArgs { | ||
input: { code: string }; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import stripe from 'stripe'; | ||
|
||
const client = new stripe(`${process.env.S_SECRET_KEY}`, { apiVersion: '2020-08-27' }); | ||
|
||
export const Stripe = { | ||
connect: async (code: string) => { | ||
const response = await client.oauth.token({ | ||
code, | ||
grant_type: 'authorization_code', | ||
}); | ||
|
||
return response; | ||
}, | ||
}; |