google-chrome - Google 付款、Chrome 扩展应用内购买出现意外错误

标签 google-chrome in-app-purchase

我正在开发一个 Chrome 扩展程序,我希望允许用户进行应用内购买。

我的扩展程序已部署在 Chrome 商店中,并且“应用内”购买将在新版本(我正在开发的版本)上提供。

嗯,我在购买时遇到了困难:Google 付款页面已显示,但我想购买该选项,但我收到“意外错误”,并且无法获取有关此错误的更多详细信息。 :-(

Error I got when purchasing

到目前为止我已经做了什么: 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 帐户并尝试使用这个帐户...效果很好...

关于google-chrome - Google 付款、Chrome 扩展应用内购买出现意外错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41592545/

相关文章:

javascript - Chrome MJPEG CORS "invalid response"当 img.crossOrigin ="Anonymous"

google-chrome - Chrome 搜索引擎具有 "I feel lucky"被重定向通知破坏

ios - 应用内购买是 “in review”,而应用二进制文件本身仍然是 “waiting for review”?这是什么意思?

ios - 如何检索已购买内容的 SKDownload

ios - 在InApp购买中显示年度价格Swift iOS

html - 从 Chrome 迁移到 IE11 的主要样式问题

javascript - 使用 ESM 在浏览器中动态或静态导入 json

iOS应用内购买自动续订订阅: how do we compute the renewal duration?

iphone - 不使用 iTunes Connect 进行应用内购买?

node.js - 使用 Nodejs 在 Chrome 中进行双重请求