Skip to content

Instantly share code, notes, and snippets.

@danromero
Last active December 29, 2015 09:59
Show Gist options
  • Save danromero/7653634 to your computer and use it in GitHub Desktop.
Save danromero/7653634 to your computer and use it in GitHub Desktop.
Display last 10 successful charges in a Stripe account.
<ul>
<% Stripe::Event.all(:type => "charge.succeeded").each do |stripe_event| %>
<li><%= Stripe::Customer.retrieve(stripe_event.data.object.customer).description %></li>
<li><%= number_to_currency(stripe_event.data.object.amount / 100.00) %></li>
<% end %>
</ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment