Created
June 19, 2020 14:54
-
-
Save SimonHoiberg/ef23011f41096dff8c7c9b0d6253fd5e to your computer and use it in GitHub Desktop.
This file contains hidden or 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
class StripeManager { | |
... | |
public static async handleSubscription(subscriptionID: string, end: boolean) { | |
const request = await fetch('https://your-endpoint/stripe/handle-subscription', { | |
method: 'POST', | |
body: JSON.stringify({ | |
subscriptionID, | |
end, | |
}), | |
}); | |
return await request.json() as IStripeSubscription; | |
} | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment