Skip to content

Commit

Permalink
Add in new payment method override if the activation date is in the p… (
Browse files Browse the repository at this point in the history
  • Loading branch information
seeker25 authored Jan 17, 2025
1 parent 19d12bf commit c425d43
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pay-api/src/pay_api/services/payment_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,8 +432,10 @@ def _get_payment_based_on_pad_activation(account: PaymentAccountModel, previous_
is_first_time_pad = not account.pad_activation_date
# default it. If ever was in PAD , no new activation date needed
if is_first_time_pad:
new_payment_method = PaymentMethod.PAD.value if previous_payment is None else previous_payment
new_activation_date = PaymentAccount._calculate_activation_date()
new_payment_method = PaymentMethod.PAD.value
if new_activation_date > datetime.now(new_activation_date.tzinfo) and previous_payment is not None:
new_payment_method = previous_payment
else:
# Handle repeated changing of pad to bcol ;then to pad again etc
new_activation_date = account.pad_activation_date # was already in pad ;no need to extend
Expand Down

0 comments on commit c425d43

Please sign in to comment.