【发布时间】:2017-05-26 08:13:07
【问题描述】:
我正在开发一个 Chrome 扩展程序,我希望允许用户进行应用内购买。
我的扩展程序已经部署在 Chrome 商店中,“应用内”购买将在新版本(我正在开发的版本)上可用。
好吧,我正在为购买而苦恼:显示了 Google 付款页面,但我想购买该选项,我收到“意外错误”并且无法获得有关此错误的更多详细信息。 :-(
到目前为止我做了什么: https://developer.chrome.com/webstore/payments-iap
- 我已经导入了 buy.js 并实现了所有需要的功能。
- 我已经设置了一个 Google Merchant 付款帐户(甚至在收到 Google 发送的小额款项后验证了我的帐户)
我不知道出了什么问题...似乎付款流程的最后一部分确实失败了,但无法获得有关正在发生的事情的更多信息。
我什至激活了 Chrome 调试日志,但数据不是很有用(至少对我来说......) 日志涵盖从“购买按钮单击”、“购买”按钮单击、错误和关闭窗口的流程:
[6668:6168:0112/001148:VERBOSE1:cross_device_promo.cc(180)] CrossDevicePromo::MaybeBrowsingSessionStarted; Ineligible for promo.
[6668:6168:0112/001148:VERBOSE1:cross_device_promo.cc(180)] CrossDevicePromo::MaybeBrowsingSessionStarted; Ineligible for promo.
[6668:6168:0112/001150:VERBOSE1:mutable_profile_oauth2_token_service_delegate.cc(216)] MutablePO2TS::RefreshTokenIsAvailable
[6624:7432:0112/001150:VERBOSE1:script_context.cc(111)] Created context:
extension id: nmmhkkegccagdldgiimedpiccmgmieda
frame: 5A2F7394
URL:
context_type: BLESSED_EXTENSION
effective extension id: nmmhkkegccagdldgiimedpiccmgmieda
effective context type: BLESSED_EXTENSION
[6624:7432:0112/001150:VERBOSE1:script_context.cc(111)] Created context:
extension id: (none)
frame: 00000000
URL:
context_type: UNSPECIFIED
effective extension id: (none)
effective context type: UNSPECIFIED
[6624:7432:0112/001150:VERBOSE1:dispatcher.cc(395)] Num tracked contexts: 2
[2160:3460:0112/001150:VERBOSE1:gles2_cmd_decoder.cc(3205)] GL_OES_packed_depth_stencil supported.
[6624:7432:0112/001150:VERBOSE1:htmlpluginelement.cpp(514)] OBJECT id="browser-plugin-8" style="width: 100%; height: 100%;" Plugin URL: <null>
[6624:7432:0112/001150:VERBOSE1:htmlpluginelement.cpp(515)] Loaded URL: <null>
[2160:3460:0112/001150:VERBOSE1:gles2_cmd_decoder.cc(3205)] GL_OES_packed_depth_stencil supported.
[8032:536:0112/001150:INFO:systeminfo.cc(82)] Available number of cores: 4
[2160:3460:0112/001150:VERBOSE1:gles2_cmd_decoder.cc(3205)] GL_OES_packed_depth_stencil supported.
[2160:3460:0112/001150:VERBOSE1:gles2_cmd_decoder.cc(3205)] GL_OES_packed_depth_stencil supported.
[8032:536:0112/001150:VERBOSE1:script_context.cc(111)] Created context:
extension id: nmmhkkegccagdldgiimedpiccmgmieda
frame: 2CE619DC
URL:
context_type: CONTENT_SCRIPT
effective extension id: nmmhkkegccagdldgiimedpiccmgmieda
effective context type: CONTENT_SCRIPT
[8032:536:0112/001150:VERBOSE1:script_context.cc(111)] Created context:
extension id: (none)
frame: 00000000
URL:
context_type: UNSPECIFIED
effective extension id: (none)
effective context type: UNSPECIFIED
[8032:536:0112/001150:VERBOSE1:dispatcher.cc(395)] Num tracked contexts: 1
[8032:536:0112/001150:VERBOSE1:script_context.cc(111)] Created context:
extension id: (none)
frame: 2CE619DC
URL:
context_type: WEB_PAGE
effective extension id: (none)
effective context type: WEB_PAGE
[8032:536:0112/001150:VERBOSE1:script_context.cc(111)] Created context:
extension id: (none)
frame: 00000000
URL:
context_type: UNSPECIFIED
effective extension id: (none)
effective context type: UNSPECIFIED
[8032:536:0112/001150:VERBOSE1:dispatcher.cc(395)] Num tracked contexts: 2
[6668:6168:0112/001150:INFO:CONSOLE(325)] "did exec once", source: chrome-extension://nmmhkkegccagdldgiimedpiccmgmieda/craw_window.js (325)
[6668:6168:0112/001151:INFO:CONSOLE(176)] "[object XMLHttpRequest]", source: chrome-extension://nmmhkkegccagdldgiimedpiccmgmieda/craw_window.js (176)
[6668:6168:0112/001151:INFO:CONSOLE(1)] "registered payment listener: 1484140311054", source: https://www.google.com/intl/en-US/chrome/blank.html (1)
[6668:6168:0112/001151:INFO:CONSOLE(1)] "finished loading, start payment: 1484140311057", source: https://www.google.com/intl/en-US/chrome/blank.html (1)
[6668:6168:0112/001151:VERBOSE1:render_process_host_impl.cc(2402)] Blocked URL about:blank
[6668:6168:0112/001151:VERBOSE1:render_process_host_impl.cc(2402)] Blocked URL about:blank
[6668:6168:0112/001151:VERBOSE1:render_process_host_impl.cc(2402)] Blocked URL about:blank
[6668:6168:0112/001151:VERBOSE1:render_process_host_impl.cc(2402)] Blocked URL about:blank
[6668:6168:0112/001151:VERBOSE1:render_process_host_impl.cc(2402)] Blocked URL about:blank
[6668:6168:0112/001151:VERBOSE1:render_process_host_impl.cc(2402)] Blocked URL about:blank
[6668:6168:0112/001151:VERBOSE1:render_process_host_impl.cc(2402)] Blocked URL about:blank
[6668:6168:0112/001151:VERBOSE1:render_process_host_impl.cc(2402)] Blocked URL about:blank
[8032:536:0112/001151:VERBOSE1:script_context.cc(111)] Created context:
extension id: (none)
frame: 2CE66704
URL:
context_type: WEB_PAGE
effective extension id: (none)
effective context type: WEB_PAGE
[8032:536:0112/001151:VERBOSE1:script_context.cc(111)] Created context:
extension id: (none)
frame: 00000000
URL:
context_type: UNSPECIFIED
effective extension id: (none)
effective context type: UNSPECIFIED
[8032:536:0112/001151:VERBOSE1:dispatcher.cc(395)] Num tracked contexts: 3
[2160:3460:0112/001151:VERBOSE1:gles2_cmd_decoder.cc(3205)] GL_OES_packed_depth_stencil supported.
[6668:8968:0112/001151:VERBOSE1:mime_sniffing_resource_handler.cc(351)] To buffer: https://payments.google.com/payments/jslogs?message=1484140311084-hz693q2xx3xx-INFO-embedder%3Ano_id%3Aloading%20iframe%20with%20URL%20https%3A%2F%2Fpayments.google.com%2Fpayments%2Foauth%2Fembedded%2Fbuy_flow%3Fwst%3D1489999999999%26cst%3D1484140311072%26ipi%3Dhz693q2xx3xx%26hostOrigin%3DaHR0cHM6Ly93d3cuZ29vZ2xlLmNvbQ..%26mm%3De%26style%3Dpc%253D%2523FF0000%253Bac%253D%25230000FF%26ait%3DGAIA%26cn%3D%2524p_kpocjpn7rrfr0-%5Bhttps%3A%2F%2Fwww.google.com%2Fintl%2Fen-US%2Fchrome%2Fblank.html%5D&zx=nm2hae7wm29o
[8032:536:0112/001151:VERBOSE1:dispatcher.cc(534)] Num tracked contexts: 2
[8032:536:0112/001151:VERBOSE1:script_context.cc(111)] Created context:
extension id: (none)
frame: 2CE66704
URL:
context_type: WEB_PAGE
effective extension id: (none)
effective context type: WEB_PAGE
[8032:536:0112/001151:VERBOSE1:script_context.cc(111)] Created context:
extension id: (none)
frame: 00000000
URL:
context_type: UNSPECIFIED
effective extension id: (none)
effective context type: UNSPECIFIED
[8032:536:0112/001151:VERBOSE1:dispatcher.cc(395)] Num tracked contexts: 3
[8032:536:0112/001151:VERBOSE1:script_context.cc(120)] Destroyed context for extension
extension id:
effective extension id:
[8032:536:0112/001151:VERBOSE1:script_context.cc(120)] Destroyed context for extension
extension id:
effective extension id:
[6668:6168:0112/001153:INFO:CONSOLE(326)] "[object MessageEvent]", source: chrome-extension://nmmhkkegccagdldgiimedpiccmgmieda/craw_window.js (326)
[6668:6168:0112/001153:INFO:CONSOLE(326)] "[object MessageEvent]", source: chrome-extension://nmmhkkegccagdldgiimedpiccmgmieda/craw_window.js (326)
[6668:8968:0112/001153:VERBOSE1:mime_sniffing_resource_handler.cc(351)] To buffer: https://payments.google.com/payments/jslogs?message=1484140313421-hz693q2xx3xx-INFO-embedded%3Ano_id%3Aiframe%20ready%20message%20sent-%5Bhttps%3A%2F%2Fpayments.google.com%2Fpayments%2Foauth%2Fembedded%2Fbuy_flow%3Fwst%3D1489999999999%26cst%3D1484140311072%26ipi%3Dhz693q2xx3xx%26hostOrigin%3DaHR0cHM6Ly93d3cuZ29vZ2xlLmNvbQ..%26mm%3De%26style%3Dpc%253D%2523FF0000%253Bac%253D%25230000FF%26ait%3DGAIA%26cn%3D%2524p_kpocjpn7rrfr0%5D&zx=3wrtmrrm4ztl
[6668:6168:0112/001153:INFO:CONSOLE(326)] "[object MessageEvent]", source: chrome-extension://nmmhkkegccagdldgiimedpiccmgmieda/craw_window.js (326)
[6668:8968:0112/001153:VERBOSE1:mime_sniffing_resource_handler.cc(351)] To buffer: https://payments.google.com/payments/jslogs?message=1484140313437-hz693q2xx3xx-INFO-embedder%3Ano_id%3Aiframe%20with%20URL%20https%3A%2F%2Fpayments.google.com%2Fpayments%2Foauth%2Fembedded%2Fbuy_flow%3Fwst%3D1489999999999%26cst%3D1484140311072%26ipi%3Dhz693q2xx3xx%26hostOrigin%3DaHR0cHM6Ly93d3cuZ29vZ2xlLmNvbQ..%26mm%3De%26style%3Dpc%253D%2523FF0000%253Bac%253D%25230000FF%26ait%3DGAIA%26cn%3D%2524p_kpocjpn7rrfr0%20is%20ready-%5Bhttps%3A%2F%2Fwww.google.com%2Fintl%2Fen-US%2Fchrome%2Fblank.html%5D&zx=r8gnj6edd97y
[8032:536:0112/001154:VERBOSE1:htmlpluginelement.cpp(514)] EMBED Plugin URL: "https://clients2.google.com/gr/GrDataFetcher.swf"
[8032:536:0112/001154:VERBOSE1:htmlpluginelement.cpp(515)] Loaded URL: "https://clients2.google.com/gr/GrDataFetcher.swf"
[6668:6168:0112/001156:INFO:CONSOLE(326)] "[object MessageEvent]", source: chrome-extension://nmmhkkegccagdldgiimedpiccmgmieda/craw_window.js (326)
[6668:6168:0112/001158:VERBOSE1:cross_device_promo.cc(180)] CrossDevicePromo::MaybeBrowsingSessionStarted; Ineligible for promo.
[6668:6168:0112/001158:VERBOSE1:cross_device_promo.cc(180)] CrossDevicePromo::MaybeBrowsingSessionStarted; Ineligible for promo.
[6668:6168:0112/001158:INFO:CONSOLE(52)] "onPurchaseFailed", source: chrome-extension://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/scripts/buy.js (52)
[6668:6168:0112/001158:INFO:CONSOLE(59)] "Purchase failed. PURCHASE_CANCELED", source: chrome-extension://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/scripts/buy.js (59)
[6624:7432:0112/001158:VERBOSE1:dispatcher.cc(534)] Num tracked contexts: 1
[6624:7432:0112/001158:VERBOSE1:script_context.cc(120)] Destroyed context for extension
extension id: nmmhkkegccagdldgiimedpiccmgmieda
effective extension id: nmmhkkegccagdldgiimedpiccmgmieda
[6624:7432:0112/001158:VERBOSE1:script_context.cc(120)] Destroyed context for extension
extension id:
effective extension id:
(我更改了代码中的一些 id 以消除潜在的个人信息)
您知道可能是什么问题吗?有什么方法可以获取有关失败的“后端”处理的更多详细信息?是否有关于配置和检查内容的更全面的文档?
提前致谢!
【问题讨论】:
标签: google-chrome in-app-purchase