First Electroneum Instant Payments Woocommerce integration

It feels great checking out one’s own plugin on another’s website. Thanks for installing!

Yeah, the primary method is to check for payment via the webhook. This happens between your server and ETN’s server and has no timing relation to what the customer sees on the front end. There is a javascript function on the front end that then polls your site’s local database every 2 seconds to see if the order has been marked as complete by the webhook yet. Should that fail to happen for whatever reason (e.g. developer forgot to insert webhook URL, typo in URL, or network issues), the plugin will check with a poll to ETN’s servers once the “I’ve made the payment” button is clicked (which is pretty much foolproof in most cases).

Please put a cheap, temporary, downloadable item in your shop so I can test out the whole thing for you. Don’t really have 2,700 ETN lying around for mobile trigger buttons + shipping. :grinning:

6 Likes

Thanks for this information.

Yeah, the only currencies currently supported are those as appear on the Value tab in the Electroneum app.

I’ll build in a quick check to make sure the store currency is supported and display a more civilized message than the error message you saw.

2 Likes

Sorry, totally forgot to add a cheap product back in, used to have a pumpkin picture :D.
So Added a photo in the New & Photo categories, even reduced it to a penny :rofl:

I beleive the webhook should be fine, I’ll try myself to in a bit, as it was pretty simple if following the instructions :+1:

1 Like

Just had a little test and it worked really well, the Payment Complete screen looked pretty professional :man_office_worker: haha.

Not sure how easy it would be but is there any way of getting the ETN paid on the Invoice?
Thanks

1 Like

Just bought myself a beautiful photo of Barcelona! Thanks!

Worked very well! I’m trying to test the heck out of it, so you might get a lot of pending orders created. I’ve tested it on my own site a lot, but it’s a good thing to test it out on a different build altogether.

I’ll see what I can do regarding getting ETN on the invoice. Shouldn’t be too difficult.

4 Likes

Not to worry, just set the site up so currently bulking it up, have fun :smile: :+1:

You’re great.

I made my first payment. I’m looking forward to the Woocommerce add-on
I want to set up my two websites


www.hijabrunway.com

4 Likes

@ETNCEO as you requested, here is an updated demo of the improved plugin. The plugin now checks for payment in the background every 2 seconds and updates the screen automatically once payment has been processed.

In this demo the success screen on Electroneum101 loads even before the app’s success message is displayed! This system is truly instant, and I’m loving it more every day. Can’t wait for the marketing to start next month!

10 Likes

Absolutely Stunning @benjaminoo

image

10 Likes

I want to buy something to show you my unbelievable support. Thank you everything. Glad to have you in the community. :slight_smile: :heart:

5 Likes

Incredible how fast and easy this is! Great video - thank you!

5 Likes

Nice video again @benjaminoo :+1: :sunglasses:

3 Likes

Good job, keep up the good work

3 Likes

Hi @benjaminoo,
Did you manage to get the ETN on the invoice?
I’ve just had a mess around with your code to see if I could get it passed through. First time modding woocommerce plugins :slight_smile:

So I added this on line 34 of electroneum_ips_library.php

add_action('woocommerce_thankyou', array($this, 'etn_thankyou_page'));

And then added a new function around line 102 to display the ETN Total

function etn_thankyou_page ( $order_id ) {	?>
	
	<h2>ETN Details</h2>
	<table class="woocommerce-table shop_table gift_info">
		<tbody>
			<tr>
				<th>Amount Paid</th>
			</tr>
			<tr>
            <th>&nbsp;&nbsp;&nbsp;<?php echo get_post_meta( $order_id, 'etn_ips_amount', true ); ?> ETN</th>
        </tr>
		</tbody>
	</table>
	<?
}

It shows the ETN paid at the bottom of the invoice, which I believe is a nice enough start. Hopefully you can integrate it and possibly find a nice place for it :slight_smile:

ETNPaid

https://etnmegastore.co.uk

5 Likes

That looks cool @rmail2006 :open_mouth:

2 Likes

Amazing! Thanks for sending this code!

I’ll definitely implement it after the weekend!

3 Likes

No problem glad to help :smiley:

2 Likes

what if , I only have web wallet?

Good day. Is this a plugin and is it available?

1 Like

It is in fact a plugin. It should already be available in the Wordpress directory if you search for “electroneum”, but hold off for another few hours before you install. I’ve uploaded a new version (version 1.1.1) but I’m just waiting for Wordpress to compile the new ZIP files. It takes them a few hours given the large amount of plugins and updates they work with.

3 Likes