Skip to content

Commit

Permalink
Fixed a typo and added form placeholders
Browse files Browse the repository at this point in the history
  • Loading branch information
sahat committed Feb 11, 2014
1 parent a0150ac commit 87da649
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions controllers/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -464,15 +464,15 @@ exports.postVenmo = function(req, res, next) {

if (validator.isEmail(req.body.user)) {
formData.email = req.body.user;
} else if (validator.isNumberic(req.body.user) &&
} else if (validator.isNumeric(req.body.user) &&
validator.isLength(req.body.user, 10, 11)) {
formData.phone = req.body.user;
} else {
formData.user_id = req.body.user;
}

// Send money
request.post('https://sandbox-api.venmo.com/v1/payments', { form: formData }, function(err, request, body) {
request.post('https://api.venmo.com/v1/payments', { form: formData }, function(err, request, body) {
if (err) return next(err);
if (request.statusCode !== 200) {
req.flash('errors', { msg: JSON.parse(body).error.message });
Expand Down
6 changes: 3 additions & 3 deletions views/api/venmo.jade
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ block content
input(type='hidden', name='_csrf', value=token)
.form-group
label.control-label(for='user') Phone, Email or Venmo User ID
input.form-control(type='text', name='user', id='user', autofocus=true)
input.form-control(type='text', name='user', id='user', placeholder='15555555555', autofocus=true)
.form-group
label.control-label(for='note') Note
input.form-control(type='text', name='note', id='note')
input.form-control(type='text', name='note', id='note', placeholder='A message to accompany the payment.')
.form-group
label.control-label(for='amount') Amount
input.form-control(type='text', name='amount', id='amount')
input.form-control(type='text', name='amount', id='amount', placeholder='0.10')
.form-group
button.btn.btn-primary(type='submit')
i.fa.fa-usd
Expand Down

0 comments on commit 87da649

Please sign in to comment.