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

Clarify how to deal with devices/contexts where DGAPI is not supported #30

Open
phoglenix opened this issue Jul 8, 2021 · 2 comments
Open

Comments

@phoglenix
Copy link
Collaborator

phoglenix commented Jul 8, 2021

Asked by @toniengelhardt:

How do we handle purchases on devices that do not support the Digital Goods API, e.g. devices that do not use Chrome as default browser or a Chrome version that does not support the Digital Goods API? Is it PlayStore T&C conform to implement the Digtial Goods API and use it if the device supports it and otherwise fallback to an alternative payment provider, e.g. Stripe? If not, are there any solutions for this scenario?

@phoglenix
Copy link
Collaborator Author

phoglenix commented Jul 8, 2021

I've updated the first code snippet in the explainer to clarify the code side of this a bit. The very first step of using the API is to detect if it's available in the current browser/context. If it's not available then you would need to use an alternative payment provider.

I believe that Play would require a site to use the DGAPI whenever it is available (please check with Play - I can't give advice on their T&C). Currently, for sites enrolled in the DGAPI Origin Trial, the DGAPI is available with the Play Billing service URL iff the current site is installed from the Play Store.

Perhaps we should make something more explicit in the API, eg. (please forgive naming and half-baked idea):
DigitalGoodsService::isThisClientRequiredToUseThisService() -> bool
For a digital goods service from the Play Billing service URL, this method would always return true (because otherwise the service would be unavailable and you wouldn't have a DigitalGoodsService object to call the method).

Does that clarify things? Should I add some of this to the explainer?

@toniengelhardt
Copy link

Thanks for following up @phoglenix! I think the implementation is fine, my question really was more on the policy side. I'll get in touch with Play folks directly to clarify.

Thanks a lot!

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