npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@defra-fish/payment-mop-up-job

v1.45.0

Published

Process incomplete web-sales

Downloads

1,707

Readme

payment-mop-up-job

Where a user does not complete the web-sales user journey after a successful payment this process will query the GOV.UK API for the status of those payments. If a payment has been completed the mop-up job will complete the payment automatically

node src/payment-mop-up-job.js [--age-minutes <number>] [--scan-duration-hours <number>]

The age is the time elapsed since the payment was created when the transaction becomes eligible for the mop up process. It defaults to 180 minutes.

The scan duration is the interval over which the transaction will be queried. For example if with a max age of 180 minutes and a scan duration of 24 hours then candidate transactions are those started between 27 and 24 hours ago. The scan duration should be larger than the periodicity of the job to provide continuous coverage of all transactions. Since the job will not process the same transaction twice.

Environment variables

| name | description | required | default | valid | | ------------------------------- | --------------------------------------------------------------- | :------: | ------------------- | ----------------------------- | | NODE_ENV | Node environment | no | | development, test, production | | SALES_API_URL | The address of the sales api | no | http://0.0.0.0:4000 | | | SALES_API_TIMEOUT_MS | The timeout in milliseconds requests to the api | no | 10000 | | | GOV_PAY_API_URL | The GOV.UK Pay API base url | no | Yes | | | GOV_PAY_APIKEY | GOV pay access identifier | no | Yes | | | GOV_PAY_REQUEST_TIMEOUT_MS | Timeout in milliseconds for API requests | no | Yes | | | RATE_LIMIT_MS | Rate limit for the process | no | 250 | | | CONCURRENCY | Concurrency for the process | no | 4 | | | SCAN_DURATION_HOURS | The number of hours over which the transactions will be scanned | no | 24 | | | INCOMPLETE_PURCHASE_AGE_MINUTES | The age of the incomplete purchase in minutes | no | 60 | | | AIRBRAKE_HOST | URL of airbrake host | no | | | | AIRBRAKE_PROJECT_KEY | Project key for airbrake logging | no | | |

The details of the GOV.UK payment API can be found here; https://docs.payments.service.gov.uk/#gov-uk-pay-technical-documentation