Skip to content

Instantly share code, notes, and snippets.

jimdanz

Block or report user

Report or block jimdanz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am jimdanz on github.
  • I am jimbd (https://keybase.io/jimbd) on keybase.
  • I have a public key ASCOCcisOte5blzW_S4IhNhkRLj_yrR7GIhn4BlRgc1Ozwo

To claim this, I am signing this object:

@jimdanz
jimdanz / gist:cbfff1d825f7f2e58296
Created Aug 23, 2014
testing failed subscription payment on trial_end=now
View gist:cbfff1d825f7f2e58296
Jims-MacBook-Pro:~ jim$ curl https://api.stripe.com/v1/customers -d plan=Armada -d trial_end=1408771198 -d card[number]=4000000000000341 -d card[exp_month]=05 -d card[exp_year]=2019 -u sk_test_****:
{
"object": "customer",
"created": 1408756242,
"id": "cus_4dkYctG1ff2ReZ",
"livemode": false,
"description": null,
"email": null,
"delinquent": false,
"metadata": {},
View customer_fetch.rb
#!/usr/bin/env ruby
require 'stripe'
require 'logger'
if ARGV.length != 2
puts "Usage: #{__FILE__} <api key> <sleep interval>"
exit 1
end
@jimdanz
jimdanz / gist:7838912
Created Dec 7, 2013
Java multi-subs example
View gist:7838912
@Test
public void testNewStyleSubscriptionAPI() throws StripeException {
Plan plan = Plan.create(getUniquePlanParams(), MULTI_SUBS_API_KEY);
Plan plan2 = Plan.create(getUniquePlanParams(), MULTI_SUBS_API_KEY);
Customer customer = Customer.create(defaultCustomerParams, MULTI_SUBS_API_KEY);
// Create
Map<String, Object> subCreateParams = new HashMap<String, Object>();
subCreateParams.put("plan", plan.getId());
Subscription sub = customer.createSubscription(subCreateParams, MULTI_SUBS_API_KEY);
View StripeTest.java
/**
* Example usage of Stripe java bindings.
* See https://stripe.com/docs/libraries#java-library
*
* Usage:
* mkdir stripe-test
* cd stripe-test
* wget https://code.stripe.com/stripe-java-latest.jar
* wget http://google-gson.googlecode.com/files/google-gson-2.2.2-release.zip
* unzip google-gson-2.2.2-release.zip
You can’t perform that action at this time.