Quantcast
Channel: ReScript Forum - Latest posts
Viewing all articles
Browse latest Browse all 2592

Shortcut multiple @get and @send

$
0
0

Sorry, there is a bit more to it, it should be called on the stripe object:

type stripe

@module("stripe") @new
external make: string => stripe = "default"

@val
@scope("checkout.sessions")
external createCheckoutSession: (stripe, {..}) => Promise.t<string> = "create"
let s = Stripe.make(Common.stripe_private_key)
// Does not work yet
let session = s->Stripe.createCheckoutSession({ "key": "value"})

Viewing all articles
Browse latest Browse all 2592

Trending Articles