Commit Graph

34 Commits

Author SHA1 Message Date
Son Nguyen Kim
05d18c23cc
support product IDs for the new Mac app (#2028)
Co-authored-by: Son NK <son@simplelogin.io>
2024-02-06 11:54:02 +01:00
Adrià Casajús
e43a2dd34d
Have subscription callback whenever a subscription changes (#1748)
* Have subscription callback whenever a subscription changes

* Fixed tests

---------

Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
2023-05-26 15:33:55 +02:00
Son Nguyen Kim
02f42821c5
fix 21004 error (#1380) 2022-10-27 14:03:11 +02:00
Son Nguyen Kim
2f769b38ad
Apple in app fix (#1369)
* error log if issue with apple sub

* use the right secret when polling apple sub
2022-10-25 19:45:53 +02:00
Son Nguyen Kim
83d58c7bca
handle case empty latest_receipt_info (#1081) 2022-06-13 12:42:56 +02:00
Son Nguyen Kim
0afd414a66
use responseBody.Latest_receipt_info and not responseBody.Receipt.In_app (#1066)
https://developer.apple.com/documentation/appstorereceipts/responsebody/receipt/in_app
2022-06-10 15:50:09 +02:00
Son
a6f5b755aa set apple_sub.product_id 2021-12-30 16:20:31 +01:00
Son
30ba566457 take into account _MACAPP_MONTHLY_PRODUCT_ID in verify_receipt 2021-12-30 16:15:33 +01:00
Son
429683f444 log more data in apple.verify_receipt() 2021-11-06 18:25:15 +01:00
Son
372466ab06 do not use flask-sqlalchemy
- add __tablename__ for all models
- use sa and orm instead of db
- rollback all changes in tests
- remove session in @app.teardown_appcontext
2021-10-12 14:36:47 +02:00
Son Nguyen Kim
5ac78f2694 reformat 2021-09-08 11:29:55 +02:00
Son NK
f4f2db0f04 use the same error structure in apple endpoints 2020-11-03 16:13:10 +01:00
Son NK
c625a178e8 use RequestException instead of ConnectionError 2020-09-11 16:55:32 +02:00
Son NK
d1eb1ea799 handle case apple server not accessible 2020-09-05 20:56:03 +02:00
Son NK
fdedc24358 black new version 2020-08-27 10:20:48 +02:00
Son NK
6437ee46e0 use LOG.exception instead of LOG.error to provide stacktrace 2020-07-17 12:59:07 +02:00
Son NK
d59e9a6238 use warning level for apple server issue 2020-07-04 18:24:34 +02:00
Son NK
40b4273111 take into account /verifyReceipt can return 5** 2020-06-30 20:10:12 +02:00
Son NK
774ffcae3b enable CORS on /api endpoints 2020-06-24 10:30:01 +02:00
Son NK
355b4dc2cf remove too verbose log 2020-05-15 15:30:19 +02:00
Son NK
e6c37cad0b Handle case where data["receipt"]["in_app"] is empty 2020-05-13 21:41:34 +02:00
Son NK
2b71fee712 use warning log level for "No existing AppleSub" error 2020-05-13 21:38:25 +02:00
Son NK
95a90a9979 use log warning for verifyReceipt 2020-05-01 18:31:06 +02:00
Son NK
9be813b96d fix naming 2020-04-29 16:57:28 +02:00
Son NK
8ae51998f5 take into account MacApp 2020-04-29 15:50:06 +02:00
Son NK
48202e905f rename verify_api_key -> require_api_auth 2020-04-25 13:42:53 +02:00
Son NK
7fff8f84d8 add more debug log 2020-04-21 20:17:43 +02:00
Son NK
318b47af36 Handle the case invalid input for /api/apple/update_notification 2020-04-21 15:54:43 +02:00
Son NK
e50b0d5da5 implement apple_update_notification 2020-04-21 09:34:16 +02:00
Son NK
840f827b45 Handle the case "Restore Purchase" on another account 2020-04-19 23:13:43 +02:00
Son NK
d5e868e629 Fix apple payment 2020-04-19 22:54:21 +02:00
Son NK
34635bf854 use Log.error to know when /api/apple/update_notification is called 2020-04-19 16:06:37 +02:00
Son NK
bca1e227c7 Add /apple/update_notification to test Apple notif 2020-04-19 11:50:29 +02:00
Son NK
1bba38edb6 Add POST /apple/process_payment 2020-04-19 11:13:38 +02:00