Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[πŸ’³] Saving credit cards #368

Merged
merged 17 commits into from
Nov 6, 2018
Merged

[πŸ’³] Saving credit cards #368

merged 17 commits into from
Nov 6, 2018

Conversation

eoji
Copy link
Contributor

@eoji eoji commented Nov 6, 2018

What

Users can now save credit cards to their account πŸ†’

How

  • Updated Stripe library.
  • Updated strings.
  • A little renaming πŸ˜…
  • Refactored payment method row because it was breaking XML previews in Studio and it was just easier to do it as a LinearLayout πŸ‘€
  • Created card using Stripe SDK.
  • Added mutation for saving cards.
  • Added placeholder Stripe keys.
  • Added MockStripe and CardFactory classes for testing ✨
  • I'm doing a lot of shady things because the Stripe CardInputWidget doesn't properly tell me when it has focus or properly determine if a card is valid (IMO~)

see

image

@eoji eoji requested a review from Rcureton November 6, 2018 16:42
@eoji
Copy link
Contributor Author

eoji commented Nov 6, 2018

Add new card screen

Copy link
Contributor

@Rcureton Rcureton left a comment

Choose a reason for hiding this comment

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

Amazing PR! Just some minor comments to fix. We're making so much progress

app/build.gradle Show resolved Hide resolved
}
//why wouldn't this just be an error?
val createPaymentSource = response.data()?.createPaymentSource()
if (!createPaymentSource?.isSuccessful!!) {
Copy link
Contributor

Choose a reason for hiding this comment

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

So if createPaymentSource !=null and is not successful then set the error?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes πŸ˜•

app/src/main/res/layout/fragment_new_card.xml Outdated Show resolved Hide resolved
@eoji eoji merged commit 6b5f4f1 into settings-v3 Nov 6, 2018
@eoji eoji deleted the io/add-new-card branch November 6, 2018 21:41
eoji added a commit that referenced this pull request Feb 6, 2019
* User can see Payment Methods screen (#367)
* [πŸ’³] Saving credit cards (#368)
* [πŸš«πŸ’³] Deleting saved cards (#373)
* Adding divider when cards are present with tests. (#393)
* updating stripe to 8.3.0 #453
* [πŸ’³] Only allowing Kickstarter accepted card types to be saved (#454)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants