Skip to content

[Bexley] GGW amend DD amount #5472

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

Draft
wants to merge 2 commits into
base: bexley-ww-ggw-amend
Choose a base branch
from

Conversation

chrismytton
Copy link
Member

@chrismytton chrismytton commented Apr 20, 2025

Adds code for taking a one-off payment to cover any in-year difference in cost, as well as code for changing the amount of the original contract for future payments.

For https://github.com/mysociety/societyworks/issues/4796

Part of #5374

Notes/Todo

The live API doesn't have the "No Frequency - AD-HOC Payments" schedule, it's only in test, which you can see with the following calls:

$ curl -L -g -X GET 'https://playpen.accesspaysuite.com/api/v3/client/APIRTM/schedules' -H "apiKey: $APS_TEST_API_KEY"
$ curl -L -g -X GET 'https://ddcms.accesspaysuite.com/api/v3/client/LBBEX/schedules' -H "apiKey: $APS_LIVE_API_KEY"

You can also get the schedule ID you need for the dd_adhoc_schedule_id config setting from that playpen call.

  • Fix tests (there seems to be an issue with the DD discount not being applied currently)
  • Test things are working with an existing contract in the APS test API
  • Add error checking after creating the adhoc contract in one_off_payment

This calls AccessPaySuite when a plan is changed and updates the Direct
Debit amount.
Copy link

codecov bot commented Apr 20, 2025

Codecov Report

Attention: Patch coverage is 3.22581% with 30 lines in your changes missing coverage. Please review.

Project coverage is 68.31%. Comparing base (a292a13) to head (4ffc4a6).

Files with missing lines Patch % Lines
perllib/Integrations/AccessPaySuite.pm 3.22% 30 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (a292a13) and HEAD (4ffc4a6). Click for more details.

HEAD has 2 uploads less than BASE
Flag BASE (a292a13) HEAD (4ffc4a6)
10 8
Additional details and impacted files
@@                   Coverage Diff                    @@
##           bexley-ww-ggw-amend    #5472       +/-   ##
========================================================
- Coverage                82.80%   68.31%   -14.50%     
========================================================
  Files                      428      424        -4     
  Lines                    34990    33530     -1460     
  Branches                  5862     5408      -454     
========================================================
- Hits                     28973    22905     -6068     
- Misses                    4377     8975     +4598     
- Partials                  1640     1650       +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This adds the code to take a one-off (ad-hoc) payment via Direct Debit,
as well as changing the amount on the original contract for future
payments.
@mysociety-pusher mysociety-pusher force-pushed the bexley-ggw-amend-dd-amount branch from 57275d2 to 4ffc4a6 Compare April 20, 2025 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant