-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Create payment method from card with all available fields #61
Comments
+1, Is there a reason why this was omitted in the first place? |
Oversight on my part :) Will fix this in the next version |
Looking at this again, I don't think the "card" model should contain anything related to billing. If you want to add additional billing details, use |
So are you also removing the address fields from |
what about the name? that is also related to billing... |
Yes, I'm thinking that would be the cleanest way to do it. That would avoid future misunderstandings, and I'll also add documentation stating that any additional information should be added to the map before submission if required. Yes, the name as well. Neither the name nor any other billing details are required for cards, as this is usually present on the customer the card belongs to. Providing a separate billing address or name for a specific card is an edge case, and it seems reasonable to let developers add this themselves if required. All you need to do is basically:
|
Will the above solve your issue? Or do you think this is the wrong approach? |
Yeah that solves it, I would just suggest that you remove the extra fields on As background, I wanted to collect the ZIP code as I was receiving to many declines from banks, I thought I was adding it but I was unaware of this bug so declines continued, after overriding your code and adding the zip code, I think declines went to 0. |
That's interesting. We're using stripe in large scale, and have had 0 declines due to missing zip codes. Could it be that your customer objects are also missing zip codes? Granted, it might vary between countries/regions. I might look at adding billing details later through a different mechanism, but it doesn't strictly relate to the card model. I also want to keep the library as lightweight and flexible as possible in order to reduce the amount of maintenance required due to API changes. That's why I want to avoid defining the payloads in the library, and rather let that be controlled by the developers, in case something changes. |
Yes seems reasonable... And I'm not saving any address details to my customers as my guess is that only the payment method info is sent to the bank. For declines, banks will not say motives and just say charge seemed fraudulent, but adding the zip code as I've seen some other companies do seemed to make banks happy. (I'm using stripe Mexico) |
You are probably right. Will keep that in mind, maybe I can add better support for this somehow, outside of the card model. Thanks for your feedback! 👍 |
Add postal code to StripeCard.toPaymentMethod() Fix misc issues with CardForm Fix #61
Nice! Should we add to that map the cardholder name? |
You will still have to add cardholder name manually, at least for now. The official Stripe SDK for android now also collects the postal code, but not the cardholder name, and I'm just following suit. If you are able, you could maybe look into if the official SDKs uses the logged in customers name as the cardholder name? But until then, cardholder is not provided automatically. |
Hello,
I noticed on my dashboard that the address was not being collected even though I added it to the card object from which I created a payment method.
I did some research and it seems you are not using all the fields when creating a payment method on card.dart
Could you add all the remaining billing fields?
The text was updated successfully, but these errors were encountered: