Can't get simple Coinbase button in Node to work

0 votes

I created an account on Coinbase.com, edited the Merchant profile and generated simple button code so that it should display a window and they'd manage the Bitcoin payment session.

I'm trying to add this to a Jade-rendered page.

Page:

//- Incoming params: title, user, message
extends layout
block content
  section.css-table
    section.one-column
      section.cell
        a(class="coinbase-button", data-code="SANDBOXDATACODE", data-button-style="custom_large", data-custom="Order Sat 03 21 2015 - Sample UserName", href="https://sandbox.coinbase.com/checkouts/SANDBOXDATACODE") Pay With Bitcoin
        block javascript
          script("src"="https://www.coinbase.com/assets/button.js")

Note that I'm attempting to connect to the sandbox rather than the live (www) server. Using www still doesn't work. The code is almost identical to the code they generated for me--I did have to change the JavaScript reference so that it would work correctly in Jade.

The button renders correctly after a two-second delay. Pressing the button darkens the window content in preparation to then (hopefully) displaying the popup window content with their form. It just never diplays.

Nothing from the button.js script prints anything to the console.log, btw. I've tried this from two different networks. I don't think my Windows firewall is blocking the outbound https attempt since it's pulling the JavaScript. Note also that I'm testing this locally: http://127.0.0.1:8080.

Any thoughts?

Sep 10, 2018 in Blockchain by slayer
• 29,040 points
16 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

Try this

//- Incoming params: title, user, message, ordernum, isProduction
extends layout
block content
  section.css-table
    section.one-column
      section.cell
        if (isProduction)
          iframe(id='coinbase_inline_iframe_PRODUCTIONDATACODE'
            src='https://www.coinbase.com/checkouts/PRODUCTIONDATACODE/inline?c=#{ordernum}'
            style='width: 460px; height: 380px; border: none; box-shadow: 0 1px 3px rgba(0,0,0,0.25);'
            allowtransparency='true'
            frameborder='0'
            align='center'
            )
        else
          iframe(id='coinbase_inline_iframe_SANDBOXDATACODE'
            src='https://sandbox.coinbase.com/checkouts/SANDBOXDATACODE/inline?c=#{ordernum}'
            style='width: 460px; height: 380px; border: none; box-shadow: 0 1px 3px rgba(0,0,0,0.25);'
            allowtransparency='true'
            frameborder='0'
            align='center'
            )
answered Sep 10, 2018 by digger
• 27,620 points

Related Questions In Blockchain

0 votes
1 answer

How to get Node URL in private ethereum network?

You have already noticed that  admin.peers does ...READ MORE

answered Jan 10 in Blockchain by Omkar
• 65,850 points
11 views
0 votes
1 answer

How to check the data integrity logic in proof of work mining?

The proof of work is actually works ...READ MORE

answered May 7, 2018 in Blockchain by Johnathon
• 9,050 points
20 views
0 votes
1 answer

How to get the already existing channels in Hyperledger v1.0?

You cannot see all available channels,  but you ...READ MORE

answered Jun 4, 2018 in Blockchain by Perry
• 16,450 points
81 views
0 votes
1 answer

How to get current block number in parity?

You can get the latest block number ...READ MORE

answered Jun 8, 2018 in Blockchain by Christine
• 15,790 points
136 views
0 votes
1 answer

Protocols used in a distributed/dlt system for the nodes to establish communication

yes all are over TCP/IP connections secured by TLS encryption in hashgraph architecture-hashgraph, ...READ MORE

answered Aug 6, 2018 in Blockchain by ariaholic
• 7,320 points
43 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
65 views
0 votes
1 answer
0 votes
1 answer

How to get property of non object in Coinbase API

First, your sendMoney() call is stored into ...READ MORE

answered Aug 31, 2018 in Blockchain by digger
• 27,620 points
21 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.