import { serve } from "https://deno.land/std@0.131.0/http/server.ts";
import Stripe from "https://esm.sh/stripe?target=deno&no-check";
// import { getAccountLink } from '../shared/index.ts';
serve(async (req) => {
const stripe = Stripe(Deno.env.get("STRIPE_API_KEY") ?? "", {
// This is needed to use the Fetch API rather than relying on the Node http
// package.
httpClient: Stripe.createFetchHttpClient(),
apiVersion: "2020-08-27",
});
// console.log(stripe)
return new Response(
JSON.stringify({ accountLink: 'https://google.com' }),
{ headers: { "Content-Type": "application/json" }, status: 200, statusText: 'OK' },
)
})
import { serve } from "https://deno.land/std@0.131.0/http/server.ts";
import Stripe from "https://esm.sh/stripe?target=deno&no-check";
// import { getAccountLink } from '../shared/index.ts';
serve(async (req) => {
const stripe = Stripe(Deno.env.get("STRIPE_API_KEY") ?? "", {
// This is needed to use the Fetch API rather than relying on the Node http
// package.
httpClient: Stripe.createFetchHttpClient(),
apiVersion: "2020-08-27",
});
// console.log(stripe)
return new Response(
JSON.stringify({ accountLink: 'https://google.com' }),
{ headers: { "Content-Type": "application/json" }, status: 200, statusText: 'OK' },
)
})