Open vu3rdd opened 4 years ago
Ok, this seem to do the trick. In the posted JSON, I see a card
key and that would hopefully do the same job as the source
key in the new API versions..
let config = StripeConfig (StripeKey key) Nothing
tokenId = TokenId token
result <- liftIO $ stripe config $ do
createCharge amount currency
-&- tokenId
I am trying to call the stripe charge API. The frontend using the
stripe.js
gives me a token, which needs to be passed assource
parameter to the API. Looking at the Web.Stripe.Charge module, I wonder how to do the equivalent step with the older version of the API. In the older version's documentation, there is an equivalent parameter calledcard
. But I don't see how to pass it, the (Charge
)[https://hackage.haskell.org/package/stripe-core-2.5.0/docs/Web-Stripe-Charge.html#t:Charge] data type do not seem to have a way to accept the token. Is there anything I am missing? Would appreciate any help. Thanks.