This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> | |
| <title>Payment Form</title> | |
| <link rel="stylesheet" type="text/css" href="https://fxsupport.org/consolidated_common.css" /> | |
| <link rel="stylesheet" type="text/css" href="https://fxsupport.org/css/reset-fonts-grids.css" /> | |
| <link href='https://fonts.googleapis.com/css?family=Fjalla+One' rel='stylesheet' type='text/css'> | |
| <script type="text/javascript" src="https://js.stripe.com/v1/"></script> | |
| <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| require __DIR__ . '/lib/Stripe.php'; | |
| if ($_POST) { | |
| Stripe::setApiKey("sk_test_OXXXXXXXXXXXXXXXXXXX9"); | |
| try { | |
| // Use Stripe's bindings... | |
| } catch(Stripe_CardError $e) { | |
| // Since it's a decline, Stripe_CardError will be caught | |
| $body = $e->getJsonBody(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| API_KEY = 'SECRET_API_KEY' | |
| CSV_FILE = 'refunds.csv' | |
| require 'stripe' | |
| require 'CSV' | |
| Stripe.api_key = API_KEY | |
| # Retrieves all refund events from Stripe, handling pagination | |
| def all_refund_events(count=50, offset=0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var key = 'pk_test_czwzkTp2tactuLOEOqbMTRzG'; | |
| var params = { | |
| 'card[number]': '4242 4242 4242 4242', | |
| 'card[exp_month]': '01', | |
| 'card[exp_year]': '2050' | |
| }; | |
| $.ajax({ | |
| url: 'https://api.stripe.com/v1/tokens', | |
| method: 'POST', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| > curl https://api.stripe.com/v1/customers \ | |
| -u [apikey]: \ | |
| -d "card[number]=4000000000000002" \ | |
| -d "card[exp_month]=12" \ | |
| -d "card[exp_year]=2015" \ | |
| -d "card[cvc]=123" \ | |
| > -d validate=false | |
| { | |
| "object": "customer", | |
| "created": 1388967139, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .ticket-reply-button-wrap > div { | |
| float: right !important; | |
| } | |
| #nav { | |
| display: none !important; | |
| } | |
| .console-header { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [2] pry(main)> Stripe::VERSION | |
| => "1.11.0" | |
| [3] pry(main)> Stripe.api_key = '[redacted]' | |
| => "[redacted]" | |
| [4] pry(main)> Stripe.api_version = '2014-01-31' | |
| => "2014-01-31" | |
| [7] pry(main)> begin | |
| [7] pry(main)* Stripe::Customer.create(email: '[email protected]', card: { number: '4000000000000002', exp_month: 12, exp_year: 2014 }, metadata: { profile_id: '100' }) | |
| [7] pry(main)* rescue Stripe::CardError => exception | |
| [7] pry(main)* puts "Encountered a card error..." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 20> func mult(a:Int)(b:Int) -> Int { | |
| 21. return a * b | |
| 22. } | |
| 23> mult(4) | |
| $R10: (b: Int) -> Int = | |
| 24> mult(4)(b: 5) | |
| $R11: Int = 20 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #import "MSAppDelegate.h" | |
| @implementation MSAppDelegate | |
| @synthesize lifxContext, lastKeyPress; | |
| - (void)applicationDidFinishLaunching:(NSNotification *)aNotification | |
| { | |
| self.lifxContext = [[LFXClient sharedClient] localNetworkContext]; | |
| self.lastKeyPress = CACurrentMediaTime(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| util = require 'util' | |
| lifx = require './lifx' | |
| lx = lifx.init() | |
| log = (text) -> | |
| process.stdout.write("#{text}\n") | |
| typeIsArray = Array.isArray || (value) -> | |
| {}.toString.call(value) is '[object Array]' |