Comments (28)
-
Do you have the Lightning Charge API token configured in WooCommerce's settings?
-
Are WordPress and Lightning Charge running on the same server?
-
If not, are you able to access Lightning Charge using
curl
from the machine running WordPress? You can try something like:$ curl -u api-token:[your-token] http://[ln.charge.hostname]:9112/invoices
from woocommerce-gateway-lightning.
- Yes, API token configured
- No, WordPress running on SiteGround
- No, I get a connection failed even if my router port is correctly redirected to charged server
from woocommerce-gateway-lightning.
Try running charged with --host 0.0.0.0
from woocommerce-gateway-lightning.
No job, connection timed out.
from woocommerce-gateway-lightning.
Are you able to access charged locally? Try this from the machine running charged:
$ curl -u api-token:[your-token] http://127.0.0.1:9112/invoices
If this works, I'm not really sure how to help you... this appears to be a router configuration issue.
from woocommerce-gateway-lightning.
Yes I can, already tested it. Could create an invoice either
from woocommerce-gateway-lightning.
I've already checked if the router port is really open using https://www.yougetsignal.com/tools/open-ports/
and it's everything fine with this port.
from woocommerce-gateway-lightning.
Can you access the server by typing your public IP address into your browser URL bar?
from woocommerce-gateway-lightning.
Yes, I can connect to it using SSH
from woocommerce-gateway-lightning.
SSH is different. Are you able to access the HTTP server running on port 9112?
from woocommerce-gateway-lightning.
Yes, typing my IP address:9112
I receive Cannot GET /
from woocommerce-gateway-lightning.
Oh, interesting. Then its probably not an issue with your router, but rather on SiteGround's side. My guess is that they're blocking outgoing requests to non-standard ports.
Can you set your router to forward port 80 to your machine's port 9112?
from woocommerce-gateway-lightning.
Now I can't connect using my browser either
from woocommerce-gateway-lightning.
Looks like port 80 might already be used for something else. Hmm, maybe reach out to SiteGround and ask them to whitelist port 9112, or give you the list of whitelisted ports and try to use one of them?
from woocommerce-gateway-lightning.
Thank you again mate, will do it. Port 80 is used for Web Management, so I will try to change it to another port. If I get no success, I will contact them!
from woocommerce-gateway-lightning.
Other ports that are commonly open include 443 (typically used for SSL, but you could use it for HTTP), 8080 and 81.
from woocommerce-gateway-lightning.
443 being the most common of them all, I would try that first if your router isn't listening on it already.
from woocommerce-gateway-lightning.
I'm closing this issue because its not charge-related, but feel free to continue posting here if you have more questions.
from woocommerce-gateway-lightning.
You were right sir! SiteGround was blocking the port. Now everything is working fine! Just one offtopic question, it seems that the invoice number isn't line breaking, I'm sending the image attached. Do you know how to configure it?
from woocommerce-gateway-lightning.
Add .ln-pay .payreq { word-wrap: break-word; }
to your CSS.
Note that this isn't the invoice number, its the BOLT11 payment request.
from woocommerce-gateway-lightning.
Yes sure, BOLT11, sorry for the mistake and thank you for the css code, sir!
from woocommerce-gateway-lightning.
for anyone who might experience the similar issue with no line break after paying the invoice,
the css code for that is
.woocommerce-order .order_details{ word-wrap: break-word; }
from woocommerce-gateway-lightning.
from woocommerce-gateway-lightning.
Hi,
I have the same issue with the error msg "failed saving invoice", what the port did you configure into your router ? thanks
from woocommerce-gateway-lightning.
I have the same "failed saving invoice" problem. My WordPress/Woocommerce site is hosted at Pressable. My lightning node is self hosted and Lightning Charge works with NanoPos. The port is open and I get a response when I "curl $CHARGE/info" using the API token from a separate machine. Upgraded to latest Lightning Charge, still no joy.
from woocommerce-gateway-lightning.
@normandmickey Some suggestions:
-
The port is open and I get a response when I "curl $CHARGE/info" using the API token from a separate machine.
Can you verify this works if you run this from the same machine running WordPress?
-
Are there any logs generated on Lightning Charge when you attempt to make an order on WooCommerce? If the request for creating the invoice is coming through, you should be seeing something there.
-
Are you able to create an invoice with
curl $CHARGE/invoice -d msatoshi=500
?
from woocommerce-gateway-lightning.
from woocommerce-gateway-lightning.
It appears to be some communication problem between the two servers. Maybe Pressable is rejecting the outgoing connection?
Are you using the default port (9112) for Charge? Some firewalls don't like non-standard ports, which might be a reason Pressable blocks it. You might have better look running on port 80.
from woocommerce-gateway-lightning.
Related Issues (16)
- Show BOLT11 payment request as QR HOT 1
- unhelpfull error message when php curl not installed HOT 2
- Error in doing lighting charge payment HOT 2
- Is there a way to also store the bitcoin amount in the order metadata? HOT 4
- Feature: (optionally) show node information
- Virtual downloadable products requires billing address details HOT 1
- QA code image doesn't appear - 402 error HOT 2
- Is this thing working? HOT 2
- Add lightning-network as a topic to this repository
- Set description for invoices HOT 1
- Display expiry timer HOT 1
- Suggestion : WHMCS Gateway
- Lightning payment complete, but Charge didn't register it? HOT 5
- The plugin was not activated HOT 7
- PHP < 5.6 compatibility? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from woocommerce-gateway-lightning.