@ekingdom/drakemall-payment-gateway

0.82.0 • Public • Published

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 (support@ecommpay.com), current webhooks:
  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

Readme

Keywords

none

Package Sidebar

Install

npm i @ekingdom/drakemall-payment-gateway

Weekly Downloads

0

Version

0.82.0

License

UNLICENSED

Unpacked Size

424 kB

Total Files

148

Last publish

Collaborators

  • ektech
  • ipirius
  • deniskublitskiy
  • ihor_opansenko
  • drakemall