Open up javascript console in your browser and look for errors. You can
also take out the call to .submit() and just leave the form as-is while you
investigate.


On Mon, Feb 24, 2014 at 9:01 PM, Zach Whelchel <notifications@github.com>wrote:

> In app/views/contributions/new.html.erb:
>
> > @@ -0,0 +1,66 @@
> > +<script type="text/javascript" src="https://js.stripe.com/v2/"></script>
> > +<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
> > +<script type="text/javascript">
> > +  Stripe.setPublishableKey('pk_test_EvYspVJmIJvMohKKhAykkgwA');
> > +
> > +  var stripeResponseHandler = function(status, response) {
> > +    var $form = $('#new_contribution');
> > +    if (response.error) {
> > +      $form.find('.payment-errors').text(response.error.message);
> > +      $form.find('button').prop('disabled', false);
> > +    } else {
> > +      var token = response.id;
> > +      var currency = response.currency || 'USD';
> > +      $form.append($('<input type="hidden" name="contribution[stripe_token]" />').val(token));
> > +      $form.append($('<input type="hidden" name="contribution[stripe_currency]" />').val(currency));
>
> Ok, I'm seeing that but I'm currently getting:
>
> {"utf8"=>"✓",
> "authenticity_token"=>"NSg8HVUOGMZGq8eYqWF0NFzqmoaNMgpfZeFbtW65ZPI=",
>
> "contribution"=>{"cents"=>"2500"},
> "need_id"=>"15"}
>
> Still investigating...
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/zachwhelchel/churchof/pull/45/files#r10021570>
> .
>