-
-
Notifications
You must be signed in to change notification settings - Fork 65
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
Possible to add reserve function(not payment) #171
Comments
That would be awesome, still missing out a lot of times now. Not sure it is possible because of the steps you need to take in the app. |
This could be possible but I don't have the time for the research at the moment. I guess the problem is that you have to pay directly after the reservation and there is no link to the payment page. If you find any information regarding the API and the payment process feel free to post it here or try an implementation yourself and contribute to the project. |
Reservation would be enough, because you have claimed the box. |
Here was some work done towards auto reserve: maxux . Another nice function would be mac address change and adapter restart to change ip after error 403 received. This way we could scrap with interval as low as 1sec. Now I use TMAC on Windows manually for this, but I believe its possible to script it to launch tmac automatically after 403 received. Another useful, but least useful enhancement would be to add foodsi api (polish TGTG alternative, like here kacpi2442/ambot P.S. I need to find time to learn Python and start coding myself instead of asking people, but day is so short and I haveso many things on my head ---edit: It would be better to implement this into the scrapper to make it change mac when 403 error detected, but I don't know how
|
Is the new mac address actually resolving the ban? I will test it and if it works integrate an optional mac changer. |
@Der-Henning Yes, it does. |
I think (but I am unsure) this is the correct endpoint for making reservation:
all endpoints from TGTG 22.10.1 :
Create order request:
Create order response:
Create payment request:
create payment response:
Payment method request:
payment method response:
Additionalauthrequest:
Paymentresponse:
authorization:
Authorizationpayload"
I hope it is of any use. |
With commit b3d6fd6 I added the endpoints to create an order to the TGTG API. It is possible to reserve a magic bag and revoke the reservation. Unfortunately, the reservation does not show up in the TGTG App. I hoped it would be possible to reserve the bag with the scanner, send a notification, and then pay in the official App. |
I'm using a shared account for the family (so we can all pick up each others' reservations) and the unpaid orders don't show up on other phones, which was also a disapointment... What does work is reserving a bag on one phone, and cancelling the order once the person with payment credentials is ready to order on their phone. For a bot to do it that way, it would require a way to ask the bot to cancel its order (like Telegram bots' buttons) Edit : I assume entering credit card information might be out of scope for this project ? Or using saved credit card information ? (are these even saved on their servers or just locally in app data ?) |
IIRC there's a link to be generated by TGTG or the bot that will allow the user to complete the payment. |
I've installed the version shown above, but how do I use the new functions? |
Hi @peff74, |
ah then I'm out, this is beyond me. Will you implement the function eventually? |
At the moment I am trying to add the reserve function to the telegram bot. But I am very busy at the moment and as this is a side project it may take some time. |
I have now taken a closer look at Telegram because of your app. |
Chatgpt generated me a code that would allow to reserve bag. Maybe its the hallucinations of it, but Its worth sharing:
|
is it possible to use the reserve function in windows version now? What is the config command for that? |
I created a wiki page that describes the reservation feature. |
On the tgtg library payment part of reservation is not implemented. To secure a reserve you need to both reserve and pay but bots/scripts that buy out all bags within 1 second of opening is quite evident anecdotally as even without loading time during UI navigations throughout the reserve process on app, all bags are gone before one can enter paying UI. My question is how do you suppose who ever is running automatic reserve service has enabled successful sync of reserve and payment. Perhaps they have hijacked payment endpoint? |
Is it possible to implement paypal as the payment, and send to payment link to the telegram bot perhaps? |
Also I have found the endpoints which are needed to get the Adyen URL which then redirects to the PayPal page. Before create order (maybe even possible after the order is created): Create order and make sure order is reserved with ORDER_STATUS_ENDPOINT
|
Also see: ahivert/tgtg-python#215 |
@floriegl Unfortunately, for me
Do you know what i might miss? |
That looks like the response I got from Do you perhaps have a WIP branch or something similar I can take a look at? |
After sending the requests manually using Postman, it worked. I still have to find the error in my python code. Thank you for your detailed help! |
i have the same exact problem, i can't overcome this issue, it's so strange Edit, i've resolved it, i need to make a cycle of request, and it will give me the payload link of the payment |
Ahh… that makes sense. The |
I really had to dig in to figure this thing out and see exactly how the app behaved. You don't know how satisfying it is, I've been following this thing for 7 hours straight. Better than an orgasm lol. |
I just took a look at my mitm capture from back than and the polling endpoint instantly provided the payment link. If there are any issues with the v4 changes please tell me. I just used https://github.com/niklashigi/apk-mitm with the newest version of https://github.com/iBotPeaches/Apktool and https://github.com/mitmproxy/mitmproxy where I just provided the mitmproxy certificate to apk-tool, so that the app accepts the proxy. Then I just set the hosts IP as the proxy in an android emulator and checked the package capture. |
I'm doing everything with a physical device, I checked the requests with proxyman and an iPad, because apparently on iOS there is no type of SSL pinning, and everything is visible in clear without having to resort to root emulators and whatever. However, it seems that only the number changes. I'm using the iPad user agent in the requests and everything seems to work perfectly, I actually managed to place an order with my account that resulted in the original app, I think it can write a bot. The only precaution is to manage the datadome cookie, at each request, because it always changes. Also, the current version of tgtg does not work with access via email, so you have to manually recover the access token, the refresh token and user id, as well as the cookie with the proxy and a sniffing tool like proxyman |
From what I understand https://github.com/Der-Henning/tgtg/blob/main/tgtg_scanner/tgtg/tgtg_client.py already handles this cookie
I am not sure what exactly you are referring to. https://github.com/Der-Henning/tgtg/blob/main/README.md?plain=1#L144-L147 mentions that you are not allowed to be signed in to a TGTG app for the scanner (or for local testing your REST testing suite) to do the email login. But I don't want to rule it out that it is an iOS version thing, or that they added it very recently (email login worked for me a few weeks ago). |
Do you know that I still find out about this App? That is, I was convinced that I was on the github of the other tgtg tool. Well in the end the problem is the same on both sides, I'm really distracted, knowing that this other tool allowed a management of that already existing cookie, I would have saved at least 1 hour of work 😅 |
I wonder if its possible to add "automatic reserve and send link to payment page" function?
The text was updated successfully, but these errors were encountered: