TARKUS
TARKUS

Reputation: 2200

Error: uncaught exception: Invalid marketplace uri

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

(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.)

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.

Upvotes: 0

Views: 308

Answers (1)

Mahmoud Abdelkader
Mahmoud Abdelkader

Reputation: 24979

Did you take a look at this section? https://docs.balancedpayments.com/current/#including-and-initializing-balanced-js

Specifically:

<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>

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

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

Upvotes: 1

Related Questions