This project provides a payment integration solution for Ecwid stores using Monero as a payment method. It leverages the monero-java API for seamless integration, ensuring secure and private payments.
- Monero Payment Gateway: Integrate Monero as a payment method in your Ecwid store.
- Monero RPC API: Uses Monero's Node RPC API for transaction management.
- Easy Setup: Simplified integration process for Ecwid store owners.
- Secure Transactions: Monero ensures privacy and security for both merchants and customers.
- Real-Time Payment Status: Get immediate updates on payment status using the Node RPC API.
Before you begin, make sure you have the following installed:
- Java (v17 or later)
- Monero Node: A running instance of Monero node for managing transactions. You can found an already running instance at monero.fail
- Ecwid Store: An active Ecwid store with API access enabled
-
Clone the repository:
git clone https://github.com/everoddandeven/monero-ecwid.git cd monero-ecwid
-
Install dependencies
sudo apt update && sudo apt install build-essential cmake pkg-config libssl-dev libzmq3-dev libunbound-dev libsodium-dev libunwind8-dev liblzma-dev libreadline6-dev libexpat1-dev libpgm-dev qttools5-dev-tools libhidapi-dev libusb-1.0-0-dev libprotobuf-dev protobuf-compiler libudev-dev libboost-chrono-dev libboost-date-time-dev libboost-filesystem-dev libboost-locale-dev libboost-program-options-dev libboost-regex-dev libboost-serialization-dev libboost-system-dev libboost-thread-dev python3 ccache doxygen graphviz nettle-dev libevent-dev
-
Install MySQL Server dependency
sudo apt update && sudo apt install mysql-server
-
MySQL secure installation
sudo mysql_secure_installation
-
Edit mysqld configuration at
/etc/mysql/mysql.conf.d/mysqld.cnf
[mysqld] # Add this line log-bin-trust-function-creators = 1
-
Create MySQL User
sudo mysql -u root -p
CREATE USER 'monero_ecwid' IDENITIFIED BY 'devpassword'; GRANT ALL PRIVILEGES ON monero_ecwid.* TO 'monero_ecwid'@'localhost'; FLUSH PRIVILEGES;
-
Build server application
mvn clean package
-
Start server application
java -jar target/monero-ecwid-0.0.1-SNAPSHOT.jar
You must provide a valid configuration before running server
# moneroecwid.conf example
port=8080
db-host=localhost
db-port=3306
db-username=monero_ecwid
db-password=devpassword
required-confirmations=1
client-secret=Pe087Q6jr0CgwI96R2ZTuUMWfUAHQjMq
wallet-address=9xjCAvNQaYYDLc5UsxQPZtP8nNDUJnuhiacmMaE3zzTBetYcLusyCtD5kuQNNGo3TVCEUFKjd7yjeE3rCjPahy3RQGa39aJ
wallet-view-key=9ce15a203d7e31aa930e55e4bf18e65509fb73ba316528182b77b079bb997b0d
wallet-server-uri=http://node2.monerodevs.org:28089
wallet-password=supersecretpassword123
wallet-net-type=testnet
wallet-restore-height=2644330
mail-host=smtp.mailgun.org
mail-port=587
mail-username=
mail-password=
java -Dconfig-file=/path/to/moneroecwid.conf -jar monero-ecwid-0.0.1-SNAPSHOT.jar
- Apply for a Ecwid Paid Plan
- Create a new Custom App for your store
- Copy your Custom App
Client Secret
and paste it in your configuration fileclient-secret=custom_app_client_secret
- Write to Ecwid support and ask to change the
Payment URL
with your payment gatewayhttps://yourservername.com/v1/monero/ecwid
, custom app will be enabled within two days - Enjoy Monero Ecwid payments!
- Create Payment Request: The integration will handle creating a Monero payment request when a customer proceeds to checkout in your Ecwid store.
- Handle Payment: Once the payment is initiated, the integration will monitor the transaction and provide real-time updates to both the merchant and the customer.
- Payment Confirmation: Once the payment is confirmed, the order status in Ecwid will be updated, and the customer will be redirected to the confirmation page.
- Error Handling: If there are any issues with the payment (e.g., payment not received or canceled), appropriate error messages will be displayed to the customer.
- A customer creates a new cart in the store and then selects Monero as the payment method at checkout.
- The payment gateway server generates a new Monero invoice.
- The customer pays the invoice to complete the transaction.
- Once the transaction is confirmed, the Ecwid store's order status is updated to "PAID".
- The customer is redirected to a confirmation page.
- If the invoice is not paid within 15 minutes, it will expire and the order will be cancelled.
Please consider donating to support the development of this project.
87qmeEtvQvuELasb4ybjV4iE17KF14SKTPvhgzAwrD5k1vWZUTqsWM52pbyHy8Wb97jCkq4pm5hLKaw39pEnvUKPPf3GFJA