Skip to content
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

EPP-113 Gov pay integration #88

Open
wants to merge 58 commits into
base: master
Choose a base branch
from

Conversation

vivekkumar-ho
Copy link
Contributor

@vivekkumar-ho vivekkumar-ho commented Feb 27, 2025

What?

EPP-113 - GOV Pay Integration

This task involves implementing the payment flow for the for new, renew and replace flows. The payment flow involves generating a random ID, creating an HMAC, initiating the request payment request, retrieving payment details, and error handling.

Why?

For new, renew and replace journeys, users need to pay the required amount.

How?

Utils

  • generateRandomId - Generates the random id using crypto
  • generateHmac - Generates an HMAC using the random id and gov pay key
  • initiatePayment - Initiates a payment request to gov UK
  • getPaymentDetails - Retrieves payment details
  • generateRequestPayload - Generates a payment request payload based on the application type
  • getErrorTemplateBasePath - Determines and returns the base path for the error templates based on the application type

behaviours

  • initiate-payment-request.js - Handles the initiate of payment requests
  • get-payment-info.js - Handles the retrieval and validation of payment information

Testing?

  • Local testing. Branch testing has a dependency on the framework change around updating the sameSite cookie setting
  • Unit tests

Screenshots (optional)

card payments service gov uk_card_details_4t742u09mbc729irfhvcqjtltf

localhost_8080_new-and-renew_payment-cancelled

localhost_8080_new-and-renew_application-submitted__token=485f3cb03c755dcbd9c7d37ee2207d4bee692eb3c2e25f7b36217d695e8e556a

localhost_8080_new-and-renew_payment-problem (2)

localhost_8080_new-and-renew_payment-failed (1)

Anything Else? (optional)

Check list

  • I have reviewed my own pull request for linting issues (e.g. adding new lines)
  • I have written tests (if relevant)
  • I have created a JIRA number for my branch
  • I have created a JIRA number for my commit
  • I have followed the chris beams method for my commit https://cbea.ms/git-commit/
    here is an example commit
  • Ensure drone builds are green especially tests
  • I will squash the commits before merging

# Conflicts:
#	apps/epp-new/translations/src/en/pages.json
# Conflicts:
#	apps/epp-new/translations/src/en/pages.json
@vivekkumar-ho vivekkumar-ho self-assigned this Feb 27, 2025
@vivekkumar-ho vivekkumar-ho changed the title WIP: Epp 113 gov pay integration EPP-113 gov pay integration Feb 28, 2025
@vivekkumar-ho vivekkumar-ho changed the title EPP-113 gov pay integration EPP-113 Gov pay integration Feb 28, 2025
Copy link

@william-gu-hof william-gu-hof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good, I've not paid too much attention to the templates, css and tests. Just had a couple of small questions, and the concern we spoke on the phone where the payment pages have a 90 mins session, and our pages have a 30 mins session, so there is a possibility that the user could have completed the payment, but the form is not submitted

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.

2 participants