-
-
Notifications
You must be signed in to change notification settings - Fork 73
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
Howto do a order and automatic payment #215
Comments
For now, these functions are not implemented. You can figure them out yourself. Easiest way (though not all that easy) is to sniff the traffic of the TGTG app running on an Android emulator. You could use mitmproxy to sniff that traffic. You'll need an Android emulator (an AVD) with Google Play, and you'll need to insert the mitmproxy CA certificate as trusted system certificate. Not easy, and you're probably on your own, but it's definitely doable. |
Is this how you were able to find the endpoints and create your pull request @Jurrie? |
Yes it is. It's not all that hard actually:
I wrote some documentation on how to do this for mitmproxy. My PR was merged, but no new release was done yet. So the documentation is not live. But it's on GitHub: check here. Using the latest release of mitmproxy (v9.0.1 currently) works just fine. |
Hi @Jurrie, Thank you for the detailed tutorial. I am also interested in implementing such a method to automate payment. However, unfortunatly, I can not run Android Studio or even a simple emulator on my computer since I do not have enough memory, my computer becomes very laggy when I try to use virtualization. Do you think it would be possible for you to share the code you implemented, even if it's not perfect and needs clean up (I can do that if you want) ? Of course, if there are any sensitive information (like card numbers hard coded), you can replace it with placeholders. |
Can you share sample of the payment request bro ? Even if it's not perfect, just to see the work :) |
I made a fork that supports payments with credit cards (https://github.com/matteonu/tgtg-python). It should work for cards where no ThreeDS2 authorization is needed. For ThreeDS2 authorization support you need to be able to handle Adyen actions I think (https://docs.adyen.com/online-payments/3d-secure/native-3ds2/web-component?tab=create-new-component_2#3ds2-component). |
@matteonu Is it possible to take the card on the account or not ? Because i made a bot for my friend, and i dont want to store the credit card information :) |
Thanks for the solution, it worked perfectly! |
Did you succeed to pay order with store card in TGTG pref ? |
I haven't been successful in paying with the card stored on the TGTG app. By using @matteonu's method from the py-adyen-encrypt library on GitHub, I was able to successfully use my credit/debit card to pay for the reserved ID with TGTG's payment endpoint.
|
@OverRide // an.a I need to understand the str2 string, to pass at biometricssecret to use the store card :) |
@Vivalemuc Honestly, I think this is a lost cause. Also in the end you probably get your friends credit card info again but this time via TooGoodToGo. What you could try is to send your friends the private key, they encrypt their credit card info, send it to you and you then make the payment with the encrypted info. This could be automated of course. |
i cant do this in automatic process, because the user need to input the data in my program, so it's not secure.. If i get the Card ID store in TGTG app, and use it to pay order it will be totaly secure for me, and for users too ! |
@brandonbondig
|
@Landwirt909 I've the same issue. I've tried it with cards from Revolut (temp and virtual cards). |
Hi I'm back on this thread but it was to know if there had been improvements on this automatic payment system or if someone else had done something else! |
Same issue on my side with 3 different cards. On pay_order -> On get_payment_status -> |
tgtg updated the payment encryption, no wonder @matteonu 's method stop working. |
is there a way to manually pay for the created order? |
I think this is a lost cause. The issue we have is figuring out the AES key, which we would need in order to encrypt the payload in order for Adyen to process our order. However, this is impossible to know without having access to the client code, which we do not. We only know the public RSA key, which is used for encrypting the AES key. But that doesn't help with actually encrypting and sending over the payload. Please let me know if I've misunderstood something, I'm a novice when it comes to encryption :) Shouldn't we close this issue now? @ahivert |
i managed payment by using paypal and a telegram bot to send the payment link on my phone |
Can you share your code snippet pls ? I only want paypal payment to buy order myself ! |
@extern94 got ya. That's a great solution! I'll have to look into it. |
Hello @hovak101 It seems the AES key is randomly generated. The following code should be the code behind it: https://gist.github.com/sebastianpc/16ab6a81f1273f8839dffb65e6ddad86 |
Hi everyone Can you please point to how can the payments be implemented using Paypal? The Adyen method doesn't work for me either. |
Before create order (maybe even possible after the order is created): Create order and make sure order is reserved with
|
Also see: Der-Henning/tgtg#171 |
Hi, thank you for the detailed steps written out. |
@Shusaku1 Der-Henning/tgtg#171 (comment) (apk-mitm also removes certificate pinning) |
Thank you @floriegl! Installed a Google Pixel 2 emulator (API 31) and rooted it with Magisk. Added the MITMProxy CA certificate to the emulator. |
@Shusaku1 did you use the latest version of Apktool (v2.10.0) too? apk-mitm often doesn't use the current version per default (check usage on how to specify the correct version) |
@floriegl Yes, I have used the latest version of Apktool(v2.10.0)..... I pulled the base.apk and split APKs (split_config.en.apk, split_config.x86_64.apk, etc.) to my host machine. I then used apk-mitm with apktool to patch the base.apk for bypassing SSL pinning. Is this the correct step that you went through as well? |
I did my reverse engineering before they changed to split APKs only. I also used an unrooted Nox emulator (apk-mitm adds the mitm-proxy certificate to the apk). Maybe just patching the full xapk (see niklashigi/apk-mitm#175 (comment)) and then installing it with Split APKs Installer works? |
Thank you for the advice @floriegl . I finally managed to bypass Certificate Pinning as well and now can see TGTG on mitmproxy. |
I love a Pythonscript to order tgtg boxes, but does anyone have a working pythonscript so you can order and automatically pay for exampe through iDeal?
The text was updated successfully, but these errors were encountered: