Bitcoin (JSON-RPC) Manual for Magento Commerce
This Bitcoin extension for Magento Commerce 2.x communicates over JSON-RPC. The extension can be used for blockchain.info wallets or any other bitcoind servers.
The extension requires Magento cron to be called once every 5 minutes. Read more on How to setup a cron job for Magento. The cron task will read the blockchain data and determine the payment status i.e. the number of configurations.
No confirmations means not paid. 0-5 confirmations means payment pending. 6 confirmations means paid / processing order. Do not ship orders with less than 6 confirmations.
Magento Commerce Configuration using Blockchain.info
If you wish to use a Blockchain.info wallet, follow the correct configuration settings: https://blockchain.info/api/json_rpc_api In the Magento payment method configuration, System > Configuration > Payment Methods > Appmerce Bitcoin, the following settings apply:
- JSON-RPC SSL: set to enabled, it is required to use https:// on your website
- JSON-RPC Username: set it to your wallet identifier
- JSON-RPC Password: set it to your main wallet password.
- JSON-RPC Hostname: enter rpc.blockchain.info
- JSON-RPC Port: enter 443 for blockchain.info
- Bitcoin Wallet Passphrase: If double encryption is enabled your second password will need to be set as well. This passphrase will be stored in Magento's MySQL database using mcrypt AES 256 encryption. Never keep large amounts of Bitcoin on your wallet. Best practice is to remove funds to a cold storage daily.
In some cases Blockchain.info will output compressed addresses differernt from your wallet. Login to your Blockchain.info wallet, then go to Account Settings > Debugging > Check Compressed > Run to retrieve your funds. If the problem persists, please contact blockchain.info support.
Help Configuring Bitcoind
Magento Commerce Configuration using a custom Bitcoind server
You can configure your own bitcoind server with JSON-RPC. Then go to System > Configuration > Payment Methods > Appmerce Bitcoin to configure the settings.
- JSON-RPC SSL: set to enabled is preferred
- JSON-RPC Username: enter the username you configured for your JSON-RPC bitcoind installation
- JSON-RPC Password: enter the corresponding password configured for your JSON-RPC installation
- JSON-RPC Hostname: enter your hostname / server name, or 127.0.0.1 for localhost
- JSON-RPC Port: this is usually 8332 for localhost bitcoind installations
- Bitcoin Wallet Passphrase: This is needed for keypoolrefill to generate new addresses every batch of 100. This passphrase will be stored in Magento's MySQL database using mcrypt AES 256 encryption. Never keep large amounts of Bitcoin on your wallet. Best practice is to remove funds to a cold storage daily.