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

@ekingdom/drakemall-payment-gateway

v0.82.0

Published

Payment Providers for drakemall

Downloads

201

Readme

Drakemall Payment Gateway

Quickstart

 $ npm install
 $ cp .env.example .env
 $ npm run dev

Rough architecture

Describe how payment provider works with external payment system

Image of Yaktocat

Description

The idea behind this service is to work with payment providers and their logic seperetly from drakemall. Currently it works as npm package.

How to work

  1. After your branch was merged make bump the version of package using npm version.
  2. Create a commit like Bump version to v1.1.1
  3. Publish your changes - npm publish

Coinpayments Configuration

  1. Provide COINPAYMENTS_URL env variable to our config service - currently it's at drakemall.
  2. Login to Coinpayments.
  3. Provide IPN URL (it's an URL for postbacks, e.g. https://drakemall.com/api/payment/coinpayments/postback) here in the 4 tab.
  4. Done.

Accent Pay Configuration

  1. Provide ACCENT_PAY_URL env variable to our config service - currently it's at drakemall.
  2. For test purposes you can use the following
$ export ACCENT_PAY_URL=https://accentpay.com?currency=USD&site_id=418&salt=1d69b4066130fc6a9193e2ec7749788218b9c492a4008bc73aa1cfbed3f3df95b6dffe42c951fa921499aebd6255c471a7a2863b3a1c6b66d621d93ef9e2c543
  1. For local/dev environments configure webhooks via my.webhookrelay.com
  2. If you want to launch on local machine use:
$ relay forward --bucket accent-pay-local # (you also must have relay CLI installed to do so, https://webhookrelay.com/v1/guide/installation.html#Install-CLI)
  1. To test different responses you must use the following cards:
    • 4314220000000056 success
    • 5413330000000019 success
    • 4314220000000072 decline
    • 5413330000000035 decline
    • 4314220000000098 decline
    • 5413330000000092 decline
  2. All the other credentials can be filled randomly
  3. In order to change webhooks - contact accent pay support ([email protected]), current webhooks:
    • production: POST https://drakemall.com/api/payment/accent_pay/postback
    • test: POST https://my.webhookrelay.com/v1/webhooks/5aadb029-550f-4c54-acd2-cd9c943bb817
  4. Done.

Voucherify Configuration

  1. For local/dev environment configure webhooks via my.webhookrelay.com WebHook endpoint should point to http://localhost:3031/api/payment/voucherify/webhook

    Contact to Maintainers to get access to webhookrelay.com account

  2. Setup WebHook endpoint on Voucherify Admin Dashboard, select events and click to redemption succeeded in order to receive http requests

  3. Start relay cli to begin to receive webhooks for development purposes

$ relay forward --bucket voucherify-pay-local # (you also must have relay CLI installed to do so, https://webhookrelay.com/v1/guide/installation.html#Install-CLI)
  1. Copy WebHook secret from Admin Dashboard and set VOUCHERIFY_WEBHOOK_SECRET env variable directly or put to .env

  2. In production environment, please use production credentials and setup webhook endpoint to production site, and disable all others endoints. Please dont use the same Voucherify.io account for development and in production environment at the same time!!!

  3. Done

Card Pay v3.0

Integration Manual

  1. Provide CARDPAY_V3_URL env variable to our config service - currently it's at drakemall.
  2. For test purposes you can use the following
$ CARDPAY_V3_URL=https://sandbox.cardpay.com/api?currency=USD&walletId=14265&callbackSecret=m5SgFW903nbQ&merchantSecret=sO5QSDpr1x80&maxUserCardsCount=2&orderDescription=Drakemall.com cases open purchase
  1. For local/dev environments configure webhooks via my.webhookrelay.com
  2. If you want to launch on local machine use:
$ relay forward --bucket cardpay-local # (you also must have relay CLI installed to do so, https://webhookrelay.com/v1/guide/installation.html#Install-CLI)
  1. To test different responses you must use the following cards:
    • 4000000000000002: CONFIRMED as 3-D Secure transaction
    • 5555555555554444: DECLINED as 3-D Secure transaction
    • 4000000000000044: PENDING as 3-D Secure transaction
    • 4000000000000077: CONFIRMED as non 3-D Secure transaction
    • 5555555555554477: DECLINED as non 3-D Secure transaction
    • 4000000000000051: PENDING as non 3-D Secure transaction
  2. All the other credentials can be filled randomly
  3. In order to change webhooks - contact card pay support
  4. Done.

Maintainers