Skip to content

Commit

Permalink
Remove stripe signup options (#3188)
Browse files Browse the repository at this point in the history
* Disable add bank account from settings and upload form

* Disable add bank account from memberships page

---------

Co-authored-by: miko <[email protected]>
  • Loading branch information
keikari and miko authored Dec 3, 2024
1 parent feb404b commit 8e8bada
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 32 deletions.
34 changes: 10 additions & 24 deletions ui/component/publish/shared/publishPrice/view.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import I18nMessage from 'component/i18nMessage';
import { PAYWALL } from 'constants/publish';
import * as PUBLISH_TYPES from 'constants/publish_types';
import usePersistedState from 'effects/use-persisted-state';
import ButtonStripeConnectAccount from 'component/buttonStripeConnectAccount';
import './style.lazy.scss';

const FEE = { MIN: 1, MAX: 999.99 };
Expand Down Expand Up @@ -103,20 +102,6 @@ function PublishPrice(props: Props) {
}
}

function getBankAccountDriver() {
return (
<div className="publish-price__bank-driver">
<I18nMessage
tokens={{
click_here_to_connect_a_bank_account: <ButtonStripeConnectAccount />,
}}
>
%click_here_to_connect_a_bank_account% to enable purchasing and renting functionality.
</I18nMessage>
</div>
);
}

function getRestrictionWarningRow() {
return (
<div className={classnames('publish-price__row', {})}>
Expand Down Expand Up @@ -145,15 +130,16 @@ function PublishPrice(props: Props) {
disabled={disabled}
onChange={() => updatePublishForm({ paywall: PAYWALL.FREE })}
/>
<FormField
type="radio"
name="content_fiat"
label={`${__('Purchase / Rent')} \u{0024}`}
checked={paywall === PAYWALL.FIAT}
disabled={disabled || noBankAccount || !fiatAllowed}
onChange={() => updatePublishForm({ paywall: PAYWALL.FIAT })}
/>
{noBankAccount && getBankAccountDriver()}
{!noBankAccount && (
<FormField
type="radio"
name="content_fiat"
label={`${__('Purchase / Rent')} \u{0024}`}
checked={paywall === PAYWALL.FIAT}
disabled={disabled || noBankAccount || !fiatAllowed}
onChange={() => updatePublishForm({ paywall: PAYWALL.FIAT })}
/>
)}
<FormField
type="radio"
name="content_sdk"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import * as PAGES from 'constants/pages';
import Spinner from 'component/spinner';
import Button from 'component/button';
import ErrorBubble from 'component/common/error-bubble';
import ButtonStripeConnectAccount from 'component/buttonStripeConnectAccount';

type Props = {
component: any,
Expand Down Expand Up @@ -69,8 +68,8 @@ const TabWrapper = (props: Props) => {
return (
<ErrorBubble
title={__('Bank Account Status')}
subtitle={__('To be able to begin receiving payments you must connect a Bank Account first.')}
action={<ButtonStripeConnectAccount />}
subtitle={__('Adding a bank account has been disabled.')}
action={<></>}
/>
);
}
Expand Down
8 changes: 3 additions & 5 deletions ui/page/settingsStripeAccount/view.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import Card from 'component/common/card';
import Page from 'component/page';
import I18nMessage from 'component/i18nMessage';
import Spinner from 'component/spinner';
import ButtonStripeConnectAccount from 'component/buttonStripeConnectAccount';

import * as ICONS from 'constants/icons';
import * as PAGES from 'constants/pages';
Expand Down Expand Up @@ -112,12 +111,13 @@ const StripeAccountConnection = (props: Props) => {
</div>
) : (
<div className="card__body-actions">
<h3>{__('Connect your bank account to Odysee to receive donations directly from users')}</h3>
<h3>{__('Adding a bank account has been disabled.')}</h3>
</div>
)
}
actions={
chargesEnabled && !accountRequiresVerification ? (
chargesEnabled &&
!accountRequiresVerification && (
<>
<Button
button="secondary"
Expand All @@ -135,8 +135,6 @@ const StripeAccountConnection = (props: Props) => {
/>
)}
</>
) : (
<ButtonStripeConnectAccount />
)
}
/>
Expand Down

0 comments on commit 8e8bada

Please sign in to comment.