Fix apple payment
This commit is contained in:
parent
34635bf854
commit
d5e868e629
|
@ -1097,7 +1097,7 @@ If success, 200.
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
#### POST /apple/process_payment
|
#### POST /api/apple/process_payment
|
||||||
|
|
||||||
Process payment receipt
|
Process payment receipt
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@ from flask_cors import cross_origin
|
||||||
|
|
||||||
from app.api.base import api_bp, verify_api_key
|
from app.api.base import api_bp, verify_api_key
|
||||||
from app.config import APPLE_API_SECRET
|
from app.config import APPLE_API_SECRET
|
||||||
|
from app.extensions import db
|
||||||
from app.log import LOG
|
from app.log import LOG
|
||||||
from app.models import PlanEnum, AppleSubscription
|
from app.models import PlanEnum, AppleSubscription
|
||||||
|
|
||||||
|
@ -292,4 +293,6 @@ def verify_receipt(receipt_data, user) -> Optional[AppleSubscription]:
|
||||||
plan=plan,
|
plan=plan,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
db.session.commit()
|
||||||
|
|
||||||
return apple_sub
|
return apple_sub
|
||||||
|
|
Loading…
Reference in a new issue