Giter VIP home page Giter VIP logo

simple-bootstrap-stripe-payment-form's Introduction

Simple-Bootstrap-Stripe-Payment-Form

IMPORTANT NOTICE: This implementation is outdated and is no longer maintainted. I do not provide any support! Check out https://jsfiddle.net/user/ywain/fiddles/ or https://stripe.com/docs/payments/payment-intents for SCA ready examples.

Simple Bootstrap Stripe example payment form. Replace "Stripe Publishable Key" & "Stripe Secret Key" in index.php if you want to test it.

Improvements are always welcome. GitHub pull requests are even better!

Assembled by Daniel Schröter

Features

  • Form validation
  • Generate Token via Stripe JS
  • Responsive design
  • Warning if JavaScript is disabled
  • Charge single amounts with Stripe

Used Components

=> jQuery (v1.11.0) - http://jquery.com/

=> Bootstrap (v3.1.1) - http://getbootstrap.com/

=> Bootstrap Form Helper (v2.3.0) - http://bootstrapformhelpers.com/

=> Bootstrap Validator (v0.4.4) - http://bootstrapvalidator.com/

simple-bootstrap-stripe-payment-form's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

simple-bootstrap-stripe-payment-form's Issues

PHP improvements for date

The form's field for card-expiry-year with JavaScript is working but I thought maybe you want to replace it with PHP. I didn't want to make a pull request.

<select name="select2" data-stripe="exp-year" class="card-expiry-year stripe-sensitive required form-control">
    <?php for ($i = 0; $i < 12; $i++): ?>
        <option value="<?= $i + date('Y'); ?>" <?= $i === 0 ? 'selected' : '' ?>><?= $i + date('Y'); ?></option>
    <?php endfor; ?>
</select>

custom payment amount

Hi!
The script is great and works very well, so first of all thank you very much.
Unfortunately I need also to accept variable payment amounts.
So is there an easy way to change the script to accept a custom payment amount?
Best regards,
Christopher

Success & Error Notices

Success & Error notices are showing up in the main frame html...am I doing something wrong?
screen shot 2014-06-15 at 1 49 56 am

bootstrap validator undefined

great form, I'm using it inside bootstrap 4 modal and I'm getting the following:

TypeError: $('#payment-form').bootstrapValidator is not a function. (In '$('#payment-form').bootstrapValidator', '$('#payment-form').bootstrapValidator' is undefined)`

any ideas how to resolve or perhaps suggest an alternative validation?

Form Error in Declined Payments

When a form is submitted and the card is declined only the top half of the form is show with no declined error on post.

Seems to be this line:

catch (Exception $e) { $error = '<div class="alert alert-danger"> <strong>Error!</strong> '.$e->getMessage().' </div>'; }

Is there an easy way to make it a subscription?

Is there an easy way to make it a subscription? I need monthly billing for these customers and ive tried to change the array to

Stripe_Plan::create(array("amount" => 35,
"interval" => "month",
"name" => "Standard",
"currency" => "usd",
"id" => "Standard",
"card" => $_POST['stripeToken'],

but get an error. Thanks in advance this is an awesome form

Can't process payments

I get an error saying it's in test mode and using a live card (When it's in test mode and using a test #)

And I get an error saying it's in live mode and using a test card (When it's in live mode and using a live #)

I can't get it to process test or live payments.

Expiry valitador

I just want to remember you that a card's expiry date is the last day of the displayed month. So, a card that expires in 11/16 (November 2016) is still valid until Nov, 30, inclusive.
I corrected
if (year > currentYear || (year == currentYear && value > currentMonth)) {
with
if (year > currentYear || (year == currentYear && value >= currentMonth)) {

White page after submit

Hi,

I changed my keys in index.php but when I submit the form, I only have "Secure Payment Form" on the page.

Thanks.

MM

Is project "Strong Customer Authentication"-ready?

How can I use only "Payment Intents API" (which Strong Customer Authentication-ready) instead of strange mix (as messaged Stripe support!) "33.33% Payment Intents API" and "66.67% of Charges API" (which not SCA-ready)?

PS. lib is used on wordpress site with custom php code.

Missing </div> closing tags

There are 3 missing </div> closing tags in the index.php file.

2 before the </form> close, and 1 in the <!-- important notice --> block

Demo Page

It should be nice if we have a demo page to decide to use it.

Screenshot

Please include a live example or at least screenshot so I can see what I am getting into before investing time with this project (and deciding to use Stripe).

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.