Skip to content

Commit

Permalink
feat: add bank transfers support
Browse files Browse the repository at this point in the history
  • Loading branch information
keellyp committed Feb 21, 2025
1 parent 4696141 commit 1cb87da
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/components/customers/CustomerMainInfos.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ const PaymentProviderMethodTranslationsLookup: Record<ProviderPaymentMethodsEnum
[ProviderPaymentMethodsEnum.UsBankAccount]: 'text_65e1f90471bc198c0c934d8e',
[ProviderPaymentMethodsEnum.Boleto]: 'text_1738234109827diqh4eswleu',
[ProviderPaymentMethodsEnum.Crypto]: 'text_17394287699017cunbdlhnhf',
[ProviderPaymentMethodsEnum.CustomerBalance]: 'text_1739432510045wh80q1wdt4z',
}

gql`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,20 @@ export const PaymentProvidersAccordion: FC<PaymentProvidersAccordionProps> = ({
onSetPaymentMethod(ProviderPaymentMethodsEnum.Link, checked)
}}
/>

<Checkbox
name="providerCustomer.providerPaymentMethods.bank_transfers"
value={!!paymentMethods.includes(ProviderPaymentMethodsEnum.CustomerBalance)}
label={translate('text_1739432510045wh80q1wdt4z')}
sublabel={translate('text_1739432510045brhda8fxidc')}
disabled={
isPaymentMethodUnique &&
paymentMethods.includes(ProviderPaymentMethodsEnum.CustomerBalance)
}
onChange={(_e, checked) => {
onSetPaymentMethod(ProviderPaymentMethodsEnum.CustomerBalance, checked)
}}
/>
</div>
</div>
<div className="flex flex-col gap-1">
Expand Down
3 changes: 3 additions & 0 deletions src/generated/graphql.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2907,6 +2907,7 @@ export enum IntegrationTypeEnum {
Anrok = 'anrok',
ApiPermissions = 'api_permissions',
AutoDunning = 'auto_dunning',
FromEmail = 'from_email',
Hubspot = 'hubspot',
ManualPayments = 'manual_payments',
Netsuite = 'netsuite',
Expand Down Expand Up @@ -4529,6 +4530,7 @@ export type PlanOverridesInput = {
export enum PremiumIntegrationTypeEnum {
ApiPermissions = 'api_permissions',
AutoDunning = 'auto_dunning',
FromEmail = 'from_email',
Hubspot = 'hubspot',
ManualPayments = 'manual_payments',
Netsuite = 'netsuite',
Expand Down Expand Up @@ -4596,6 +4598,7 @@ export enum ProviderPaymentMethodsEnum {
Boleto = 'boleto',
Card = 'card',
Crypto = 'crypto',
CustomerBalance = 'customer_balance',
Link = 'link',
SepaDebit = 'sepa_debit',
UsBankAccount = 'us_bank_account'
Expand Down
4 changes: 3 additions & 1 deletion translations/base.json
Original file line number Diff line number Diff line change
Expand Up @@ -2868,5 +2868,7 @@
"text_1739268382272qnne2h7slna": "Breakout",
"text_1739270764222q8lrgvllulk": "Commitment",
"text_1739869126030nbuobu5baxi": "Total (Gross)",
"text_1739869126030kuxz0uvfj02": "Total (Net)"
"text_1739869126030kuxz0uvfj02": "Total (Net)",
"text_1739432510045wh80q1wdt4z": "Bank Transfers",
"text_1739432510045brhda8fxidc": "Pay through the customer balance"
}

0 comments on commit 1cb87da

Please sign in to comment.