Skip to content

API Integration

c-darwin edited this page Dec 13, 2015 · 2 revisions

There are 2 ways to setup payment processing. Select the one that’s more convenient for you.

Table of Contents

Personal Node

Main advantage of this option is that you will have full control over the entire process of payment processing.

  1. Install Dcoin on your server
  2. Go to “My Account” -> “Arbitration” -> “I’m a Seller”
  3. Select shop_callback_url, shop_secret_key
  4. If you did not upgrade your account to miner’s, enter your unencoded private key into my_keys table

Third Party Pool

This option is best for those, who cannot or doesn’t want to maintain a personal node.

  1. Select the pool
  2. Register at the pool
  3. If you don't want pool admin to have your private key and, therefore, access to all your funds, you shall upgrade your account. In this case, only the node-key will be stored at the pool, which is used to decode payment notes. If you don’t want to upgrade your account, simply send your private key to the pool admin.
  4. Go to "My Account" -> "Arbitration" -> "I’m a Seller"
  5. Select shop_callback_url, shop_secret_key

Callback Script Setup

Following data will be transferred to shop_callback_url by POST method:
amount – payment amount
currency - Currency. For example, USD
order_id - Order ID, specified by user at the time of transfer
message - Note to translation
user_id - Sender user_id sender
block_id - Block ID, in which the transaction with transfer was sealed
tx_id - Transaction ID
sign - hash sha256 from amount:currency:order_id:block_id:tx_id:shop_secret_key
Data will only be transferred after passing 5 blocks (value can be modified in cron/shop.php script). 5 blocks take about 10 minutes.

On Your Website

Buyer shall make a payment to your account number and specified order_id in the payment note, which provides for payment identification. For example, “#125-5369”. “#” symbol is mandatory.

Modules for Billing Panels

github

Clone this wiki locally