GaloyMoney / blink-mobile

The Everyday Bitcoin Wallet
https://www.blink.sv
MIT License
137 stars 124 forks source link

LNURL / LN address description is not displayed for LNPoS / Opago-pay PoS / BTCPayServer #3083

Open openoms opened 5 months ago

openoms commented 5 months ago

Tested with an offline LNPoS as seen at: https://github.com/lnbits/LNPoS

Background After creating an invoice the LNPoS displays a PIN which matches with what the payer can provide from the link in the LNURL description. The payer proves that the right invoice was paid by knowing the PIN which he/she can only access from the description provided on the LNURL callback.

The problem When paying the LNURL Blink only displays the usual green tick and records the invoice, payment hash and preimage in the details, but it does not stora the LNURL or show the link (with the PIN) in the description.

An example how Zeus does it: image

In Zeus the payment history has the LNURL stored (this is not really needed as the resulting callback contents are unique): image

See the contents of the LNURL from the PoS: https://lightningdecoder.com/lnurl1dp68gurn8ghj7cmvde3xjarn9ejxj7twdajx2uewvdhk6tmvde6hymryv4mxjcm99ashq6f0wccj7mrww4exct6vdav95d3lwq75z5t2xdc5kuz223nnxj35vat4qwrzdf55763sf3t5sm3sfc65wag5u609u

The result on the callback link:

{"pr":"lnbc10n1pja8r6gsp5c927nj8j8l73nyvdxwrrs9yklq8d49w44lvmr9lcxq7tl0cncsaqpp543e0edxcc8l5r3arcf8en04rsymqpp77a6u575xsrugrj6k9zv3qhp55n6tqljkhk0zk5d3cvf2q8x3f2snq9v72g3xhltcwcpdew0pu82qcqzysrzjqvutcqr0g2ltxthh82s8l24gy74xe862kelrywc6ktsx2gejgk26srpfecqqn5cqqyqqqqlgqqqqqzsqyg9qxpqysgq3z0nxlx8m8hgmfp88k9q3u6ex0wa29sans3850uwrdsajx626f3nf4jf8y8yx7s6l5r4n9saenzvzknplkg0hdy5a2g28wa33y82zkcpqhvals","successAction":{"tag":"url","description":"Check the attached link","url":"https://clnbits.diynodes.com/lnurldevice/HhY7oUsimdWJcnSTCnQPDA"},"routes":[]}

Note that the link (therefore the PIN) is different every time the LNURL is clicked and the PIN is only displayed if the PoS backend registered that the matching invoice was paid. Otherwise it displays: image

Desired solution Blink should display the content from the LNURL description field after the invoice was paid to be able to prove the payment to a merchant using such offline PoS like the LNPoS or Opago-Pay solution.

nicolasburtey commented 5 months ago

https://clnbits.diynodes.com/lnurldevice/HhY7oUsimdWJcnSTCnQPDA currently doesn't load on my end

it's not enough to display the content of the link on payment confirmation (keep it in the mobile app)? it should be save in the back end? if the data is ephemeral, then someone who skip the confirmation page will still running into the same as today?

openoms commented 5 months ago

https://clnbits.diynodes.com/lnurldevice/HhY7oUsimdWJcnSTCnQPDA currently doesn't load on my end

The server is back, but found an easier way to test: Can pay to an LNaddress served by BTCPayserver (irrelevant here but set up with the Blink plugin): blink@pay.diynodes.com

Zeus shows the link to the receipt from the description (screenshot below). Blink does not show the link so there is no access to the receipt after paying.

it's not enough to display the content of the link on payment confirmation (keep it in the mobile app)? it should be save in the back end? if the data is ephemeral, then someone who skip the confirmation page will still running into the same as today?

It is enough to display the content on the confirmation screen (that is how Zeus does it also - my connected node only knows about the invoice). The preimage can serve as a proof payment later if there is a dispute.

The data displayed on the link is not ephemeral - it changes to the PIN code if the invoice is paid in case of the LNPoS / Opago-pay device or it contains the payment receipt for BTCPay.

Example for a BTCPay receipt for payment sent to the LNaddress blink@pay.diynodes.com: https://pay.diynodes.com/i/Dg2oxtr589zABMVTLr15Db/receipt

image

Breez also displays the message after a successful payment: image