Open phoglenix opened 3 years ago
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?
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!
Asked by @toniengelhardt: