Skip to content

Instantly share code, notes, and snippets.

Created Nov 15, 2013
What would you like to do?
f0ster left the chat room. (Ping timeout: 240 seconds)
[10:37am] JSeligstein: remear: how would I know which one to use without also storing my token?
[10:37am] ras__: skylar: it'll have all the same cards and bank accounts attached on Customer that it does on Account
[10:37am] remear: JSeligstein: if you did something like customer.debit it would default to the most recently added
[10:38am] skylar: ras__ so Balanced::Account.find(uri).customer_uri ?
[10:39am] remear: to debit a specific one just pass the URI for it as source_uri. how you determine which one you want to debit is up to you. some people allow only one card at a time and so store the URI for it. others allow multiple cards to pick from
[10:39am] remear: skylar: yes
[10:39am] skylar: thanks! that's helpful
[10:39am] JSeligstein: remear: okay, i'll just store the uri for the specific card then
[10:39am] JSeligstein: remear: thanks
[10:39am] remear: skylar: Account has a 1:1 relationship to a Customer object with all the same stuff attached to it
[10:40am] skylar: and i also see that Amex now requires zip codes? will that fail with the old API too?
[10:40am] ras__: skylar: you'll have a higher decline rate in both versions
[10:41am] remear: skylar: as ras__ said, it's not that it will fail, it's that supplying postal_code and and CVV will noticeably reduce the decline rate
[10:41am] remear: cvv (security_code)
[10:41am] JSeligstein: remear: thanks for the help, tell matin Joel said hello
[10:41am] remear: JSeligstein: will do. let us know if you have any other questions
[10:42am] skylar: remear: got it. so that would mean Balance.js won't return "invalid card" if tokenizing w/o zip?
[10:43am] remear: i believe it would say postal_code_check: unknown is all
[10:47am] jkwade joined the chat room.
[10:48am] awsmsce: got a question about timing
[10:48am] JSeligstein: remear: hey - at the time a card is tokenized, is it validated/approved?
[10:48am] ras__: awsmsce: go for it!
[10:48am] awsmsce: how long should these requests take (roughly)
[10:48am] awsmsce: customer.debit(
[10:48am] awsmsce: :amount => 5000,
[10:48am] awsmsce: :description => "new debit"
[10:48am] awsmsce: )
[10:48am] awsmsce: puts "check to make sure debit is added"
[10:48am] awsmsce: raise "customer should not have 0 debits" unless customer.debits.any?
[10:48am] awsmsce: raise "customer debit should be 5000" unless customer.debits.first.amount == 5000
[10:49am] awsmsce: these are taking like 15+ seconds to return
[10:49am] remear: JSeligstein: there's verification that happens to make sure it's a real card
[10:49am] JSeligstein: remear: but cvv, e.g. has not been validated?
[10:50am] remear: in a production marketplace it would verify security_code and postal_code when supplied
[10:50am] JSeligstein: remear: what about address verification - do you do that? (Can I do it for shipping addresses as well?)
[10:50am] awsmsce: ras__: do you use the Ruby gem?
[10:51am] ras__: awsmsce: yes i do use it, I'm guessing you're using the same
[10:52am] JSeligstein: remear: also - is there a list of errors? not seeing those in docs.
[10:52am] remear: JSeligstein: address verification only for U.S. cards and only for cards, not shipping addresses
[10:53am] remear: JSeligstein:
[10:53am] ras__: awsmsce: that's too long of a wait time tho, do you have a production account or test
[10:53am] JSeligstein: thanks
[10:54am] ras__: awsmsce: also is this a recent occurrence?
[10:55am] DamonC joined the chat room.
[10:55am] DamonC was promoted to operator by ChanServ.
[10:55am] awsmsce: ras__: test account. Are the test accounts slower?
[10:56am] dclasso left the chat room. (Quit: Page closed)
[10:57am] awsmsce: ras__: we've been testing it over the last 3 weeks and noticed it fairly consistently this way, but it seemed worse yesterday
[10:57am] ras__: awsmsce: I don't believe so, but I just wanted to see if we needed to escalate this issue. Although it rarely takes that long, it can depend on the load and other factors such as where you are geographically (i.e. how long it takes to connect with the closest instance of balanced)
[10:58am] ras__: awsmsce: the debits are still succeeding tho right? and you're not getting a timeout error
[10:58am] awsmsce: actually, our server is timing out the request because they are reaching 30seconds
[10:58am] awsmsce: its' not just the debit
[10:59am] awsmsce: we're trying to the recommended checks that are outlined in the examples
[10:59am] remear: what client library are you using?
[10:59am] awsmsce: ""
[10:59am] remear: what version of balanced-ruby?
[10:59am] awsmsce: remear: one sec
[11:00am] awsmsce: remear: balanced (0.7.4)
[11:01am] JSeligstein: x`What's the business-kyc and business-principal kyc errors?
[11:01am] remear: the timeout by default is 60s.
[11:02am] remear: JSeligstein: i think those are old errors related to underwriting for the Account resource
[11:03am] msherry joined the chat room.
[11:03am] msherry was promoted to operator by ChanServ.
[11:03am] awsmsce: remear: so i should expect requests to take up to 60 seconds?
[11:04am] natea left the chat room. (Quit: natea)
[11:04am] remear: you should plan for it but they should never take anywhere near that during normal operations.
[11:04am] remear: sometimes it has to do with where your servers are geographically and the internet hops between your servers and the balanced servers
[11:04am] awsmsce: remear: what would you say is normal? < 5s?
[11:05am] remear: for debits, it can be, but is generally less than 10 from what i normally see
[11:05am] remear: we'll keep and eye on it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment