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

Adding unified receipt to the Apple S2S notification #101

Merged
merged 4 commits into from
Nov 25, 2019

Conversation

mlesar
Copy link
Contributor

@mlesar mlesar commented Nov 25, 2019

Apple added a new property unified_receipt to their S2S notification that should be used instead of existing properties:
https://developer.apple.com/news/?id=11222019a
https://developer.apple.com/documentation/appstoreservernotifications/unified_receipt

Also, added some missing properties to InApp and new DID_RECOVER notification type that should be used instead of RENEWAL.

@codecov
Copy link

codecov bot commented Nov 25, 2019

Codecov Report

Merging #101 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #101   +/-   ##
=======================================
  Coverage   90.36%   90.36%           
=======================================
  Files           4        4           
  Lines         249      249           
=======================================
  Hits          225      225           
  Misses         16       16           
  Partials        8        8
Impacted Files Coverage Δ
appstore/model.go 100% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3d3bd2b...1bd9924. Read the comment docs.

Environment NotificationEnvironment `json:"environment"`

LatestReceipt string `json:"latest_receipt"`
LatestReceiptInfo []NotificationReceipt `json:"latest_receipt_info"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your PR :-)

The document says that unified_receipt has this receipt(not S2S notification's receipt).

So you should use InApp struct instead of NotificationReceipt.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, thank you!
This is fixed now.

@leearmstrong
Copy link
Contributor

LGTM - Would be nice to get this added to a release ASAP

Copy link
Contributor

@jun06t jun06t left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot :-)

@jun06t jun06t merged commit b31646b into awa:master Nov 25, 2019
@leearmstrong
Copy link
Contributor

Amazing thanks!

Can we get a release published and tagged for module usage?

@mlesar mlesar deleted the unified_receipt branch November 25, 2019 20:37
@jun06t
Copy link
Contributor

jun06t commented Nov 29, 2019

@leearmstrong
I'm sorry for late reply.
I've just released :-)

@leearmstrong
Copy link
Contributor

Amazing, thank you

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

Successfully merging this pull request may close these issues.

None yet

3 participants