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,370 points
1,518 views

2 answers to this question.

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
• 26,740 points
0 votes
Coinbase sandbox is best to have when you finally inside this platform.  Username and password via the coinbase platform. Good Luck!
answered May 21, 2020 by anonymous
• 140 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, 2019 in Blockchain by Omkar
• 69,220 points
1,856 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 8, 2018 in Blockchain by Johnathon
• 9,090 points
819 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
• 17,100 points
2,530 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
1,391 views
+1 vote
1 answer

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

yes all are over TCP/IP connections secured ...READ MORE

answered Aug 6, 2018 in Blockchain by aryya
• 7,460 points
1,463 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
1,947 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,473 views
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
• 26,740 points
773 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP