This file contains 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
debit_order: function (data, order, paymentObject) { | |
logger.info("Inside debit_order."); | |
var debit; | |
debit = extractFromPromise(balanced.get(order).debit_from(paymentObject, ({ "amount": data.paymentInformation[0].total_amount * 100, | |
"appears_on_statement_as": "Trash Mountain"}))); | |
var bank_account = extractFromPromise(balanced.get(Meteor.settings.devBankAccount)); | |
var credit; | |
credit = extractFromPromise(balanced.get(order).credit_to(bank_account, 103)); | |
This file contains 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
#! /bin/bash | |
mkdir -p /var/backups/mongodb; mongodump --db [Collection1] --out /var/backups/mongodb/$(date +'%Y-%m-%d') | |
mkdir -p /var/backups/mongodb; mongodump --db [Collection2] --out /var/backups/mongodb/$(date +'%Y-%m-%d') | |
mkdir -p /var/backups/mongodb; mongodump --db [Collection3] --out /var/backups/mongodb/$(date +'%Y-%m-%d') | |
/home/[USERNAME]/dropbox_uploader.sh upload /var/backups/mongodb / |
This file contains 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
{ | |
"_id" : "1234", | |
"created_at" : "09/24/2014, 12:28", | |
"customer" : { | |
"address_line1" : "Address Line 1", | |
"address_line2" : "Address Line 2", | |
"city" : "Topeka", | |
"country" : "US", | |
"created_at" : "09/24/2014, 12:28", | |
"email_address" : "email@email.com", |
This file contains 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
{ | |
"TX45s73APnaLpkgPJvGMFHSr" : { | |
"amount" : 102, | |
"appears_on_statement_as" : "Trash Mountain", | |
"created_at" : "2014-09-29T17:43:18.414627+00:00", | |
"failure_count" : 0, | |
"failures" : [], | |
"guid" : "TX45s73APnaLpkgPJvGMFHSr", | |
"status" : "pending", | |
"submit_status" : "done", |
This file contains 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
location /give { | |
proxy_pass http://trashmountainGive/give; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection "upgrade"; | |
proxy_set_header Host $http_host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forward-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forward-Proto http; |
This file contains 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
# Upstreams | |
# Note: if you want to run multiple meteor apps on the same server, | |
# make sure you define a separate port for each. | |
#setup meteor upstream servers | |
upstream trashmountainGive { | |
server 127.0.0.1:58080; | |
} | |
upstream trashmountainGiveDev { |
This file contains 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: | |
I20141209-15:18:16.384(-6)? { base_url: 'https://api.balancedpayments.com/', | |
I20141209-15:18:16.385(-6)? request_args: { headers: [Object], auth: [Object] }, | |
I20141209-15:18:16.385(-6)? routes: | |
I20141209-15:18:16.385(-6)? { marketplaces: [Object], | |
I20141209-15:18:16.385(-6)? customers: [Object], | |
I20141209-15:18:16.385(-6)? bank_accounts: [Object], | |
I20141209-15:18:16.385(-6)? orders: [Object] }, | |
I20141209-15:18:16.385(-6)? cache: | |
I20141209-15:18:16.385(-6)? { '/marketplaces/TEST-MP14BPoPFdKRdPSEx6V15MIl': [Object], |
This file contains 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
[ | |
{ | |
"_id" : "Philippines Infrastructure", | |
"total" : 3400, | |
"count" : 1 | |
}, | |
{ | |
"_id" : "Philippines Urgent", | |
"total" : 1100, | |
"count" : 1 |
This file contains 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 the official balanced nodejs package | |
var balanced = require('balanced-official'); | |
// Create a new API Key and configure the client with it | |
// The client automatically creates a new test marketplace for us | |
// if a marketplace does not exist for the api key | |
balanced.configure(apikey); | |
// Create a customer with some dummmy data | |
balanced.get('https://api.balancedpayments.com/debits/WD5rJ4kojAowU1YW4pz86Tb').then(function(debit) { |
This file contains 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
Trying this | |
Stripe.customers.update(customer_id, { | |
"metadata.city": form['address.city'], | |
"metadata.state": form['address.state'], | |
"metadata.address_line1": form['address.address_line1'], | |
"metadata.address_line2": form['address.address_line2'], | |
"metadata.postal_code": form['address.postal_code'], | |
"metadata.phone": form.phone | |
}, function (error, customer) { |
OlderNewer