mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-26 06:47:17 +10:00
Hide company account creation if new Stripe API is used
This commit is contained in:
parent
1c14794ed8
commit
0e975d2a61
1 changed files with 27 additions and 21 deletions
|
|
@ -46,7 +46,11 @@ const PayoutDetailsFormComponent = props => (
|
|||
values,
|
||||
} = fieldRenderProps;
|
||||
|
||||
const { country, accountType } = values;
|
||||
const { country } = values;
|
||||
|
||||
const usesOldAPI = config.stripe.useDeprecatedLegalEntityWithStripe;
|
||||
|
||||
const accountType = usesOldAPI ? values.accountType : 'individual';
|
||||
|
||||
const individualAccountLabel = intl.formatMessage({
|
||||
id: 'PayoutDetailsForm.individualAccount',
|
||||
|
|
@ -99,27 +103,29 @@ const PayoutDetailsFormComponent = props => (
|
|||
|
||||
return (
|
||||
<Form className={classes} onSubmit={handleSubmit}>
|
||||
<div className={css.sectionContainer}>
|
||||
<h3 className={css.subTitle}>
|
||||
<FormattedMessage id="PayoutDetailsForm.accountTypeTitle" />
|
||||
</h3>
|
||||
<div className={css.radioButtonRow}>
|
||||
<FieldRadioButton
|
||||
id="individual"
|
||||
name="accountType"
|
||||
label={individualAccountLabel}
|
||||
value="individual"
|
||||
showAsRequired={showAsRequired}
|
||||
/>
|
||||
<FieldRadioButton
|
||||
id="company"
|
||||
name="accountType"
|
||||
label={companyAccountLabel}
|
||||
value="company"
|
||||
showAsRequired={showAsRequired}
|
||||
/>
|
||||
{usesOldAPI ? (
|
||||
<div className={css.sectionContainer}>
|
||||
<h3 className={css.subTitle}>
|
||||
<FormattedMessage id="PayoutDetailsForm.accountTypeTitle" />
|
||||
</h3>
|
||||
<div className={css.radioButtonRow}>
|
||||
<FieldRadioButton
|
||||
id="individual"
|
||||
name="accountType"
|
||||
label={individualAccountLabel}
|
||||
value="individual"
|
||||
showAsRequired={showAsRequired}
|
||||
/>
|
||||
<FieldRadioButton
|
||||
id="company"
|
||||
name="accountType"
|
||||
label={companyAccountLabel}
|
||||
value="company"
|
||||
showAsRequired={showAsRequired}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
{accountType ? (
|
||||
<React.Fragment>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue