Skip to content
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

[WIP] Update Payment flow on clicking Pay #50640

Draft
wants to merge 29 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift click to select a range
31823cc
add strings
rezkiy37 Oct 11, 2024
3948c12
add invoice case for getBankAccountRoute
rezkiy37 Oct 11, 2024
a2d1b9a
add invoice payment menu items
rezkiy37 Oct 11, 2024
f4f708a
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 Oct 14, 2024
905f8e5
add payment method button
rezkiy37 Oct 14, 2024
94647a4
pay invoice command accepts method id
rezkiy37 Oct 14, 2024
0080e82
integrate payment logic
rezkiy37 Oct 14, 2024
abed35d
pass account type
rezkiy37 Oct 15, 2024
e45613d
set add debit card route
rezkiy37 Oct 15, 2024
8b081a7
render all payment methods
rezkiy37 Oct 15, 2024
1302948
clear todo
rezkiy37 Oct 15, 2024
699a035
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 Oct 16, 2024
2e05df0
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 Oct 17, 2024
16f0136
Revert "set add debit card route"
rezkiy37 Oct 17, 2024
dbd3e10
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 Oct 25, 2024
4a8928a
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 Oct 28, 2024
5168b6f
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 Nov 6, 2024
3e5d028
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 Nov 14, 2024
ee24a29
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 Nov 19, 2024
27edab4
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 Nov 20, 2024
38d4636
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 Nov 25, 2024
90712f2
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 Dec 4, 2024
05209e7
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 Dec 6, 2024
6f13e9d
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 Dec 9, 2024
529231e
use expensify payment type
rezkiy37 Dec 9, 2024
facf112
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 Dec 12, 2024
972bd42
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 Dec 16, 2024
006cd92
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 Dec 23, 2024
e263162
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 Dec 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
pass account type
  • Loading branch information
rezkiy37 committed Oct 15, 2024
commit abed35dd358c1f8a7af7330ec6b592ebfa1479e2
7 changes: 5 additions & 2 deletions src/components/SettlementButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 160,10 @@ function SettlementButton({
value: CONST.IOU.PAYMENT_TYPE.ELSEWHERE,
backButtonText: translate('iou.individual'),
subMenuItems: defaultPaymentMethod
? [{...paymentSubitem, onSelected: () => onPress(CONST.IOU.PAYMENT_TYPE.VBBA, false, defaultPaymentMethod?.methodID)}, ...subMenuItems]
? [
{...paymentSubitem, onSelected: () => onPress(CONST.IOU.PAYMENT_TYPE.VBBA, false, defaultPaymentMethod.methodID, defaultPaymentMethod.accountType)},
...subMenuItems,
]
: subMenuItems,
});
}
Expand Down Expand Up @@ -190,7 193,7 @@ function SettlementButton({
value: CONST.IOU.PAYMENT_TYPE.ELSEWHERE,
backButtonText: translate('iou.business'),
subMenuItems: defaultPaymentMethod
? [{...paymentSubitem, onSelected: () => onPress(CONST.IOU.PAYMENT_TYPE.VBBA, true, defaultPaymentMethod?.methodID)}, ...subMenuItems]
? [{...paymentSubitem, onSelected: () => onPress(CONST.IOU.PAYMENT_TYPE.VBBA, true, defaultPaymentMethod.methodID, defaultPaymentMethod.accountType)}, ...subMenuItems]
: subMenuItems,
});
}
Expand Down
3 changes: 2 additions & 1 deletion src/components/SettlementButton/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 1,6 @@
import type {StyleProp, ViewStyle} from 'react-native';
import type {OnyxEntry} from 'react-native-onyx';
import type {PaymentMethod} from '@components/KYCWall/types';
import type ROUTES from '@src/ROUTES';
import type {Route} from '@src/ROUTES';
import type {ButtonSizeValue} from '@src/styles/utils/types';
Expand All @@ -11,7 12,7 @@ type EnablePaymentsRoute = typeof ROUTES.ENABLE_PAYMENTS | typeof ROUTES.IOU_SEN

type SettlementButtonProps = {
/** Callback to execute when this button is pressed. Receives a single payment type argument. */
onPress: (paymentType?: PaymentMethodType, payAsBusiness?: boolean, methodID?: number) => void;
onPress: (paymentType?: PaymentMethodType, payAsBusiness?: boolean, methodID?: number, paymentMethod?: PaymentMethod) => void;

/** Callback when the payment options popover is shown */
onPaymentOptionsShow?: () => void;
Expand Down
Loading