HashPress Pay
HashPress Pay allows users to integrate Hedera transactions into their WordPress websites and WooCommerce shops.
Dependencies
- HashPress Core — Small but essential plugin for establishing wallet connections.
Recommended Plugins
- Advanced Custom Fields PRO — HashPress Pay adds an ACF Gutenberg block
- WooCommerce — HashPress Pay adds (optional) WooCommerce Payment Gateways.
Installation
- Download the plugin as a ZIP file from its repository.
- Go to
Pluginssection in WordPress - Click
Add New Plugin - Click
Upload Plugin - Upload the ZIP file
- Click
Activate
Configuration
No configuration needed, just make sure that you did the configuration for HashPress Core.
WooCommerce
If you want to use HashPress Pay inside WooCommerce shop, configure its settings by going to WooCommerce > Settings > Payments.
Shortcodes
[hashpress_pay]
Adds a transaction button for sending transactions on Hedera. It uses WalletConnect to establish a a secure connection with cryptocurrency wallets.
The button has a small badge in the top right corner when the active network is
testnetorpreviewnetto warn the user/developer that the code isn't running on the mainnet.
| Attribute | Description | Default value |
|---|---|---|
| title | Button text | Pay |
| amount | Amount to be send in currency (see details) | null |
| currency | Currency the amount is in (see details) | USD |
| memo | Message to send along with the transaction | null |
| wallet | Receiver Account ID - Required | null |
| accepts | ... | HBAR |
Currency
The following currencies are supported: USD EUR JPY GBP AUD CAD CNY INR BRL ZAR CHF RUB NZD MXN SGD
The currencies aren't case-sensitive.
Amount
Amounts are converted to HBAR using the CoinGecko API. Subsequently, the HBAR amount is converted to tinybar and rounded to an integer value. When no amount is provided an input-field appears in which the user can enter an amount.
1 HBAR = 100.000.000 tinybar.
Wallet
....
Account IDs on Hedera have to start with 0.0.
Example: [hashpress_pay amount="0.1" currency="eur" title="☕︎ Buy us a coffee" network="testnet" wallet="0.0.4915084" accepts="USDC"]
On the demo page you can find more examples.
Gutenberg Block
On websites with Gutenberg (WordPress version >= 5.0) and Advanced Custom Fields PRO you can use the HashPress Pay-Gutenberg block instead of the shortcode. The functionality and output are the same as the shortcode.