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

24133 - Add in new tip_internal_payment_override role #1805

Merged
merged 3 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 4 additions & 4 deletions pay-api/src/pay_api/factory/payment_system_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ def create(**kwargs):

if total_fees == 0:
_instance = InternalPayService()
# TIP = Testing in production
elif Role.TIP_INTERNAL_PAYMENT_OVERRIDE.value in user.roles:
_instance = InternalPayService()
elif Role.STAFF.value in user.roles:
if has_bcol_account_number:
_instance = BcolService()
else:
_instance = InternalPayService()
_instance = BcolService() if has_bcol_account_number else InternalPayService()
else:
# System accounts can create BCOL payments similar to staff by providing as payload
if has_bcol_account_number and Role.SYSTEM.value in user.roles:
Expand Down
1 change: 1 addition & 0 deletions pay-api/src/pay_api/utils/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ class Role(Enum):
MANAGE_EFT = "manage_eft"
EFT_REFUND = "eft_refund"
EFT_REFUND_APPROVER = "eft_refund_approver"
TIP_INTERNAL_PAYMENT_OVERRIDE = "tip_internal_payment_override"


class Code(Enum):
Expand Down
Loading