mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-29 13:06:03 +10:00
Merge pull request #1037 from sharetribe/update-creating-stripe-accounts
Sent correct params in user.duck.js depending on Stripe API version
This commit is contained in:
commit
0d2474e66a
2 changed files with 5 additions and 5 deletions
|
|
@ -14,6 +14,9 @@ way to update this template, but currently, we follow a pattern:
|
|||
|
||||
## Upcoming version 2019-XX-XX
|
||||
|
||||
- [fix] Fix to PR [#1035](https://github.com/sharetribe/flex-template-web/pull/1035). In
|
||||
`user.duck.js` send correct params depending on Stripe API in use.
|
||||
[#1037](https://github.com/sharetribe/flex-template-web/pull/1037)
|
||||
- [change] Update creating Stripe account token to support the latest Stripe API update. See also
|
||||
[Stripe API changelog](https://stripe.com/docs/upgrades#api-changelog). **IMPORTANT:** If you are
|
||||
using a Stripe account created earlier than 19th of February 2019 you need to change the value of
|
||||
|
|
|
|||
|
|
@ -391,7 +391,7 @@ export const createStripeAccount = payoutDetails => (dispatch, getState, sdk) =>
|
|||
let payoutDetailValues;
|
||||
if (accountType === 'company') {
|
||||
payoutDetailValues = payoutDetails['company'];
|
||||
} else if (accountType === 'individual') {
|
||||
} else {
|
||||
payoutDetailValues = payoutDetails['individual'];
|
||||
}
|
||||
|
||||
|
|
@ -457,9 +457,8 @@ export const createStripeAccount = payoutDetails => (dispatch, getState, sdk) =>
|
|||
// edit 'useDeprecatedLegalEntityWithStripe' config in the stripe-config.js
|
||||
|
||||
const isNewAPI = !config.stripe.useDeprecatedLegalEntityWithStripe;
|
||||
const isIndividualAccount = accountType === 'individual';
|
||||
|
||||
if (isNewAPI && isIndividualAccount) {
|
||||
if (isNewAPI) {
|
||||
params = {
|
||||
business_type: 'individual',
|
||||
individual: {
|
||||
|
|
@ -471,8 +470,6 @@ export const createStripeAccount = payoutDetails => (dispatch, getState, sdk) =>
|
|||
},
|
||||
tos_shown_and_accepted: true,
|
||||
};
|
||||
} else if (isNewAPI && !isIndividualAccount) {
|
||||
// TODO new company accounst
|
||||
} else {
|
||||
params = {
|
||||
legal_entity: {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue