-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add agreement_id to existing GOV.UK Pay request (#2074)
https://eaflood.atlassian.net/browse/IWTF-4261 If the request to prepare a payment is part of setting up a new recurring payment agreement, then the agreement_id should be included. I also renamed prepareRecurringPayment() to prepareRecurringPaymentAgreement() as I think this is slightly more accurate - it is setting up the agreement rather than the payment - and it initially threw me off when working out what needed to be changed. * Store agreementId in DynamoDb * Fix agreementId validation in schema * Resolve linting issue * Add arg to payment connector for API key usage * Add recurring payment arg to govuk-pay-service Also added a lot more tests (cribbed from the sendRecurringPayment() ones) as the existing ones are testing through the payment processor for some reason. * Use recurring flag in agreed handler Because we need to check the recurring status at this level now, we can also remove the status check from the payment processor. * Update rest of pay connector to toggle headers * Add recurring flag to getPaymentStatus in service * Add recurring arg when checking payment status in agreed handler * Add optional() to schema * Use agreementId in payment processor logic * Fix mocking * Remove unnecessary default
- Loading branch information
1 parent
93ee935
commit bbee238
Showing
14 changed files
with
496 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.