"Buy with Amazon" button not working

Permalink
If I paste their code into a block as HTML type or a CONTENT type, then hit the HTML tab in the editor, I can SEE the button, but hovering and clicking do nothing.

What do I have to do to make the button function properly in concrete5 with the Slate theme?

Here's the code they gave, with the merchant ID XXXXXX'ed out, and the huged hashed string of RenderCBAButton cut out.


<p><img src="https://payments.amazon.com/gp/cba/button?cartOwnerId=XXXXXXXXXXXXXX&size=large&color=orange&background=white" alt="" /></p>
<p><!-- RenderCBAButton = function(ordervalue) { var standard1 = new CBA.Widgets.StandardCheckoutWidget({ merchantId: "XXXXXXXXXXXXXXX", orderInput: { format: "XML", value: ordervalue} }).render("cbaxmlButton"); } // --></p>
<table>
<tbody>
<tr>
<td><!-- RenderCBAButton("type:cba-signed-order/sha1-hmac/2;order:<GIANT HASHED STRING HERE>"); // --></td>
</tr>
</tbody>
</table>

 
goutnet replied on at Permalink Reply
Please enclose your code in a [ code ] [ /code ] block (remove spaces)

That said, this code looks strange :

<p><img src="https://payments.amazon.com/gp/cba/button?cartOwnerId=XXXXXXXXXXXXXX&size=large&color=orange&background=white" alt="" /></p>
<p>
<script type="text/javascript">
RenderCBAButton = function(ordervalue) { var standard1 = new CBA.Widgets.StandardCheckoutWidget({ merchantId: "XXXXXXXXXXXXXXX", orderInput: { format: "XML", value: ordervalue} }).render("cbaxmlButton"); }
//
</script>
</p>
<table>
<tbody>
<tr>
<td><script type="text/javascript">RenderCBAButton("type:cba-signed-order/sha1-hmac/2;order:<GIANT HASHED STRING HERE>");</script></td>
</tr>
</tbody>
</table>


Might be better ?

(and this code seems to require a CBA object to be present, maybe you also need to include a js script for that :/ )

just googling, made me find a few answers, you probably need to add this as well :

<script type="text/javascript" src="https://static-na.payments-amazon.com/cba/js/us/PaymentWidgets.js"></script>
<script>
gaijin4life replied on at Permalink Reply
Changing it this way locks up concrete5 with the "thinking circle" and I have to delete the block to stop it.
goutnet replied on at Permalink Reply
This is probably due to some kind or javascript error.

You should look at the messages on the console, if you are using Chrome, open the developers tools (Shift+Ctl+I), under firefox, you should install (if not done already) the firebug extension.

Once you have the error, you will be able to fix it.
gaijin4life replied on at Permalink Reply
Got it. Just remade the button with Amazon. For some reason the code came out almost completely different the second time. Now it works!

Thanks.