Skip to content

Instantly share code, notes, and snippets.

@bradwilson
bradwilson / Cacheability.cs
Created January 23, 2014 20:53
Using chaining to create cached results in ASP.NET Web API v2
public enum Cacheability
{
NoCache,
Private,
Public,
}
# Type(<scope>): <subject>
# <body>
# <footer>
# Type should be one of the following:
# * feat (new feature)
# * fix (bug fix)
# * docs (changes to documentation)
@seigel
seigel / card-present.md
Created October 30, 2016 05:37
Stripe card-present API

Sending swiped card data to Stripe

Stripe's API supports sending both typed and swiped card data. Typed data is recorded when your customer enters their card details on your site and the data is sent to Stripe either by Stripe.js or through the Stripe API:

https://stripe.com/docs/api#create_charge

Swiped data is sent to Stripe when you have your own card swipe that reads the magnetic card strip on the back of your customers' cards. The raw output of the card swipe can then be submitted to the Stripe API.

The data contained on the magnetic strip of a card contains similar details to those embossed on the card but with some additions and repetitions. Details on the magnetic strip data can be found here: