diff --git a/README.md b/README.md index 9aa637ea..4c92115f 100644 --- a/README.md +++ b/README.md @@ -1097,7 +1097,7 @@ If success, 200. } ``` -#### POST /apple/process_payment +#### POST /api/apple/process_payment Process payment receipt diff --git a/app/api/views/apple.py b/app/api/views/apple.py index 49463e31..5ed51f18 100644 --- a/app/api/views/apple.py +++ b/app/api/views/apple.py @@ -9,6 +9,7 @@ from flask_cors import cross_origin from app.api.base import api_bp, verify_api_key from app.config import APPLE_API_SECRET +from app.extensions import db from app.log import LOG from app.models import PlanEnum, AppleSubscription @@ -292,4 +293,6 @@ def verify_receipt(receipt_data, user) -> Optional[AppleSubscription]: plan=plan, ) + db.session.commit() + return apple_sub