Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

woocommerce/woocommerce-stellar

Repository files navigation

IMPORTANT: This code is made available in the hope that it will be useful, but without any warranty. See the GNU General Public License for more details. Automattic or WooCommerce support services are also not available to assist with the use of this code.

WooCommerce Stellar Gateway

Stellar is a protocol for sending and receiving money in any pair of currencies.

With the WooCommerce Stellar extension, you can accept payment for orders in your WooCommerce store using the Stellar protocol (and currency).

Stellar WooCommerce Video

After installing the extension, you will be able to sell in any currency which your Stellar account can accept.

You can add new currencies to your account using the official Stellar Account Viewer.

The Stellar protocol also has a built in currency, named Lumens, with the currency code XLM. The WooCommerce Stellar extension adds XLM as an option for your store's currency.

To sell items in XLM:

  1. Go to: WooCommerce > Settings > General administration screen
  2. In the Currency field, search for Stellar
  3. Select Stellar (XLM)
  4. Save the settings

But you don't have to sell in Stellar to use Stellar, you can (theoretically) sell in any currency, that's what's so stellar about Stellar!

Demo Store

Want to try it out?

Purchase a Stellar collector item from the Prospress Stellar Store.

The proceeds of every sale are donated to the Stellar foundation.

Installation

  1. Upload the plugin's files to the /wp-content/plugins/ directory of your WordPress site
  2. Activate the plugin through the Plugins menu in WordPress
  3. Visit the WooCommerce > Settings > Checkout > Stellar administration screen
  4. Select Enable Stellar.
  5. Enter your Stellar Address
  6. Save your settings

You're ready to start selling via Stellar!

Optional: set your store's currency to Stellar (XLM).

FAQs

Why is my Stellar account showing as invalid?

Your Stellar account may display as invalid if:

  1. you have entered an incorrect Stellar address
  2. your account has a balance of 0 Stellar - to avoid spam accounts, accounts must have a minimum of 20 Stellar

Why isn't Stellar displaying as a payment method?

When you enter you account address, the extension will check your account to see which currencies it accepts.

If your store's currency is not in the set of currencies your Stellar account accepts, then the extension will not display Stellar as a payment method on checkout.

To have it display, you can either:

  1. change your store's currency to Stellar (XLM)
  2. add the store's currency to your Stellar account

What currencies can I accept via Stellar?

Stellar will attempt to find a path between the currency/currencies your customer holds a balance in, and the currency you are selling in.

In theory, this means Stellar can be used to sell in any currency.

In practice, your customers may only be able to pay in currencies in which they already hold a balance. Because the Stellar network is still young, the available paths between currencies are limited. You may have trouble selling in less popular currencies, like AUD or NZD, to customers who do not hold a balance in this currency. Rest assured, things are moving fast and it won't be too long before your customers in Hanoi can pay in Dong (VND), while you'll receive it in the mighty greenback (USD).

How can I add new currencies to my Stellar account?

  1. Login to your Stellar Dashboard
  2. Click the add a currency link (displayed under your balance)
  3. Enter the full URL of a Stellar gateway which supports multiple currencies (list of gateways)
  4. Add the gateway to your account

Refer to the Stellar docs article for more information on adding currencies to your account.

Stellar Add Currency screenshot

How can I sell with Stellar from multiple WooCommerce Stores?

To sell from multiple WooCommerce stores, you will need to create a new Stellar account for each store.

Because the Stellar protocol only accepts numerical Destination Tags, there is no way to prefix them for different stores (e.g. JFK-12358 or SFO-1321).

This restriction makes it unfeasible to use the same Stellar account on more than one site. The good news is, creating a Stellar account is both easy and free. You'll just need to seed each account with a few hundred Stellar before you can use them to accept payments.

What is this pesky notice about Destination Tags?

The WooCommerce Stellar extension uses Destination Tags to match an order with a payment.

Stellar accounts can be configured to require Destination Tags on all incoming payments or accept payments without a corresponding Destination Tag.

If a Stellar account does not require Destination Tags, customers are able to make a payment that can not be matched with an order. This means a store manager will need to manually find the payment in their account and mark the order in WooCommerce as paid.

When a Stellar address is saved on WooCommerce > Settings > Checkout > Stellar administration screen, the extension checks the account to see if it requires Destination Tags.

If the account does not require Destination Tags, the WooCommerce Stellar extension encourages you to configure your account to require Destination Tags and avoid transactions that can not be automatically matched.

The notice asks for my Secret Key. Isn't it dangerous to share my Secret Key?

Yes!

The Destination Tags notice provides a convenient way to configure your account to require Destination Tags (as there is no graphical interface available via the Stellar client to set this, yet).

In order to configure your account, the extension needs your Stellar Secret Key.

The extension tries to be as secure as possible with your sensitive key. It sends it directly from your browser to Stellar.org. It does not send your key to your web server, or any other web server, and it definitely does not store your key anywhere.

This greatly reduces the risk of your secret key being stolen by an attacker; however, if you have malicious code running in your browser, for example, some JavaScript served by a hacked WordPress plugin, that code will be able to steal your Secret Key (and do all sorts of other nasty things with your site).

If you would prefer not to enter your Secret Key in your browser, you can configure your account manually using the AccountSet API command.

Where can I find my Stellar account's Secret Key?

  1. Login to your Stellar Dashboard
  2. Click your username in the header menu
  3. Scroll to the bottom of the Settings page
  4. Click Reveal next to the Secret Key setting

For a visual guide, checkout the screenshots section.

I'm having trouble, where can I get help?

If you've found a bug in the extension or have a feature request, please open a new issue.

If you have a general question, post a topic in the WordPress.org WooCommerce Stellar Forum.

License

The WooCommerce Stellar extension is released under the GPLv3 license.

Copyright (C) 2014 Prospress, Inc.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with WooCommerce Stellar Gateway. If not, see http://www.gnu.org/licenses/.


About

Accept payment for WooCommerce orders via Stellar (both the currency and the protocol).

Resources

Stars

Watchers

Forks

Packages

No packages published