#krishna1433-bankaccount

1 messages · Page 1 of 1 (latest)

stiff cliff
#

@tawny relic you can just omit that paramater I believe, you don't need to pass it.

tawny relic
#

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'."}

stiff cliff
#

hmm

#

are you trying to do ACH payments, just so I'm clear?

#

ah ok

#

the problem is you're missing account_holder_type (set to "company" or "individual")

tawny relic
#

Yes ach payments

#

Got it, so we send account_type only if account_holder_type is sent?

stiff cliff
#

AFAIK you don't need to send account_type

tawny relic
#

Oh okay

stiff cliff
#

not sure why it's in the docs, I will follow up on that internally

tawny relic
#

Hm, okay

#

thank you!

tawny relic
#

could there be a reason stripe.createToken wont go through

#

it just skips creating token

stiff cliff
#

it shouldn't. Either you get back a token, or you get back an error

tawny relic
#

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

stiff cliff
#

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

tawny relic
#

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 :/

stiff cliff
#

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?

tawny relic
#

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 $

stiff cliff
#

yep