joule-labs / joule-extension

Lightning payments extension for Chrome
MIT License
353 stars 62 forks source link

WordPress Plugin Installation #62

Closed VidYen closed 5 years ago

VidYen commented 5 years ago

Hi, this might be something for me to do rather than request you to make a plugin for WordPress. But for the web site owner, I deal with a lot of non-technical users. Is there an implementation for this for installing on WordPress sites? As in... What does a site admin need to have in order to put this on their website? I do a good deal of plugin bridging for rewards sites between crypto plugins and various other store and/or rewards systems.

I know most of them aren't technical knowledgeable to run their own nodes, but I know Dashed-Slug's plugin uses Coinpayments.net as a node (option to run a regular BTC node was in a long time ago), so if you could use a trusted node or even I could run one for them as I already do that with a browser mining stratum.

What would be the technical requirements (server setup) required for a WordPress install... Its given they have at least PHP 5.* and cPanel and although that usually is CentOS, many of them don't have SSH to do terminal stuff.

With my browser miner stuff, I rent Debian servers, but perhaps I should get your view on if this is possible, already done in a plugin somewhere, or not a good idea. I could maybe even ask Dashed Slug if he has something in the works.

wbobeirne commented 5 years ago

I'm not really sure I follow how you envision Joule would work as something that's served on page. The point is to have the user's node be connected to your page. So unless the user were to provide your page with all of the connection information and macaroons (Which would be very insecure) you wouldn't be able to do this kind of communication.

If your hope is to have wordpress sites handle payments, invoice generation, or user identification from Joule, this could definitely be done through a plugin that adds WebLN functionality to the site. Perhaps an existing plugin like https://github.com/joaodealmeida/woocommerce-gateway-lightning could be leveraged for payments? I'd imagine something much more custom would have to be done for the other things.

VidYen commented 5 years ago

Well... Rewards sites work slightly in reverse.

Let me explain....

One is my users uses Adscend which my plugin awards points for watching ads and doing surveys by talking to the Adscend API and then telling the WordPress site... Hey this user watched 6 video ads and earned you $0.03 so they get 1,000 points which they can use for any of the output APIs.

So a user earns maybe $10 in a month from doing surveys and video watched etc...

The admin, then has my plugin talked to Dash-Slugs plugin (his plugin handles the Block Chain side... my plugin just does an off block chain credit on the WP’s sites SQL table via his API) and the users withdraw $5 of crypto.

Yes a bit insecure with WP as a backend (DS has a great deal of disclaimers and I try not to touch the blockchain transaction side and throw no warranties everywhere and tell users to keep small wallets)

So the idea is that if LN could have really small micro transactions like BAT’s scope (again admins getting traditional ad content payments but the users get rewarded in crypto instead of the other way around)

That would be the concept at least.

Just for reference my users are not in the USA nor do I really want to handle the transactions other than moving points around via WPDB just to confirm the ads were watched.

But basically I want to help them help themselves in this regard as when I see them doing this they seem to be just using ETH, DOGE, or LTC to do the payouts due to the BTC networks fees.

And then have sub $1 payouts

On Mon, Dec 3, 2018 at 7:03 PM wbobeirne notifications@github.com wrote:

I'm not really sure I follow how you envision Joule would work as something that's served on page. The point is to have the user's node be connected to your page. So unless the user were to provide your page with all of the connection information and macaroons (Which would be very insecure) you wouldn't be able to do this kind of communication.

If your hope is to have wordpress sites handle payments, invoice generation, or user identification from Joule, this could definitely be done through a plugin that adds WebLN functionality https://github.com/wbobeirne/webln to the site. Perhaps an existing plugin like https://github.com/joaodealmeida/woocommerce-gateway-lightning could be leveraged for payments? I'd imagine something much more custom would have to be done for the other things.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/wbobeirne/joule-extension/issues/62#issuecomment-443917794, or mute the thread https://github.com/notifications/unsubscribe-auth/AmNhDZtcCLe7ivmwdoOjYMZ_xnCc5RaGks5u1bvKgaJpZM4Y_ovS .

wbobeirne commented 5 years ago

OK, there's not much the Joule extension can offer to help in this regard except whatever plugin does this can use WebLN to prompt the user to generate a BOLT-11 string using webln.makeInvoice.

However, I don't think I'm your guy to develop that plugin! I'm going to close this issue, since I'm not sure I can contribute much to what you want. But if you have ideas of how what Joule can do to this end, let me know.