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

@deep-foundation/payments-tinkoff-c2b-test

v0.7.7

Published

Test [`@deep-foundation/payments-tinkoff-c2b`](https://www.npmjs.com/package/@deep-foundation/payments-tinkoff-c2b) package

Downloads

40

Readme

Goal

Test @deep-foundation/payments-tinkoff-c2b package

How to use?

Minimal example

import {doTest} from '@deep-foundation/payments-tinkoff-c2b-test'

await doTest({
   deep,
   port,
   route,
   sum,
   terminalKey,
   terminalPassword,
   containerLinkId,
   lookingForHandlerResultAttemptsCount,
   lookingForHandlerResultDelayInMs
})

Full example

import {doTest} from '@deep-foundation/payments-tinkoff-c2b-test'
import { DeepClient } from "@deep-foundation/deeplinks/imports/client.js";
import { generateApolloClient } from "@deep-foundation/hasura/client";

main();

async function main() {

   const graphQlPath: string = ;
   const ssl: boolean = ;
   const apolloClient = generateApolloClient({
     path: graphQlPath,
     ssl: ssl,
   });
   const unloginedDeep = new DeepClient({ apolloClient });
   const guest = await unloginedDeep.guest();
   const guestDeep = new DeepClient({ deep: unloginedDeep, ...guest });
   const admin = await guestDeep.login({
     linkId: await guestDeep.id('deep', 'admin'),
   });
   const deep = new DeepClient({ deep: guestDeep, ...admin });

   const port: number = ;
   const route: string;
   const sum: number = ;
   const terminalKey: string = ;
   const terminalPassword: string = ;
   const containerLinkId: number = ;
   const lookingForHandlerResultAttemptsCount: number|undefined = ;
   const lookingForHandlerResultDelayInMs: number|undefined = ;

   await doTest({
      deep,
      port,
      route,
      sum,
      terminalKey,
      terminalPassword,
      containerLinkId,
      lookingForHandlerResultAttemptsCount,
      lookingForHandlerResultDelayInMs
   })
}

Full and ready to use (almost) example

import {doTest} from '@deep-foundation/payments-tinkoff-c2b-test'
import { DeepClient } from "@deep-foundation/deeplinks/imports/client.js";
import { generateApolloClient } from "@deep-foundation/hasura/client";

main();

async function main() {

   const graphQlPath: string = ;
   const ssl: boolean = true;
   const apolloClient = generateApolloClient({
     path: graphQlPath,
     ssl: ssl,
   });
   const unloginedDeep = new DeepClient({ apolloClient });
   const guest = await unloginedDeep.guest();
   const guestDeep = new DeepClient({ deep: unloginedDeep, ...guest });
   const admin = await guestDeep.login({
     linkId: await guestDeep.id('deep', 'admin'),
   });
   const deep = new DeepClient({ deep: guestDeep, ...admin });

   const port: number = 5237;
   const route: string = '/payments/tinkoff/c2b';
   const sum: number = 5500;
   const terminalKey: string = ;
   const terminalPassword: string = ;
   const containerLinkId: number = deep.linkId;
   const lookingForHandlerResultAttemptsCount: number|undefined = 10;
   const lookingForHandlerResultDelayInMs: number|undefined = 1000;

   await doTest({
      deep,
      port,
      route,
      sum,
      terminalKey,
      terminalPassword,
      containerLinkId,
      lookingForHandlerResultAttemptsCount,
      lookingForHandlerResultDelayInMs
   })
}

Bash script to make your life easier

Set GRAPHQL_PATH before using this script

mkdir payments-tinkoff-test-integration-user && 
cd payments-tinkoff-test-integration-user &&
npm init -y &&
npm install @deep-foundation/payments-tinkoff-test-integration &&
npm install --save-dev ts-node typescript @types/node &&
mkdir src &&
if [[ -z $GRAPHQL_PATH ]]; then
  echo "GRAPHQL_PATH is not set or is empty"
fi
cat << EOF >> src/main.ts
import {doTest} from '@deep-foundation/payments-tinkoff-c2b-test'
import { DeepClient } from "@deep-foundation/deeplinks/imports/client.js";
import { generateApolloClient } from "@deep-foundation/hasura/client";

main();

async function main() {

   const graphQlPath: string = "$GRAPHQL_PATH";
   const ssl: boolean = true;
   const apolloClient = generateApolloClient({
     path: graphQlPath,
     ssl: ssl,
   });
   const unloginedDeep = new DeepClient({ apolloClient });
   const guest = await unloginedDeep.guest();
   const guestDeep = new DeepClient({ deep: unloginedDeep, ...guest });
   const admin = await guestDeep.login({
     linkId: await guestDeep.id('deep', 'admin'),
   });
   const deep = new DeepClient({ deep: guestDeep, ...admin });

   const port: number = 5237;
   const route: string = '/payments/tinkoff/c2b';
   const sum: number = 5500;
   const terminalKey: string = ;
   const terminalPassword: string = ;
   const containerLinkId: number = deep.linkId;
   const lookingForHandlerResultAttemptsCount: number|undefined = 10;
   const lookingForHandlerResultDelayInMs: number|undefined = 1000;

   await doTest({
      deep,
      port,
      route,
      sum,
      terminalKey,
      terminalPassword,
      containerLinkId,
      lookingForHandlerResultAttemptsCount,
      lookingForHandlerResultDelayInMs
   })
}
EOF &&
npx ts-node src/main.ts