Skip to content

Commit

Permalink
Payment URL
Browse files Browse the repository at this point in the history
  • Loading branch information
Jocelyn Cabildo authored and Jocelyn Cabildo committed Jan 9, 2025
1 parent a46b5b5 commit db5e62d
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ def send_email(self,requestid, ministryrequestid, applicantcorrespondencelog):
else:
if "emails" in applicantcorrespondencelog and len(applicantcorrespondencelog["emails"]) > 0:
template = applicantcorrespondenceservice().gettemplatebyid(applicantcorrespondencelog["templateid"])
_attributes = applicantcorrespondencelog["attributes"][0] if "attributes" in applicantcorrespondencelog else None
_paymentexpirydate = _attributes["paymentExpiryDate"] if _attributes is not None and "paymentExpiryDate" in _attributes else None
if _paymentexpirydate not in (None, ""):
paymentservice().createpayment(requestid, ministryrequestid, _attributes, AuthHelper.getuserid())
return communicationemailservice().send(template, applicantcorrespondencelog)
return result

Expand All @@ -41,6 +45,7 @@ def send_email(self,requestid, ministryrequestid, applicantcorrespondencelog):
def __handle_fee_email(self,requestid, ministryrequestid, applicantcorrespondencelog):
if cfrfeeservice().getactivepayment(requestid, ministryrequestid) != None:
requestservice().postfeeeventtoworkflow(requestid, ministryrequestid, "CANCELLED")
print('__handle_fee_email')
_attributes = applicantcorrespondencelog["attributes"][0] if "attributes" in applicantcorrespondencelog else None
_paymentexpirydate = _attributes["paymentExpiryDate"] if _attributes is not None and "paymentExpiryDate" in _attributes else None
if _paymentexpirydate not in (None, ""):
Expand Down

0 comments on commit db5e62d

Please sign in to comment.