-
Notifications
You must be signed in to change notification settings - Fork 938
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
Add missing stripe countries #968
Conversation
4194e5e
to
6948113
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 👍 , added one comment.
@@ -117,7 +135,7 @@ export const translateStripeError = (country, intl, stripeError) => { | |||
* | |||
* @return {Object} key - value in Object literal. | |||
*/ | |||
export const mapInputsToStripeAccountKeys = (inputType, value) => { | |||
export const mapInputsToStripeAccountKeys = (country, values) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remember to update the function doc ☝️
}) | ||
); | ||
|
||
const fields = ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just return this? There's no need for a new variable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Just one comment to existing code, but add changes to fr.json
too and update changelog.md
.
src/config.js
Outdated
accountConfig: { | ||
routingNumber: true, | ||
accountNumber: true, | ||
}, | ||
personalIdNumberRequired: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try again with ssn_last_4: '0000'. Test environment might require it to be exactly that.
https://stripe.com/docs/connect/testing#test-personal-id-numbers
cafc8db
to
4f5cbec
Compare
|
||
const personalIdNumberLabel = showPersonalIdNumber | ||
? intl.formatMessage({ | ||
id: `PayoutDetailsForm.personalIdNumberLabel.${country}`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have tried to avoid variables in translation keys. The reason is that most of our customers will have hard time finding correct components if they can't search full translation key from files. (We have used them only in situations where there is dynamic content coming from integrations - like Stripe errors.)
So, chained ternary or let
should work better here.
CHANGELOG.md
Outdated
@@ -14,6 +14,9 @@ way to update this template, but currently, we follow a pattern: | |||
|
|||
## Upcoming version 2018-XX-XX | |||
|
|||
* [add] Add Stripe support for new countries: Canada, New Zealand, Switzerland, Norway, and Hong Kong. | |||
Also add more required fields for US and Australia. There are multiple new translation keys that might not be translated into French yet. If you use French translation check PR for the changed keys. | |||
[#968](https://github.com/sharetribe/flex-template-web/pull/968) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yarn run format-docs
4f5cbec
to
708d423
Compare
/* | ||
* Stripe related configuration. | ||
*/ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be best that we add more comments to this key. We have had a couple of problems when customizers haven't really understood that Stripe has a publishable key and private key - and they both should be set. So, repeating that info probably helps.
// NOTE: REACT_APP_STRIPE_PUBLISHABLE_KEY is mandatory environment variable.
// This variable is set in a hidden file: .env
// To make Stripe connection work, you also need to set Stripe's private key in the Flex Console.
20f081d
to
c78eac7
Compare
…dd different bank account formats
c78eac7
to
abe628a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
72d73cc
to
732fa86
Compare
732fa86
to
ffa3c7e
Compare
Add Stripe support for new countries:
Update also already existing countries to have all the required information:
Note:
Check this commit for new translations keys added to fr.json translations file.