ultra-simple-dash-merchant (PHP)

jimbursch

Active Member
Mar 5, 2017
837
501
133
56

jimbursch

Active Member
Mar 5, 2017
837
501
133
56
Because I hate javascript I will be stripping out all the javascript, and because I don't think anyone else will be using this (this is really just an exercise for me) I will be taking out the language localization.

I will replace the Mt. Gox API with a combination of the official Dash Explorer API (https://explorer.dash.org) and the CoinMarketCap API for price ticker (https://coinmarketcap.com/api/).
 
  • Like
Reactions: Vedran Yoweri

jimbursch

Active Member
Mar 5, 2017
837
501
133
56
Now I've decided to shitcan ultra-simple-bitcoin-merchant altogether and do a very-simple-dash-invoicing system instead. Should take me about a week to have a working prototype.
 

jimbursch

Active Member
Mar 5, 2017
837
501
133
56
Here's a description of how it will work:

To create a very simple Dash invoice:

- mannually enter a Dash address that has never received funds
- optionally enter:
-- issuer(merchant) name
-- customer name/id
-- invoice id (from issuer's accounting system)
-- product name/id
-- amount

When submitted, a url is generated that passes all variables to invoice page (get), including a hash of the invoice to check authenticity.

When a customer views the invoice, the invoice hash is checked for authenticity and the Dash address is queried for received funds. The Dash address is displayed with a QR code and instructions for payment, along with the optional invoice data.

If the Dash address has received funds equal to or greater than the amount of the invoice, the invoice is marked paid.

To check the status of payment, simply reload the invoice page.
 

GrandMasterDash

Grizzled Member
Masternode Owner/Operator
Jul 12, 2015
2,772
1,009
1,183
"Amount" should probably say ""Amount (DASH)".

Also, if it were me, I would also prefix the QR string with "dash:" because, in theory, that should trigger a wallet action, in the same way "bitcoin:1xxxxx" triggers a bitcoin wallet.
 

jimbursch

Active Member
Mar 5, 2017
837
501
133
56

jimbursch

Active Member
Mar 5, 2017
837
501
133
56
No -- this is a simple invoicing app. There is no interaction with a wallet. It enables you to create an invoice tied to a Dash address and monitors that address for payment received.
 

GrandMasterDash

Grizzled Member
Masternode Owner/Operator
Jul 12, 2015
2,772
1,009
1,183
If someone used Instant Send, your app would still have to wait for a confirmation, right?
 

jimbursch

Active Member
Mar 5, 2017
837
501
133
56
If someone used Instant Send, your app would still have to wait for a confirmation, right?
That's a good question and I'm not sure about the answer. The app queries 'getreceivedbyaddress', which I would assume requires at least 1 confirmation, but I could be wrong.
 

GrandMasterDash

Grizzled Member
Masternode Owner/Operator
Jul 12, 2015
2,772
1,009
1,183
That's a good question and I'm not sure about the answer. The app queries 'getreceivedbyaddress', which I would assume requires at least 1 confirmation, but I could be wrong.
Yeah, I suspect you have to wait for a confirmation. I just took a quick glance at the code and can see you're using CryptoID.info. Might of been different if it was talking directly to a node.