Skip to content
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

PriceIncreaseStatus in JWSRenewalInfoDecodedPayload should be *int32 #232

Closed
Daydaylw3 opened this issue Aug 23, 2023 · 6 comments
Closed

Comments

@Daydaylw3
Copy link
Contributor

Daydaylw3 commented Aug 23, 2023

The PriceIncreaseStatus field in JWSRenewalInfoDecodedPayload should be *int32 would more appropriate, cause base on Apple Doc, it only have 2 possible value(0, 1).

0 - The customer hasn’t yet responded to an auto-renewable subscription price increase that requires customer consent.

1 - The customer consented to an auto-renewable subscription price increase that requires customer consent, or the App Store has notified the customer of an auto-renewable subscription price increase that doesn’t require consent.

But in the old Apple Doc, this field is string type. So, when non price_increase happened, this field would be empty.
So the same with the new api

{
    "autoRenewProductId": "${autoRenewProductId}",
    "autoRenewStatus": 0,
    "environment": "Sandbox",
    "expirationIntent": 1,
    "isInBillingRetryPeriod": false,
    "originalTransactionId": "2000000394545223",
    "productId": "${productId}",
    "recentSubscriptionStartDate": 1692610707000,
    "renewalDate": 1692611727000,
    "signedDate": 1692774746958
}

But if PriceIncreaseStatus is int32, will be decoded to 0, which indicated that

The customer hasn’t yet responded to an auto-renewable subscription price increase that requires customer consent.

That would be odd.

So the same with the ExpirationIntent, relative doc

the OfferType in JWSTransaction, relative doc

the RevocationReason in JWSTransaction, relative doc

{
    "transactionId": "${transactionId}",
    "originalTransactionId": "${originalTransactionId}",
    "webOrderLineItemId": "${webOrderLineItemId}",
    "bundleId": "${bundleId}",
    "productId": "${productId}",
    "subscriptionGroupIdentifier": "21375857",
    "purchaseDate": 1692777326000,
    "originalPurchaseDate": 1692776648000,
    "expiresDate": 1692777506000,
    "quantity": 1,
    "type": "Auto-Renewable Subscription",
    "inAppOwnershipType": "PURCHASED",
    "signedDate": 1692777349608,
    "storefront": "MAC",
    "storefrontId": "143515",
    "transactionReason": "RENEWAL",
    "environment": "Sandbox"
}
@Daydaylw3
Copy link
Contributor Author

Daydaylw3 commented Aug 23, 2023

hi @richzw , sry for interrupt, I make a PR to resolve that 🥶

@richzw
Copy link
Collaborator

richzw commented Aug 23, 2023

@Daydaylw3 , thank you for your PR. Here is one question, there is NO zero value of expirationIntent and offerType , maybe it could be better to keep the original type rather than *int32.

@Daydaylw3
Copy link
Contributor Author

@Daydaylw3 , thank you for your PR. Here is one question, there is NO zero value of expirationIntent and offerType , maybe it could be better to keep the original type rather than *int32.

fair enough!

@Daydaylw3
Copy link
Contributor Author

And I also found that IsInBillingRetryPeriod is the same, how do you think about it?

Old Apple Doc, New Apple Doc

@richzw
Copy link
Collaborator

richzw commented Aug 23, 2023

And I also found that IsInBillingRetryPeriod is the same, how do you think about it?

Old Apple Doc, New Apple Doc

I just added my comment in the PR review.

@Daydaylw3
Copy link
Contributor Author

Thank you for so quick react and patient :) 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants