错误:未捕获的异常:无效的市场uri [英] Error: uncaught exception: Invalid marketplace uri

查看:92
本文介绍了错误:未捕获的异常:无效的市场uri的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好吧,看来我是S.O中的第一人.社区发布带有均衡付款标签的问题.

well, it looks like I'm the first in the S.O. community to post a question with a balancedpayments tag.

我最近开始用平衡付款进行开发.我

I recently began developing with balancedpayments. I

  • created a test marketplace,
  • added a "webhook" uri still pending, in the form of: https://www.mydomain.com/main/balancedpayments (maybe this is the problem?)
  • referring to documentation url [balanced.js][1] I added this to my page head section:

<script type="text/javascript" src="https://js.balancedpayments.com/v1/balanced.js"></script>
<script type="text/javascript">
    balanced.init('main/balancedpayments/TEST-MP4IaoKYeyteVLTY0nphZijM');
</script>

(在正文中,我制作了一个标准的html表单,在表单上方,我使用了balanced.js页面上的示例jquery东西添加了一个javascript部分,如上面所链接的,我没有将该部分发布为现在,因为它似乎与我最初的js错误无关.)

(In the body, I have made a standard html form, and above the form I added a javascript section using the example jquery stuff found on the balanced.js page, as linked above, I'm not posting that part for now, because it doesn't appear to be related to my initial js error.)

当文档准备就绪时,并且在我填写或提交表单之前,我会收到以下js错误: 时间戳记:2013年11月29日下午12:09:53 错误:未捕获的异常:无效的市场uri"main/balancedpayments/TEST-MP4IaoKYeyteVLTY0nphZijM"

When the document is ready, and before I ever fill in or submit the form, I get this js error: Timestamp: 11/29/2013 12:09:53 PM Error: uncaught exception: Invalid marketplace uri "main/balancedpayments/TEST-MP4IaoKYeyteVLTY0nphZijM"

我将提供所要求的其他信息.

I will provide any additional information requested.

推荐答案

您是否看过本节? https://docs.balancedpayments.com/current/#includes-and -initializing-balanced-js

特别是:

<script type="text/javascript">
    balanced.init('${REPLACE_THIS_WITH_YOUR_MARKETPLACE_URI}');
</script>
Example:

<script type="text/javascript">
    balanced.init('/v1/marketplaces/TEST-MP5JtbXVDZkSGruOJyNasPqy');
</script>

您可以从仪表板中找到您的API密钥秘密和市场URI.您会注意到市场URI以/v1/....开头,因此在这种情况下,您的市场URI为:/v1/marketplaces/TEST-MP4IaoKYeyteVLTY0nphZijM

You can find your API key secret and marketplace URI from your dashboard. You will notice that marketplace URIs start with /v1/.... so in this case, your marketplace URI is: /v1/marketplaces/TEST-MP4IaoKYeyteVLTY0nphZijM

有一个实时提琴供您试用, http://jsfiddle.net/balanced/ZwhrA/,该链接可从文档中链接到.

There's a live fiddle for you to try it out, http://jsfiddle.net/balanced/ZwhrA/, which is linked to from the documentation.

这篇关于错误:未捕获的异常:无效的市场uri的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