department-of-veterans-affairs / notification-api

Notification API
MIT License
16 stars 9 forks source link

Comp and Pen: Add US Currency Formatting for Payment Amount #1858

Closed mjones-oddball closed 3 months ago

mjones-oddball commented 4 months ago

User Story - Business Need

Currently we are not applying currency formatting to the payment amount in our SMS, so the dollar amount is displayed as an integer. Current SMS content looks like this: “VA Benefits: Your compensation/pension monthly payment of $4321 is being processed. Reply STOP to unsubscribe, HELP for link to access VA payment history.”

This format doesn’t look appealing. We’d like to improve user-friendliness by applying a usual format for US dollar amounts where a decimal point separates dollars and cents, while a comma separates thousands.

Proposed new format: “VA Benefits: Your compensation/pension monthly payment of $4,321.00 is being processed. Reply STOP to unsubscribe, HELP for link to access VA payment history.”

User Story(ies)

As a Veteran I want view the dollar amount of my recurring payment via text So that I can confirm my deposit is the amount I expect.

Additional Info and Resources

The location of this code change is in the send_comp_and_pen_sms method of the CompPenMsgHelper class. The payment_amount that comes in is a decimal that gets changed to a string. It should be formatted with f'{payment_amount:0,.2f}'

Acceptance Criteria

Given we are sending a valid recurring payment comp and pen text message and the payment amount is a personalisation within the template:

QA Considerations

mjones-oddball commented 4 months ago

Hey team! Please add your planning poker estimate with Zenhub @cris-oddball @k-macmillan @kalbfled @MackHalliday @mchlwellman @EvanParish

kalbfled commented 4 months ago

The necessary changes probably belong around here.

k-macmillan commented 3 months ago

Removed the AC regarding paymentAmount -> amount.

MackHalliday commented 3 months ago

Tested in PERF with @EvanParish Deployed to Perf, set test notifications to is_processed is False, wait for task to run, check on phone that commas appear. (thanks @EvanParish )

image

image

MackHalliday commented 3 months ago

Friday

Today

cris-oddball commented 3 months ago

PR approved and merged, sending up to Perf, then testing.

cris-oddball commented 3 months ago

I'm still stuck without AWS access. Asked Michael to go into the Perf DB and update the following participant IDs to set is_processed as F so that they will be picked up by the cron job at 11:00 AM MT. participant_id vaprofile_id 600043175 134281 600043214 1273674 600075670 1131138

will check api logs after that time.

cris-oddball commented 3 months ago

QA PASSED

3 notifications were generated based on modifications made to the DynamoDB table for the 3 items in the above comment. The notification IDs were then fetched using the GET route and the resulting body from those requests are posted below: