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 -s http://getcomposer.org/installer | php | |
| echo '{ | |
| "require": { | |
| "balanced/balanced": | |
| } | |
| }' > composer.json | |
| php composer.phar install |
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 balanced | |
| key = balanced.APIKey().save() | |
| balanced.configure(key.secret) | |
| marketplace = balanced.Marketplace().save() | |
| try: | |
| balanced.Marketplace.my_marketplace.create_merchant('[email protected]', | |
| merchant={ | |
| 'type': 'person', |
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
| {% extends "base_site.html" %} | |
| {% block title %}Payment Processing{% endblock %} | |
| {% block js %} | |
| <script type="text/javascript" src="https://js.balancedpayments.com/v1/balanced.js"/> | |
| <script type="text/javascript"> | |
| var marketplaceUri = '/v1/marketplaces/TEST-MP2CSIcjO337fwEoqBrlvB5I'; |
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
| select c.relname, | |
| l.mode, | |
| l.granted as "g", | |
| a.current_query, | |
| cast(a.query_start as time), | |
| age(now(), a.query_start) as "age", | |
| a.procpid, | |
| a.client_addr | |
| from pg_stat_activity a | |
| inner join pg_locks l on a.procpid = l.pid |
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
| require 'formula' | |
| class Postgresql < Formula | |
| homepage 'http://www.postgresql.org/' | |
| url 'http://ftp.postgresql.org/pub/source/v9.2.0/postgresql-9.2.0.tar.bz2' | |
| md5 '8c4c32a4abe8cf61b02c8366181ede50' | |
| depends_on 'readline' | |
| depends_on 'libxml2' if MacOS.leopard? # Leopard libxml is too old | |
| depends_on 'ossp-uuid' |
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 balanced | |
| key = balanced.APIKey().save() | |
| balanced.configure(key.secret) | |
| balanced.Marketplace().save() | |
| buyer = balanced.Account(email_address='[email protected]').save() | |
| # add a new card |
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
| require 'balanced' | |
| key = Balanced::ApiKey.new.save | |
| Balanced.configure(key.secret) | |
| Balanced::Marketplace.new.save | |
| card = Balanced::Card.new( | |
| :card_number => "5105105105105100", | |
| :expiration_month => "12", | |
| :expiration_year => "2015", |
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 balanced | |
| key = balanced.APIKey().save() | |
| balanced.configure(key.secret) | |
| balanced.Marketplace().save() | |
| three_digit_cards = [ | |
| 5610591081018250, | |
| 6011111111111117, | |
| 6011000990139424, |
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 balanced | |
| key = balanced.APIKey().save() | |
| balanced.configure(key.secret) | |
| balanced.Marketplace().save() | |
| card = balanced.Marketplace.my_marketplace.create_card( | |
| name='John Stewart', | |
| card_number='5105105105105100', | |
| expiration_month='12', |
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 balanced | |
| key = balanced.APIKey().save() | |
| balanced.configure(key.secret) | |
| balanced.Marketplace().save() | |
| account = balanced.Account(email_address='[email protected]').save() | |
| try: |