Coder Social home page Coder Social logo

funnelkake / stripe-payment-modal-angular-example Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 181 KB

Stripe payment modal Angular implementation example

Home Page: https://angular.paymentmodal.com

JavaScript 9.23% TypeScript 48.29% HTML 28.39% CSS 14.08%
stripe-checkout stripe-payment stripe-payment-demo angular stripe-modal stripe-modal-angular stripe-checkout-angular stripe

stripe-payment-modal-angular-example's Introduction

Stripe Payment Modal Angular Demo

This sample project shows how to implement Stripe payments & subscriptions within a modal dialog using PaymentModal and Angular CLI.

Demo

See a hosted version of the Angular sample project here.

The hosted demo is running in Stripe test mode. Use 4242424242424242 as a test card number with any CVC + future expiration date.

Getting Started

This project was bootstrapped with Angular CLI.

Installation

To see the Stripe modals in action, you need to create a free PaymentModal account.

  1. Create a PaymentModal site
  2. Clone this repo
  3. In the project directory, run cp .env.example .env
  4. Open .env and update ANGULAR_APP_PAYMENT_MODAL_SITE_ID with your PaymentModal site id
  5. Run yarn start to open the Angular app in development mode
  6. Open http://localhost:4200 to view it in the browser
  7. Update the app.component.html to use any HTML element attributes to attach click listeners to open your modals

This sample and hosted demo project uses the following HTML element attributes, but you can use any valid HTML selector. Be sure to update the selectors in your PaymentModal account.

  • buttonId creates a modal with a Stripe payment intent using an amount.
  • className creates a modal with a Stripe payment intent using a Stripe price id.
  • data-subscription-checkout creates a modal with a Stripe subscription using a Stripe price id.

Learn More

You can learn more about configuring Stripe modal properties in the PaymentModal documentation.

To get more help on the Angular CLI use ng help or go check out the Angular CLI Overview and Command Reference page.

Get Support

If you found a bug or want to suggest a new [feature/use case/sample], please file an issue.

If you have questions, comments, or need help with the code, we're here to help:

on Twitter at @paymentmodal on Stack Overflow at the stripe-payment-modal tag by email

stripe-payment-modal-angular-example's People

Contributors

azelenets avatar mstolovich avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.