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

fix: improve payment by stripe #1084

Merged
merged 13 commits into from
Mar 5, 2019

Conversation

pranavpandey1998official
Copy link
Contributor

@pranavpandey1998official pranavpandey1998official commented Feb 12, 2019

1)corrected the keyboard type for input

2)made the whole button clickable in case of the month, year and card type selector

3)added card No. validator and automatic card type selector

feat: #1071
ezgif com-video-to-gif

1)corrected the keyboard type for input

2)made the whole button clickable in case of the month, year and card type selector

3)added card No. validator and automatic card type selector

feat: fossasia#1071
val visaPattern = Pattern.compile("^4[0-9]{0,15}$")
val masterCardPattern = Pattern.compile("^(5[1-5]|222[1-9]|22[3-9][0-9]|2[3-6]" +
"[0-9]{2}|27[01][0-9]|2720)[0-9]{0,15}$")
val americanExpressPattern = Pattern.compile("^3[47][0-9]{0,15}$")
Copy link
Member

Choose a reason for hiding this comment

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

Stripe most probably has pre defined functions to check the above. Can you confirm? if yes use them

Copy link
Contributor Author

Choose a reason for hiding this comment

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

They have their own cardInputwidget which handles all these operation https://stripe.com/docs/mobile/android .

  • That would mean changing the whole input section .. should I use it ???

Copy link
Member

Choose a reason for hiding this comment

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

If that is the case then it is fine

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can you elaborate is current commit fine or I should use cardInputWidget

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@nikit19 please reply

Copy link
Member

Choose a reason for hiding this comment

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

It is fine

@fossasia fossasia deleted a comment Feb 13, 2019
@fossasia fossasia deleted a comment Feb 13, 2019
@iamareebjamal iamareebjamal changed the title feat: #1071 improving payment by stipe wip: #1071 improving payment by stipe Feb 13, 2019
@iamareebjamal
Copy link
Member

Please add wip: in title until the work is complete

@fossasia fossasia deleted a comment Feb 13, 2019
@fossasia fossasia deleted a comment Feb 13, 2019
Lifted ticketIdAndQty from view layer to viewModel and done required changes

feat: fossasia#1097
@pranavpandey1998official pranavpandey1998official changed the title wip: #1071 improving payment by stipe fix: #1071 improving payment by stipe Feb 14, 2019
@pranavpandey1998official pranavpandey1998official changed the title fix: #1071 improving payment by stipe wip: #1071 improving payment by stipe Feb 14, 2019
nikit19
nikit19 previously approved these changes Feb 15, 2019
@pranavpandey1998official pranavpandey1998official changed the title wip: #1071 improving payment by stipe fix: #1071 improving payment by stipe Feb 15, 2019
@pranavpandey1998official
Copy link
Contributor Author

pranavpandey1998official commented Feb 16, 2019

@iamareebjamal, please review and merge it

@iamareebjamal iamareebjamal changed the title fix: #1071 improving payment by stipe fix: improve payment by stripe Feb 16, 2019
@iamareebjamal
Copy link
Member

iamareebjamal commented Feb 16, 2019

Fix conflicts

@pranavpandey1998official
Copy link
Contributor Author

@iamareebjamal done

cardBrand = attendeeViewModel.cardType[0]
selectCardText.text = cardBrand
rootView.cardSelector.isVisible = true
rootView.cardNumber.error = "Invalid card number"
Copy link
Member

Choose a reason for hiding this comment

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

Move logic to a util and remove duplication

@fossasia fossasia deleted a comment Feb 17, 2019
@fossasia fossasia deleted a comment Feb 17, 2019
@@ -131,4 +132,17 @@ object Utils {
navigation.animation = AnimationUtils.loadAnimation(context, R.anim.slide_down)
}
}

fun creditCardVerify(s: String): Int {
Copy link
Member

Choose a reason for hiding this comment

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

Name properly and return enum

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Member

@iamareebjamal iamareebjamal left a comment

Choose a reason for hiding this comment

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

Remove all unnecessary changes

Copy link
Member

@iamareebjamal iamareebjamal left a comment

Choose a reason for hiding this comment

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

Remove all unnecessary changes

1)corrected the keyboard type for input

2)made the whole button clickable in case of the month, year and card type selector

3)added card No. validator and automatic card type selector

feat: fossasia#1071
@iamareebjamal
Copy link
Member

@pranavpandey1998official Updates?

@pranavpandey1998official
Copy link
Contributor Author

@iamareebjamal I have introduced an enum as you said and removed all unnecessary changes. what next?

@iamareebjamal
Copy link
Member

Go to File changes and see the requested changes

@iamareebjamal
Copy link
Member

There are still unrelated changes. Please revert them.

@pranavpandey1998official
Copy link
Contributor Author

@iamareebjamal the indentation changes are done through gradlew spotlessApply , if i revert them gradlew spotlessCheck is failing and rest are changes are related to commit please specify if you find something else

@iamareebjamal iamareebjamal merged commit 74e1faf into fossasia:development Mar 5, 2019
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.

3 participants