Skip to content

Commit

Permalink
Fixes balanced#266: Remove beta references in push to card
Browse files Browse the repository at this point in the history
  • Loading branch information
kyungmin committed Jan 27, 2015
1 parent ac7e9bf commit 702e887
Show file tree
Hide file tree
Showing 6 changed files with 282 additions and 369 deletions.
63 changes: 11 additions & 52 deletions contents/push-to-card.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,29 @@ pageTitle: Push to Card
body_class: push-to-card

subtitle:
heading: Send money to a customer&#8217s checking account using their debit card number.

launch:
title: Private beta
month: May
day: 29

what:
bodyText: We&#8217re launching in private beta after receiving overwhelming
support for this feature on our
<a href="https://balanced.crowdhoster.com/let-s-push-to-debit-cards">crowdfunding campaign</a>.
Companies who backed the campaign receive early access. If you are
interested in this feature, please submit your email to request an invite.
heading: Send money to your customers&#8217 checking accounts using their U.S. debit card number.

introTextLeft:
title: Reduce friction
body: Asking for a card number instead of sensitive bank account information
makes it easier for a customer to sell on your marketplace.
body: Merchants will no longer have to look for sensitive bank account information. Asking for a card number makes it easier for them to sell on your marketplace.

introTextRight:
title: Pay anyone easily
body: Paying your sellers should be as simple as charging a card. Customers will
no longer have to fish for their checkbooks and look for bank account
information.
title: Pay merchants quickly
body: Funds are deposited to your merchant's bank account within 1–2 business days. You may pay up to $2,500 per Push to Card credit.

benefit:
title: Validate in real time
body: Real-time debit card validation ensures timely delivery of money. Forget
about delayed payouts due to incorrect bank account and routing numbers.
cardNumber: 4342 5611 1111 1118

bankStatementDescriptor:
title: Bank statement descriptor
body: Modify the bank statement soft descriptor on a per-transaction basis.
learnLink: "Learn more about setting the soft descriptor"
learnLinkUrl: https://docs.balancedpayments.com/current/overview#soft-descriptors
limit: "Max character length of bank statement soft descriptor: 14"

api:
title: Sample API call
body: Paying out to a debit card is super simple.
Expand All @@ -51,37 +43,4 @@ pricing:
image: pushtocard
cent: 25

github:
title: Monitor our progress on Github
body: We&#8217ll outline each task in our <a href="https://github.com/balanced" target="_blank">public repos</a> and indicate the status
of each issue. Once a task is complete, the corresponding issue will be
closed.

feedback:
title: Got a question?
body: "Send your comments to:"
email: [email protected]
subscribe: "Request an invite for access"

faqs:
title: Frequently asked questions
list:
- q: How long do payouts take?
a: Payouts are instant for 50% of bank accounts and take 1 &ndash; 2
business for others. We're actively working on increasing the coverage
for instant transfers.
- q: Can I use previously tokenized debit cards?
a: Yes, you can issue payouts to debit cards that were previously
tokenized on your platform. Note that the cardholder's name is
required for push to card.
- q: Will you support international debit cards?
a: Unfortunately not. This feature is only available for U.S. debit cards.
- q: Is there soft descriptor control?
a: Yes. Just like ACH payouts and charging a card, you can control the
soft descriptor per transaction.
- q: Is there a volume discount?
a: Not right now, but the goal is to reduce the transaction fee for
for everyone.
- q: What are the transaction limits?
a: The current limit is $2,500 per transaction.
---
242 changes: 123 additions & 119 deletions static/js/balanced.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,127 @@
}
}

function githubIssues(labelName) {
// display github issues
var repos = {};
var repos_length = 0;
var count = 0;

var populateIssues = function(issues) {
count++;
var open_count = 0;
var closed_count = 0;

_.each(issues, function(issue) {
_.each(issue.labels, function(label) {
if (label.name === labelName) {
var repo_name = issue.html_url.split('/')[4];

if (!_.has(repos, repo_name)) {
repos[repo_name] = {};
}

if (!_.has(repos[repo_name], 'issues')) {
repos[repo_name]['issues'] = {};
}

if (!_.has(repos[repo_name]['issues'], issue.title)) {
repos[repo_name]['issues'][issue.title] = {};
}

if (issue.state === 'open') {
open_count++;
} else {
closed_count++;
}

var days_ago = moment(new Date(issue.created_at)).fromNow();

repos[repo_name]['issues'][issue.title] = {
title: issue.title,
html_url: issue.html_url,
author: issue.user.login,
created_at: days_ago,
status: issue.state
};
repos[repo_name]['repo_name'] = repo_name;
repos[repo_name]['open_count'] = open_count;
repos[repo_name]['closed_count'] = closed_count;
}
});
});

if (count === repos_length) {
$(".loading").fadeOut(200);

// sort repos by number of open & closed issues
repos = _.sortBy(repos, function(repo) {
return -(repo.open_count + repo.closed_count); // sort descending
});

_.each(repos, function(repo, repo_name) {
var $repoTemplate = $(".github table.items tr.repo-template").clone().removeClass('repo-template');
$repoTemplate.find(".repo-name span").text(repo.repo_name);
$repoTemplate.find(".completed span").text(repo.closed_count);
$repoTemplate.find(".remaining span").text(repo.open_count);
$repoTemplate.attr('data-repo', repo.repo_name);
$repoTemplate.appendTo('tbody').fadeIn(300);
$("tbody").append('<tr class="issues" data-repo="' + repo.repo_name + '"><td colspan="3"></td></tr>');

_.each(repo.issues, function(issue) {

var $issueTemplate = $(".github table.items div.issue-template").clone().removeClass('issue-template');
$issueTemplate.find("a.issue-name").attr("href", issue.html_url);
$issueTemplate.find("a.issue-name").text(issue.title);
$issueTemplate.find(".author").text(issue.author);
$issueTemplate.find(".created-at").text(issue.created_at);
$issueTemplate.find(".status").text(issue.status);
$issueTemplate.find(".status").addClass(issue.status);
$('tbody tr.issues[data-repo="' + repo.repo_name + '"] td').append($issueTemplate);
});
});

$(".issue-name").each(function() {
if ($(this).width() > 400) {
$(this).css({
width: "60%",
display: "inline-block",
float: "left",
marginRight: 0
});
}
});
}
}

// pull github issues
$.ajax({
url: 'https://api.github.com/orgs/balanced/repos?client_id=bda58293b5d9ede74ab7&client_secret=62cfb784097a180bcb5169d9528a23538340ecf0',
dataType: 'json',
success: function(response) {
var repos = response.sort(function(a, b) {
return b.watchers_count - a.watchers_count;
});
for (var i = 0, l = repos.length; i < l; i++) {
if (repos[i].fork) {
continue;
}
repos_length += 1;

var issues_url = repos[i].issues_url.split('{')[0]; // remove name from issues/{name}

$.ajax({
url: issues_url + '?labels=' + labelName + '&state=all&client_id=bda58293b5d9ede74ab7&client_secret=62cfb784097a180bcb5169d9528a23538340ecf0',
dataType: 'json',
timeout: 5000,
cache: false,
success: populateIssues
});
}
}
});
}

