Testnet Release: Dash Payment Processor / WooCommerce

On behalf of the Evolution Backend team I'm pleased to announce the 'testnet' release of Dash Payment Processor. This system is meant to be operated by a merchant to allow for the usage of Dash as a payment option without third parties being involved.

The quickest way to get a feel for how this system works is to visit http://payment-processor-testing.slayer.work and place an "order". You'll notice that after the submit button is pressed a response will be provided back containing payment information. If the requested payment is sent you'll see a "Payment Callback" occur. It's also worth mentioning that this system fully supports InstantSend.

Included in this release is a WooCommerce Plugin. This plugin was created to act as a "Proof of Concept" for the system as a whole. It enables WooCommerce to use the Dash Payment Processor as it would any other payment method. Plugins and extensions for other e-commerce platforms can be developed in the same way; these libraries facilitate the checkout process and also allow for block confirmations to occur before the sale is finalized. A demonstration of this plugin is available at http://store.slayer.work.

Dash Payment Processor uses a BIP32 HD Wallet Seed or Electrum Wallet Seed as the basis for Payment Address generation. More information on this and other mechanics of the API is available in the Official Project Wiki.

(close terminal window and reopen for nvm to take effect - important!)

npm install -g bitcore-node-dash

bitcore-node-dash create mynode -d ~/.bitcore/data --testnet

cd mynode

bitcore-node-dash install insight-api-dash

bitcore-node-dash install dash-payment-processor

cd node_modules/dash-payment-processor/config

nano AppConfig.js // configure wallet seed and worldcoin api key

cp DBConfig-template.js DBConfig.js

nano DBConfig.js // add mysql database user/pass

cd ../resources

mysql -u<mysql username> -p < mysql-schema.sql

cd ../../../

bitcore-node-dash start

At this point, you should have a full Bitcore node up and running. This node will sync the entire Dash Blockchain and provide a local Insight API that the Payment Processor can use to detect and verify transactions. At this point we can proceed with installing the WooCommerce plugin.

@snogcel, are *working* testnet versions of either of these available so you can test a payment end to end? i.e.

1) have two electrum wallets (both pointed at testnet)
2) configure the payment processor to use a seed from one of the wallets
3) pay a sum from the one wallet to the other
4) payment processor detects payment and callback is invoked - the money is then viewable in the other electrum wallet

Thx

ps: i think the issue is.. i want to use electrum as a wallet but as its a lite client there are/was no running testnet server that could be used.

@snogcel, are *working* testnet versions of either of these available so you can test a payment end to end? i.e.

1) have two electrum wallets (both pointed at testnet)
2) configure the payment processor to use a seed from one of the wallets
3) pay a sum from the one wallet to the other
4) payment processor detects payment and callback is invoked - the money is then viewable in the other electrum wallet

Thx

ps: i think the issue is.. i want to use electrum as a wallet but as its a lite client there are/was no running testnet server that could be used.

Click to expand...

Hello Wal,

Thanks for mentioning this! You can grab a Testnet version of Electrum Dash here: https://dashpay.atlassian.net/build...fact/JOB1/electrum-dash.exe/electrum-dash.exe. It appears to be deriving the correct addresses however I'm not having any luck testing this right now due to network load testing (I can't send any transactions, anywhere, at all lol). I'm pretty confident this should provide you with what you're looking for though. If you encounter any troubles with it I'll have an alternative BIP32 wallet for testnet available as a chrome app towards the end of the month

Thanks for mentioning this! You can grab a Testnet version of Electrum Dash here: https://dashpay.atlassian.net/build...fact/JOB1/electrum-dash.exe/electrum-dash.exe. It appears to be deriving the correct addresses however I'm not having any luck testing this right now due to network load testing (I can't send any transactions, anywhere, at all lol). I'm pretty confident this should provide you with what you're looking for though. If you encounter any troubles with it I'll have an alternative BIP32 wallet for testnet available as a chrome app towards the end of the month

Click to expand...

that version of electrum looks like its not on testnet?everything is in dash (not tDash)

Attached Files:

@snogcel is it possible to get the payment processor to pay a dash-qt wallet? i'm thinking not but is there then a way to import the transactions into dash-qt after they have been received by the payment processor? (given the payment processor has the private keys)

that version of electrum looks like its not on testnet?everything is in dash (not tDash)

Click to expand...

Hey Wal,

Though the UI doesn't reference testnet I can confirm that it's generating addresses that align with the payment processor (see attached screenshot). You're right though that currently the Electrum Testnet server doesn't seem to be picking up transactions, @thelazier can you please confirm the URL of your testnet electrum server is electrum.dash.siampm.com ?

To answer your other question, this system uses BIP32 HD Public Keys to create a unique payment address for each order. Due to this fact (and due to the fact that Dash Core v0.12.1.x doesn't support BIP32 address generation) there's unfortunately not a good way to set this up to point to a Dash Core wallet address.

Attached Files:

> Due to this fact (and due to the fact that Dash Core v0.12.1.x doesn't support BIP32 address generation) there's unfortunately not a good way to set this up to point to a Dash Core wallet address.@snogcel thanks for confirming this. What do you suggest is the best way to view (say as a business owner) the transactions credited to the payment processor? The options I see at the moment are
1) use electrum client however this isnt working on testnet so for testing builds is a problem
2) use dash-qt.exe client however need a way to get private keys from payment processor and import into dash-qt ? (if yes is there any docs on how to do this?)

With the payment processor (or dash in general) is it possible to credit someone ? e.g. programatically pay someone in the case of say a store credit that needs to be refunded.

> Due to this fact (and due to the fact that Dash Core v0.12.1.x doesn't support BIP32 address generation) there's unfortunately not a good way to set this up to point to a Dash Core wallet address.@snogcel thanks for confirming this. What do you suggest is the best way to view (say as a business owner) the transactions credited to the payment processor? The options I see at the moment are
1) use electrum client however this isnt working on testnet so for testing builds is a problem
2) use dash-qt.exe client however need a way to get private keys from payment processor and import into dash-qt ? (if yes is there any docs on how to do this?)

With the payment processor (or dash in general) is it possible to credit someone ? e.g. programatically pay someone in the case of say a store credit that needs to be refunded.

Cheers again

Click to expand...

Hey Wal,

Thanks for looking at this angle of the processor. In my eyes there's a couple ways to accomplish the type of oversight you're speaking of - it's definitely an important requirement.

1. Develop a reporting system. Larger clients would probably prefer this type of system as it could be set up to connect to a pre-existing platform (or maybe even just dumped into CSV?). The drawback for this is the development effort required and also that clear requirements for this type of functionality is yet to be defined. I started building this out, considered removing it, but left it commented as a development resource: https://github.com/snogcel/dash-payment-processor/blob/master/lib/index.js#L173.

2. Send funds directly to Merchant and let them deal with it. This is the simpler way to go for sure and probably the most practical in the short-term. While developing this I was using a BIP32 public key from Copay-Dash (see https://copay.io/) if only to sanity-check payment receipt. Electrum-Dash is certainly an option as well however as you'd noticed right now we're not seeing the transactions go through (I think this is temporary - due to load testing the past week or so). A few minutes ago I finished up an preliminary build of Copay-Dash as a chrome app. Once testnet has settled down a little bit I plan to make this publicly accessible and I think it will solve this problem you're facing.

As for your other question: in it's current incarnation, no, the Payment Processor does not have the ability to create/sign transactions on behalf of the store owner and as a result wouldn't be able to initiate a refund. These types of functions will be possible with Dash Evolution, but we're not quite there yet

>the Payment Processor does not have the ability to create/sign transactions on behalf of the store owner and as a result wouldn't be able to initiate a refund

ok so the payment processor does not support this; are there any other libraries that support programmatically paying a given address? (not evolution)
if no, would it be trivial or non-trivial to implement this?
it seems there are existing companies that already support automated transactions (eg fortunejack-com which allows you to deposit/withdraw in dash) so i wonder how they are doing it?

>While developing this I was using a BIP32 public key from Copay-Dash.... if only to sanity-check payment receipt.
yep thats pretty much what i'm doing... just to verify what the payment processor is getting... so would love a copy of that chrome plugin

Here are some suggestions
1) server should provide a nicer error message if you forget to set the `Content-Type: application/json` header in HTTP. it took me a while to figure out this was the error
2) error if you try to boot up without a world api key
3) i find it a bit confusing how the config says insight listens on port 3001 but then there is another port setting, seemingly the application, that is port 9001. only 3001 is listening so could you clarify?

>the Payment Processor does not have the ability to create/sign transactions on behalf of the store owner and as a result wouldn't be able to initiate a refund

ok so the payment processor does not support this; are there any other libraries that support programmatically paying a given address? (not evolution)
if no, would it be trivial or non-trivial to implement this?
it seems there are existing companies that already support automated transactions (eg fortunejack-com which allows you to deposit/withdraw in dash) so i wonder how they are doing it?

>While developing this I was using a BIP32 public key from Copay-Dash.... if only to sanity-check payment receipt.
yep thats pretty much what i'm doing... just to verify what the payment processor is getting... so would love a copy of that chrome plugin

Click to expand...

I'd say it's somewhere between trivial and non-trivial, the mechanics are in place (see https://github.com/snogcel/dash-payment-processor/commits/feature/wallet) however this requires a fully released Copay-Dash wallet to really be worth pursuing. This type of configuration would create an "untrusted" signer of a multisig wallet (think along the lines of a Cashier at your local fast food joint -- they have access to funds but need manager approval to perform a refund). The idea here is that you could allow the server to create a "Refund" transaction, then have a 2-3 signing by the shop owner in order to approve the transaction (e.g. have them install a wallet on their desktop and on their mobile device then sign the transaction on both).

Here are some suggestions
1) server should provide a nicer error message if you forget to set the `Content-Type: application/json` header in HTTP. it took me a while to figure out this was the error
2) error if you try to boot up without a world api key
3) i find it a bit confusing how the config says insight listens on port 3001 but then there is another port setting, seemingly the application, that is port 9001. only 3001 is listening so could you clarify?

Also opened up an issue for #3 (https://github.com/snogcel/dash-payment-processor/issues/7), agreed that this could be a little confusing. This is from an earlier version of the app which was designed as a "standalone" type service which operated on port 9001. We can safely remove that, thanks for letting me know!