Skip to content

Commit

Permalink
24133 - Add in new tip_internal_payment_override role (#1805)
Browse files Browse the repository at this point in the history
  • Loading branch information
seeker25 authored Oct 30, 2024
1 parent f1bb7fd commit ea0282b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
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

0 comments on commit ea0282b

Please sign in to comment.