The `classy-pay-client` package provides a simple CommonJS-based client for interacting with the Classy Pay API. Its current and only stable version is 1.1.4, last published over seven years ago, indicating it is no longer actively maintained. The library utilizes a factory pattern for initialization, requiring an API URL, timeout, authentication token, and secret. It exposes methods for standard HTTP operations like GET, POST, PUT, and DELETE through callback-based functions, lacking modern features such as Promises or ESM support. This package is specifically designed for integration with the Classy Pay service and is likely used in legacy Node.js environments.
npm install classy-pay-clientVerified import paths — ran on the pinned version, not inferred.
Demonstrates initializing the PayClient and making a GET request to fetch a transaction, followed by a POST request to create a new transaction, using callback patterns.
Access the `del` method using bracket notation: `PayClient['del'](appId, resource, callback)` to avoid potential keyword conflicts.
For ESM projects, consider a wrapper function that returns a Promise or migrate to a more modern API client. For CJS projects, ensure all usage adheres to the callback pattern.
Before using in production, thoroughly audit the package's dependencies for known vulnerabilities. Consider if an alternative or a direct API integration is more appropriate for long-term maintenance and security.
Always use `process.env.YOUR_VARIABLE` for sensitive information and API URLs, providing fallback defaults for development environments.
Call the factory function: `const PayClient = require('classy-pay-client')({ apiUrl: '...', token: '...', secret: '...' });`Ensure the configuration object passed to `require('classy-pay-client')` includes `apiUrl`, `token`, and `secret`.Replace `import PayClient from 'classy-pay-client';` with `const PayClient = require('classy-pay-client')({ ... });`No dependency data recorded yet.