wavesnode / gateway-for-woocommerce

Wordpress woocommerce plugin for supporting Waves or any other token on the Waves platform, examples: https://shop.wavesnode.net and https://services.wavesnode.net
11 stars 27 forks source link

Asset as config #1

Closed tubbynl closed 6 years ago

tubbynl commented 7 years ago

currently if ppl want to use their own assets for this plugin the following steps are required

waves-gateway-for-woocommerce.php
Change WNET for your tokens shortcode.
Lines: 6-8-93-94-141-143-147-149-157-161-162-163

class-waves-gateway.php
Change WNET for your tokens shortcode.
Lines: 16-61-62-98

Change assetId (assetId AxAmJaro7BJ4KasYiZhw7HkjwgYtt2nekPuF2CN9LMym) and description (WNET) to your tokens ID + description:
Line: 16

class-waves-exchange.php
Change WNET for your tokens shortcode.
Lines: 37-39

and

WooCommerce - Settings - Checkout - Waves Enable the plugin Set title Edit the customer message Set destination address (waves wallet) Enable the convert prices option.

Order module of WooCommerce only works when you force users to register an account on Wordpress. With guest payments there is no information about the orders, you will receive the payment. This can be solved by using some extra plugins, we are using:

I think the code thingies can be handled as settings and have their defaults on WNET

tubbynl commented 7 years ago

it probably makes more sense to just add them as currencies (and include the assetId somewhere in that config)

adding the currency based on setting values does not really work seamlessly

tubbynl commented 7 years ago

in the current workings the total shop currency is handled in the desired currency and thus calculating prices based on exchange rates is no longer required (and currently not used)

tubbynl commented 6 years ago

added the extra assets as currencies; https://github.com/wavesnode/gateway-for-woocommerce/commit/47ee06d77fd5ceafd67d45f7473fa0283a8c0382

is an example of a adding a new asset as currency, it's not yet completely DRY but it is managable