supabase-community / expo-stripe-payments-with-supabase-functions Goto Github PK
View Code? Open in Web Editor NEWBring the Func(๐บ)
Bring the Func(๐บ)
Importing the Stripe library results in the stripe client being typed as any
.
I've tried as many combinations of esm.sh imports for Stripe as I can, including the one referenced in this example and the stripe client is always cast to any.
I realize this may be more of a Stripe issue than a Supabase issue, but given the helpfulness of the Supabase squad, I figured I'd ask here in case anyone has any good pointers on how to get a typed Stripe client in Supabase functions ๐
Tried implementing the code using the steps you provided, but the deploy step fails with the following message
Bundling payment-sheet Error: Error bundling function: exit status 1 file:///src/index.ts file:///_utils/stripe.ts file:///_utils/supabase.ts file:///_utils/db_types.ts error: Uncaught (in promise) Error: Relative import path "http" not prefixed with / or ./ or ../ const ret = new Error(getStringFromWasm0(arg0, arg1)); ^ at __wbg_new_8d2af00bc1e329ee (https://deno.land/x/[email protected]/eszip_wasm.generated.js:312:19) at <anonymous> (https://deno.land/x/[email protected]/eszip_wasm_bg.wasm:1:79439) at <anonymous> (https://deno.land/x/[email protected]/eszip_wasm_bg.wasm:1:1388039) at <anonymous> (https://deno.land/x/[email protected]/eszip_wasm_bg.wasm:1:1862894) at __wbg_adapter_18 (https://deno.land/x/[email protected]/eszip_wasm.generated.js:146:6) at real (https://deno.land/x/[email protected]/eszip_wasm.generated.js:130:14)
function deploys instead of throwing an error
If applicable, add screenshots to help explain your problem.
Add any other context about the problem here.
I noticed that if a user is deleted (I ran supabase db reset
), they can still successfully call the payment-sheet
function, and a new Stripe customer will be created every time it's called
They will fail to save to Supabase because the user ID doesn't exist, but they will be created in Stripe
So you could end up with a bunch of Stripe customers that aren't connected to any user
While I was creating Flutter sample app, I noticed an error on the function's end.
It seems like the call to supabase here is failing with the following error message
FetchError: error sending request for url ([https://ezkbryeecvynphnrwzhb.supabase.co/rest/v1/customers?select=*]()): error trying to connect: dns error: failed to lookup address information: Name or service not known
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.