-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stripe not compatible #1
Comments
This can be fixed by replacing the app.use('/v1/execute', function (req, res, next) {
var data = '';
req.setEncoding('utf8');
req.on('data', function (chunk) {
data += chunk;
});
req.on('end', function () {
req.body = data;
next();
});
}, async (req, res) => { //.... |
@tannermeade Thanks for this 🤝 Would you mind opening a pull request? |
Didn't end up making a PR because I continued to run into issues using it as a proxy for stripe webhooks. Even after the changes it still didn't work for the refund events because the character count was too large among other issues. The standard fixes weren't working, so I recreated this proxy in dart and now the stripe webhook proxy is working well. I could make a PR to overwrite the nodejs project with the dart one, but not sure if that is what you'd want. EDIT: The char count issue is actually related to appwrite, not the proxy. |
Stripe is not compatible with this proxy because it reformats the raw body in a way that breaks stripe validating the signature. The stripe SDK uses the signed signature in the header and the raw body itself in the validation process (the docs specifically say json parsing the raw body will break it).
So this web proxy needs to not take responsibility for parsing the body but leave that responsibility to the cloud function.
The text was updated successfully, but these errors were encountered: