First Electroneum Instant Payments Woocommerce integration


#61

Alternatively, if coinmarket cap or coin gecko supports ngn, you can use their Web site api to convert your etn values, then pass this value to the qr code.

Otherwise, you can do some math using a global exchange rate api to convert your ngn value to say… usd… then feed this value into the etn api.

Its a bit gimmicky and requires some coding knowledge, but very doable.


#62

Okay thanks for the info. I hope NGN gets included soonest.


#64

Thanks for integrating! It’s truly an honor to see people using the plugin already…

One thing, though, I see you’re still using the first version. Please upgrade to version 1.1.0, which checks for payments in the background and handles order flow much better.

Simply deactivate and delete the plugin on your site as it is now, and then upload the new zip file, install, and activate.

I’m working on getting the plugin in the Wordpress plugin directory, which should make updating much more seamless.


#65

Just spotted your order :smiley: haha
Must have just missed the new release but got it in pretty quick. I wasn’t expecting it to remember my api details, pretty nifty :+1:
So with it checking for the payment, is that using the 1-2 second callback rather than having to press the “I’ve Made the Payment” button?
And I’m really happy to test this as I’m a huge fan of ETN and when I spotted this :open_mouth: I had to get involved.
Again, Amazing Work :+1: :+1: :+1:


#66

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:


#67

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.


#68

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:


#69

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


#70

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.


#71

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


#72

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.mithanni.com


#73

@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!


#74

Absolutely Stunning @benjaminoo


#75

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


#76

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


#77

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


#78

Good job, keep up the good work


#79

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:


#80

That looks cool @rmail2006 :open_mouth:


#81

Amazing! Thanks for sending this code!

I’ll definitely implement it after the weekend!