-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
After successful payment redirects to /undefined #3
Comments
Once the payment is made, there's a Also, might be easier if we diagnose this over IM. Twitter DMs or IRC (Freenode) perhaps? |
https://twitter.com/ivelinkv <https://twitter.com/ivelinkv> just created a twitter account. I would gladly diagnose this over DMs there.
I sniffed the request using Fiddler, but I didn’t like what I got. The request is the right one and here is its raw representation:
Raw Request:
POST http://sondaji.com/wp-admin/admin-ajax.php <http://sondaji.com/wp-admin/admin-ajax.php> HTTP/1.1
Host: sondaji.com
Connection: keep-alive
Content-Length: 58
Accept: */*
Origin: http://sondaji.com <http://sondaji.com/>
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36 OPR/52.0.2871.64
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Referer: http://sondaji.com/test-lightning/ <http://sondaji.com/test-lightning/>
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
Cookie: _ga=GA1.2.280476673.1524653062; _gid=GA1.2.1876348499.1524653062
action=ln_publisher_token&invoice_id=Z_VuO3VNnUtpbcdH~KsFA
but the response is a plain 0.
Raw Response:
HTTP/1.1 200 OK
Date: Wed, 25 Apr 2018 10:46:16 GMT
Server: Apache
Access-Control-Allow-Origin: http://sondaji.com <http://sondaji.com/>
Access-Control-Allow-Credentials: true
X-Robots-Tag: noindex
X-Content-Type-Options: nosniff
Expires: Wed, 11 Jan 1984 05:00:00 GMT
Cache-Control: no-cache, must-revalidate, max-age=0
X-Frame-Options: SAMEORIGIN
Referrer-Policy: strict-origin-when-cross-origin
Content-Length: 1
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=UTF-8
0
JsonView (In fiddler): JSON=0
So yeah, the request is ok, but I don’t know why do I get a “0” response. No post_id, neither token.
|
Nothing? |
Hi, sorry for the long delay! This was caused due to a change in Lightning Charge that caused incompatibility, and was fixed in Lightning Publisher v0.1.8. |
I setup a page (and a publication if that matters, I tried both) and added the [ifpaid 0.05 USD] attribute. The "Pay" button shows and after clicking it an invoice is created which I am able to successfully pay.
The problem occurs after I pay, the page refreshes but no token is appended to the url, rather the url changes from sondaji.com/test-publication/ to sondaji.com/test-publication/undefined which in result gives me the Wordpress 404 page
I can create a video demonstrating the process, but it's pretty straightforward. In my c-lightning log I see that the payment is successful:
lightningd(15538): Resolving invoice 'iVvfFzu~OmsWELQSUYq0z' with HTLC 5
lightning-charge also indicates success:
GET /checkout/iVvfFzu~OmsWELQSUYq0z/wait 204 8915.376 ms - -
GET /invoice/iVvfFzu%7EOmsWELQSUYq0z 200 2.333 ms - 816
Picture 1: Qr Code
Picture 2: Redirected page after successful payment:
The text was updated successfully, but these errors were encountered: