Drakemall Payment Gateway
Quickstart
$ npm install
$ cp .env.example .env
$ npm run dev
Rough architecture
Describe how payment provider works with external payment system
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
- After your branch was merged make bump the version of package using
npm version
. - Create a commit like
Bump version to v1.1.1
- Publish your changes -
npm publish
Coinpayments Configuration
- Provide
COINPAYMENTS_URL
env variable to our config service - currently it's at drakemall. - Login to Coinpayments.
- Provide IPN URL (it's an URL for postbacks, e.g. https://drakemall.com/api/payment/coinpayments/postback) here in the 4 tab.
- Done.
Accent Pay Configuration
- Provide
ACCENT_PAY_URL
env variable to our config service - currently it's at drakemall. - For test purposes you can use the following
$ export ACCENT_PAY_URL=https://accentpay.com?currency=USD&site_id=418&salt=1d69b4066130fc6a9193e2ec7749788218b9c492a4008bc73aa1cfbed3f3df95b6dffe42c951fa921499aebd6255c471a7a2863b3a1c6b66d621d93ef9e2c543
- For local/dev environments configure webhooks via my.webhookrelay.com
- If you want to launch on local machine use:
$ relay forward --bucket accent-pay-local
- To test different responses you must use the following cards:
- 4314220000000056 success
- 5413330000000019 success
- 4314220000000072 decline
- 5413330000000035 decline
- 4314220000000098 decline
- 5413330000000092 decline
- All the other credentials can be filled randomly
- In order to change webhooks - contact accent pay support (support@ecommpay.com), current webhooks:
- Done.
Voucherify Configuration
-
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
-
Setup WebHook endpoint on Voucherify Admin Dashboard, select events and click to redemption succeeded
in order to receive http requests
-
Start relay
cli to begin to receive webhooks for development purposes
$ relay forward --bucket voucherify-pay-local
-
Copy WebHook secret from Admin Dashboard and set VOUCHERIFY_WEBHOOK_SECRET
env variable directly or put to .env
-
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!!!
-
Done
Card Pay v3.0
Integration Manual
- Provide
CARDPAY_V3_URL
env variable to our config service - currently it's at drakemall. - 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
- For local/dev environments configure webhooks via my.webhookrelay.com
- If you want to launch on local machine use:
$ relay forward --bucket cardpay-local
- 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
- All the other credentials can be filled randomly
- In order to change webhooks - contact card pay support
- Done.
Maintainers