Here is a snippet from my development.log this morning. You can see in the
parameters that we are getting params[:contribution][:stripe_token]

```
tarted POST "/needs/1/contributions" for 127.0.0.1 at 2014-02-24 10:57:24
-0500
  ActiveRecord::SchemaMigration Load (0.2ms)  SELECT "schema_migrations".*
FROM "schema_migrations"
Processing by ContributionsController#create as HTML
  Parameters: {"utf8"=>"✓",
"authenticity_token"=>"hGbwcYiWANStdlxOsfdFLycgjj39GJCph1btVUmVMIk=",
"contribution"=>{"cents"=>"2500",
"stripe_token"=>"tok_103YY22yIaJNivCzLfTifhvz", "stripe_currency"=>"USD"},
"need_id"=>"1"}
```


On Mon, Feb 24, 2014 at 8:32 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));
>
> It appears that these values are not getting appended to the form. I'm not
> even sure any of this is getting called.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/zachwhelchel/churchof/pull/45/files#r10020886>
> .
>