var balanced = ctx.balanced = {
menu: function() {
$(".toggle-child-menu, .sidebar-child-menu-left .icon-x").click(function(e) {
Expand Down Expand Up @@ -395,125 +516,8 @@

},
pushToCard: function() {
// display github issues
var repos = {};
var repos_length = 0;
var count = 0;

var populateIssues = function(issues) {
count++;
var open_count = 0;
var closed_count = 0;

_.each(issues, function(issue) {
_.each(issue.labels, function(label) {
if (label.name === 'push to card') {
var repo_name = issue.html_url.split('/')[4];

if (!_.has(repos, repo_name)) {
repos[repo_name] = {};
}

if (!_.has(repos[repo_name], 'issues')) {
repos[repo_name]['issues'] = {};
}

if (!_.has(repos[repo_name]['issues'], issue.title)) {
repos[repo_name]['issues'][issue.title] = {};
}

if (issue.state === 'open') {
open_count++;
} else {
closed_count++;
}

var days_ago = moment(new Date(issue.created_at)).fromNow();

repos[repo_name]['issues'][issue.title] = {
title: issue.title,
html_url: issue.html_url,
author: issue.user.login,
created_at: days_ago,
status: issue.state
};
repos[repo_name]['repo_name'] = repo_name;
repos[repo_name]['open_count'] = open_count;
repos[repo_name]['closed_count'] = closed_count;
}
});
});

if (count === repos_length) {
$(".loading").fadeOut(200);

// sort repos by number of open & closed issues
repos = _.sortBy(repos, function(repo) {
return -(repo.open_count + repo.closed_count); // sort descending
});

_.each(repos, function(repo, repo_name) {
var $repoTemplate = $(".github table.items tr.repo-template").clone().removeClass('repo-template');
$repoTemplate.find(".repo-name span").text(repo.repo_name);
$repoTemplate.find(".completed span").text(repo.closed_count);
$repoTemplate.find(".remaining span").text(repo.open_count);
$repoTemplate.attr('data-repo', repo.repo_name);
$repoTemplate.appendTo('tbody').fadeIn(300);
$("tbody").append('<tr class="issues" data-repo="' + repo.repo_name + '"><td colspan="3"></td></tr>');

_.each(repo.issues, function(issue) {

var $issueTemplate = $(".github table.items div.issue-template").clone().removeClass('issue-template');
$issueTemplate.find("a.issue-name").attr("href", issue.html_url);
$issueTemplate.find("a.issue-name").text(issue.title);
$issueTemplate.find(".author").text(issue.author);
$issueTemplate.find(".created-at").text(issue.created_at);
$issueTemplate.find(".status").text(issue.status);
$issueTemplate.find(".status").addClass(issue.status);
$('tbody tr.issues[data-repo="' + repo.repo_name + '"] td').append($issueTemplate);
});
});

$(".issue-name").each(function() {
if ($(this).width() > 400) {
$(this).css({
width: "60%",
display: "inline-block",
float: "left",
marginRight: 0
});
}
});
}
};

// pull github issues
$.ajax({
url: 'https://api.github.com/orgs/balanced/repos?client_id=bda58293b5d9ede74ab7&client_secret=62cfb784097a180bcb5169d9528a23538340ecf0',
dataType: 'json',
success: function(response) {
var repos = response.sort(function(a, b) {
return b.watchers_count - a.watchers_count;
});
for (var i = 0, l = repos.length; i < l; i++) {
if (repos[i].fork) {
continue;
}
repos_length += 1;

var issues_url = repos[i].issues_url.split('{')[0]; // remove name from issues/{name}

$.ajax({
url: issues_url + '?labels=push+to+card&state=all&client_id=bda58293b5d9ede74ab7&client_secret=62cfb784097a180bcb5169d9528a23538340ecf0',
dataType: 'json',
timeout: 5000,
cache: false,
success: populateIssues
});
}
}
});

animateInView(".folded-box", "slide-up");
githubIssues();
// animation
animateInView(".benefit", "slide-up");

Expand Down
23 changes: 0 additions & 23 deletions static/less/payouts.less
Original file line number Diff line number Diff line change
Expand Up @@ -185,29 +185,6 @@ body.payouts {
}
}

.bank-statement-descriptor {
.card-info {
.sl;
padding: 10px 0 20px;
}

.amount {
.sl-sb;
line-height: 20px;
color: @pineGreen80;
text-align: right;
}

.amount-header {
color: @white;
text-align: right;
}

.sl-note {
padding-top: 10px;
}
}

.graphic {
&.payout-status {
background-image: url(/images/payouts/payouts_status-2x.png);
Expand Down
10 changes: 9 additions & 1 deletion static/less/push-to-card.less
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@
.title-wrapper {
opacity: 0;
border-top: none;

p {
margin-top: 20px;
}
}
}
}
Expand Down Expand Up @@ -191,8 +195,12 @@
.api {
.api-title {
.sl-sb;
padding-top: 56px;
padding-bottom: 10px;
padding-top: 56px;

&:first-of-type {
padding-top: 0;
}
}
}

Expand Down
Loading

0 comments on commit 702e887

Please sign in to comment.