Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can you provide a full example code with Payment Elements with create a payment intent first (client secret ..) #14

Open
Dante690 opened this issue Oct 12, 2022 · 7 comments

Comments

@Dante690
Copy link

No description provided.

@softbeehive
Copy link
Contributor

Hi,
Alright, let's take a look. Do you mean the type "payment" element with payment intent, right?

As a start point you can add type='payment' to:

<StripeElement ref="card" :elements="elements" :options="cardOptions" />

@Dante690
Copy link
Author

Dante690 commented Oct 21, 2022

Also we need a full payment element guide for this.. like card example...thnks

@tanha1998
Copy link

await elms.value.instance.confirmCardPayment(clientSecret, { payment_method: { card: cardNumber } })

@softbeehive
Copy link
Contributor

https://stripe.com/docs/payments/accept-a-payment?ui=elements

I'm gonna provide a full example, which requires stripe account and payment intent (server-side), but really tight on time right now

Basically, you need client_secret, it then passed as property of options to StripeElements. Then you'll be able to call confirmPayment on stripe instance.

@yashBhosale
Copy link

@softbeehive If you wanna assign this to me I can probably submit a PR with an example for using Payment Elements this weekend.

@softbeehive
Copy link
Contributor

softbeehive commented Apr 14, 2023

@yashBhosale you are welcome to submit a PR at any time

Here is some guidance:

  1. Create PaymentType.vue in examples folder
  2. Use Vue Composition API (preferably)
  3. Test payment type element
  4. Add Payment Type section to README.md before "Types"

@mattvb91
Copy link

does anyone have a working example with payment intent??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants