#krishna1433-bankaccount
1 messages · Page 1 of 1 (latest)
awesome thank you!
but....................
{"This bank account is not a valid source for payments. Only valid sources can be attached to a customer. You can validate a bank account at creation time by passing the parameter usage='source'. The particular issue is: You must provide the account type of the bank account. This can be either 'company' or 'individual'."}
hmm
are you trying to do ACH payments, just so I'm clear?
can you try using this JSFiddle : https://jsfiddle.net/ywain/L2cefvtp/ (change the public key to your one) and see if it generates a token properly?
ah ok
the problem is you're missing account_holder_type (set to "company" or "individual")
Yes ach payments
Got it, so we send account_type only if account_holder_type is sent?
AFAIK you don't need to send account_type
Oh okay
not sure why it's in the docs, I will follow up on that internally
could there be a reason stripe.createToken wont go through
it just skips creating token
it shouldn't. Either you get back a token, or you get back an error
var button = document.getElementById('submit-button');
button.addEventListener('click', function (e) {
e.preventDefault();
debugger;
paymentViewModel.authorizationForACH = document.getElementById("authorization-consent").value;
if (paymentViewModel.authorizationForACH && nameInput != undefined && accountInput != undefined && routingInput != undefined && accountholderType != undefined) {
stripe.createToken('bank_account', {
account_holder_name: nameInput.value,
account_holder_type: accountholderType.value,
//account_type: accountType.value,
currency: 'USD',
country: 'US',
account_number: accountInput.value,
routing_number: routingInput.value,
}).then(function (resp) {
debugger;
if (resp.token != null) {
CreateCustomer(resp.token.id);
}
if (resp.error != null) {
showError()
}
});
}
else {
return false;
}
});
it just goes out of the function
maybe your if statement returns false?
you should add some logging/debugging and confirm if that if-statement even gets entered and createToken gets called
it is going into if statement
once it reaches stripe.createtoken
it skips creating token
it is not resolving
it is not going into createToken :/
there's not reason for that to happen really. Any errors in the browser console?
does the function in the .then() get called at any point? Any errors in the network tab of the browser?
I'm really
$('#bank-account-details').on('keyup keypress', function (e) {
var keyCode = e.keyCode || e.which;
if (keyCode === 13) {
e.preventDefault();
return false;
}
});
sorry
this messed up
One more question: Are micro deposits always in cents?
are they always less than a $
yep