Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

implement createTokenWithBankAccount #810

Closed

Conversation

sebber
Copy link

@sebber sebber commented Jul 21, 2021

Proposed changes

It addresses #809

createTokenWithBankAccount misses the implementation for android, I suppose because the stripe-android package changed token creation from using a BankAccount to BankAccountTokenParams so it broke this library at some point.
This works as far as I've been able to see in the app I'm working on.

Types of changes

What types of changes does your code introduce to tipsi-stripe?
Put an x in the boxes that apply

  • Bugfix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality not to work as expected)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! Next steps are a reminder of what we are going to look at before merging your code.

  • I have added tests that prove my fix is useful or that my feature works
  • I have added necessary documentation (if appropriate)
  • I know that my PR will be merged only if it has tests and they pass

Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you choose the solution you did and what alternatives you considered.

@@ -180,6 +180,28 @@ public static String getValue(final ReadableMap map, final String key) {
return allowedCountriesForShipping;
}

public static BankAccountTokenParams.Type accountHolderTypeFromString(String value) {
if (value == "individual") {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my case, this method always return null. So, I have to change from value == "individual" to value.equals("individual")

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh thank you for your review! 🙌 My Java is obviously pretty rusty, I'll try to push a commit with an .equals check as soon as possible!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I pushed those changes you suggested, but wasn't able to test in the app I'm using this in myself because It doesn't build right now because of other reasons, and I'm on vacation for about a month so I don't have time to figure those details out right now. I trust that what you suggested is correct, but next time I'll be able to test to see that this is working myself is probably in the end of august, just an FYI.

@fbartho fbartho closed this Jun 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants