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

ya2checkout

v0.0.2

Published

Wrapper for 2checkout REST API v6

Downloads

16

Readme

Info

NodeJs adapter for 2Checkout REST API v6.

Disclaimer

⚠Right now, with "amazing 2checkout" documentation i can't to fully describe types of models.

TODOs

Services:

  • [ ] ProductsService
    • [x] getProducts
    • [ ] getProductByCode
    • [x] createProduct
    • [x] deleteProduct (disable product/subscription)
    • [ ] enableProduct (enable product/subscription)
    • [ ] updateProduct
  • [ ] OrdersService
    • [x] getOrders
    • [x] createOrder
  • [ ] InvoicesService
  • [ ] CustomersService
  • [ ] PayoutsService
  • [ ] SubscriptionsService

Utils:

  • [x] Api
  • [x] HashCreator
  • [x] ConvertPlusUrlGenerator
    • [x] test for simple dynamic product
    • [ ] write test function for 2checkout page(for ensure that generated link is correct)
    • [ ] test for simple catalog product
    • [ ] test generating link with redirect url
    • [ ] required parameters checking

How to test?

2Checkout do not have a test environment for REST API v6, for running tests you must to create .env file and define in it variables:

  • MERCHANT_ID - Your merchant id

  • SECRET_KEY - Your secret key

  • BUY_LINK_SECRET_WORD - Your Buy Link secret word, that you can to get in your merchant panel

  • BUY_LINK_EXPECTED_DYNAMIC_LINK - Getting of this string is harder. For getting, you must to generate Buy link on this page with parameters:

    • Products type: dynamic
    • Currency: USD
    • Product type: Physical/Tangible
    • Product name: Name
    • Product quantity: 1
    • Product price: 10
    • Order tamplate: default

    After filling form you will get link like this:https://secure.2checkout.com/checkout/buy?merchant=250283563061&dynamic=1&currency=USD&tpl=default&prod=Name&tangible=1&price=10&type=product&qty=1&signature=89e285b1902d66eda5292ec0ea0b6f191109e1e0ea696108df13a21ba691166f.

📄My advice: create new account for running tests.

# .env file
MERCHANT_ID='xxxxxxxxxxxx'
SECRET_KEY='xxxxxxxxxxxxxxxxxxxx'
# Testing of ConvertPlus url generator
BUY_LINK_SECRET_WORD='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
BUY_LINK_EXPECTED_DYNAMIC_LINK="https://secure.2checkout.com/checkout/buy?merchant=250283563061&dynamic=1&currency=USD&tpl=default&prod=Name&tangible=1&price=10&type=product&qty=1&signature=89e285b1902d66eda5292ec0ea0b6f191109e1e0ea696108df13a21ba691166f"