This PR updates the endpoint for creating orders (with mobile receipts) to use the expiry date from the vendor's subscription instead of the hardcoded 1 month. This will address the issues that come from inaccurate expiry date, most notably – for annual products.
Main Changes
handleCreateOrderFromReceipt endpoint now uses the expiry date from the receipt instead of 1 month.
Related Changes
although handleSubmitReceipt has not been used, it's been updated accordingly;
handleCheckOrderReceipt has been updated as well;
CI will run on pull requests to any branch other than nitro-payments-dev;
cleaned a bunch of old code from Service and Datastore;
the code for receipt validation now returns relevant data from receipt, such as expiry time;
the receipt validation code for iOS now also checks the item expiry upon selection and refuses to link an expired subscription (similar to Android);
there is a small fix for iOS clients v1.61.1 and below which may send incorrect values in subscription_id for VPN;
reduced the number of used transactions in some places.
Type of Change
[ ] Product feature
[x] Bug fix
[x] Performance improvement
[x] Refactor
[ ] Other
Tested Environments
[ ] Development
[ ] Staging
[ ] Production
Before Requesting Review
[x] Does your code build cleanly without any errors or warnings?
[ ] Have you used auto closing keywords?
[x] Have you added tests for new functionality?
[ ] Have validated query efficiency for new database queries?
[ ] Have documented new functionality in README or in comments?
[ ] Have you squashed all intermediate commits?
[x] Is there a clear title that explains what the PR does?
[x] Have you used intuitive function, variable and other naming?
[ ] Have you requested security and/or privacy review if needed
Summary
This PR updates the endpoint for creating orders (with mobile receipts) to use the expiry date from the vendor's subscription instead of the hardcoded 1 month. This will address the issues that come from inaccurate expiry date, most notably – for annual products.
Main Changes
handleCreateOrderFromReceipt
endpoint now uses the expiry date from the receipt instead of 1 month.Related Changes
handleSubmitReceipt
has not been used, it's been updated accordingly;handleCheckOrderReceipt
has been updated as well;nitro-payments-dev
;Service
andDatastore
;v1.61.1
and below which may send incorrect values insubscription_id
for VPN;Type of Change
Tested Environments
Before Requesting Review
Manual Test Plan