ElementsProject / woocommerce-gateway-lightning

A WooCommerce gateway for lightning payments
115 stars 20 forks source link

Lightning payment complete, but Charge didn't register it? #5

Open rustyrussell opened 6 years ago

rustyrussell commented 6 years ago

@weex grabbed me on IRC; he paid but the UI was still spinning.

I checked the server, it has indeed been paid:

lightning-cli --lightning-dir ~/.lightning/mainnet/ listinvoice | grep c65791aab5ba8aed9b85b188bd6b7d5cb70238026f54d2d1a70c797ad8d9465e
    { "label" : "gjxvasjiIwZb1H13wXgG7", "payment_hash" : "c65791aab5ba8aed9b85b188bd6b7d5cb70238026f54d2d1a70c797ad8d9465e", "msatoshi" : 212434387, "complete" : true, "pay_index" : 3, "msatoshi_received" : 212434387, "expiry_time" : 1516159063 }, 

In case it was just that the gui was stuck I told him to reload, but no joy:

https://twitter.com/weex/status/953488332649984000

He also hasn't received the conf. mail, so I think something is stuck?

shesek commented 6 years ago

It looks like the order was properly registered on both Lightning Charge and WooCommerce ("Processing" means paid and waiting to be delivered), its just a UI glitch: he should be seeing the "thank you" page, but got sent to the payment page instead. Will look into that.

weex commented 6 years ago

I'm not sure it's just UI since I didn't get an email confirmation of the order. Maybe that's a separate issue but in any case, if I can get an order confirmation that'd be cool.

rustyrussell commented 6 years ago

OK, so we also discovered the SMTP gateway wasn't set up on the box, so that's a separate (configuration) bug.

BUT your order is complete. When we fix SMTP gateway I imagine they'll all go flooding out.

shesek commented 6 years ago

@weex is it possible that you manually refreshed the page after making the payment, rather than the page automatically detecting the payment and updating itself?

It appears like WooCommerce throws that error when navigating directly to the payment page of a paid order. We should instead redirect the user to the thank you page in this case, but WooCommerce is throwing the error before the plugin has a chance to intervene. I'll look into ways to override their handling, or perhaps see if it makes sense to change that in WooCommerce itself.

weex commented 6 years ago

@shesek I got the payment screen, sent it, then after 5 or so minutes it hadn't reflected anything so I left the screen there, contacted Rusty and went away for an hour or so. When I came back it was the red bar with Processing message.