-
Notifications
You must be signed in to change notification settings - Fork 8
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
PP 11288 improve validation on prefilled and non-prefilled payment links #2632
PP 11288 improve validation on prefilled and non-prefilled payment links #2632
Conversation
- Initial code change is for validation of zero amount value supplied via prefilled and non-prefilled payment links.
- creating new error message labels and updating code references, for both prefilled and non-prefilled payment journeys
- package-lock.json update
- Updated the session data handling logic which determined a prefilled journey and used the paymentLinkSession attribute - Added test for the amount page for non-prefilled payment link scenario. - Added test for the confirmation page prefilled payment link scenario.
- Added Cypress Tests
- Added updated zero amount check
- interim welsh translation and linting
@@ -18,7 +18,8 @@ | |||
"title": "Digwyddodd gwall:", | |||
"default": "Mae’n ddrwg gennym, ond ni allwn brosesu eich cais. Rhowch gynnig arall arni wedyn.", | |||
"internal": "Mae problem gyda’r cyfleuster taliadau. Rhowch gynnig arall arni wedyn", | |||
"contactService": "Mae problem gyda’r cyfleuster taliadau. Rhowch gynnig arall arni wedyn" | |||
"contactService": "Mae problem gyda’r cyfleuster taliadau. Rhowch gynnig arall arni wedyn", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should wait until we have the official translations.
@@ -55,6 +55,29 @@ describe('Payment link visited with amount and reference provided as query param | |||
}) | |||
}) | |||
}) | |||
|
|||
it('should show error page when confirmation page has a £0 amount and the "Continue to payment" button is clicked', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to check this with John's story.
I don't think you can get to this page when there is a 0 amount.
Throws an exception and the user will see an error page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed over slack, will wait for UCD feedback etc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
Before merging:
- We need the Welsh translations.
- Also, you should not be able to go to the confirm page with a 0 amount payment. So not sure if that test is valid.
@olatomgds - Can you please squash the commits |
- initial commit for bypassing confirmation page
This PR has been superceded by #2636, hence will be closed. |
For prefilled payment links, the service can set a reference and also an amount for payment links when sending the link to users.
The change involves the following:
When the user has to enter the amount manually for a non-prefilled payment link user journey, an appropriate error page with the agreed error message is displayed, if the amount is £0
Validate the amount on the confirm page and display an appropriate error page with the agreed error message, if the amount is £0
Some further changes is required in the pay-products API, but this is done as a separate PR against the pay-products repository