#sirbulandatlas_53890
1 messages · Page 1 of 1 (latest)
Can you send me your code and tell me more about what you are trying? Unfortunately this server is too busy at the moment for me to look up your case and read through it. If you can give me the specifics I should be able to help here
Sure I'll send you the JS I implemented and then want you to look into it.
var stripe = Stripe('<%= ENV['STRIPE_PUBLIC_KEY'] %>');
var appearance = { / appearance */ }
var options = {
mode: 'payment',
amount: 1099,
currency: 'usd',
appearance: {/.../},
};
var elements = stripe.elements(options)
var expressCheckoutElement = elements.create('expressCheckout');
expressCheckoutElement.mount('#express-checkout-element');*
This is the existing code
Now I want to create token like happening in this code
stripe.createToken(card)
👋 stepping in as Pompey needs to step away
Are you going to be taking a payment immediately here or you just want to set up a PaymentMethod for the future?
I want to create customer and save customer secret token returned by stripe.
Then charge that customer in future.
Okay in that case you want to use a SetupIntent instead of a PaymentIntent and use confirmSetup() on the client
So basically you follow the same steps that we show in https://stripe.com/docs/elements/express-checkout-element/accept-a-payment