Code Monkey home page Code Monkey logo

Comments (3)

rileyjalexander avatar rileyjalexander commented on September 26, 2024

Completely re-installed fresh source to ensure that there wasn't any issue on my end and still ended up with the same results so there is definitely a issue with code. Thank you in advance for looking into a solution. Can't wait to get this live :)

from blockchain-receive-payments-api-shopping-cart.

coinables avatar coinables commented on September 26, 2024

I am unable to recreate this error. It's likely an issue trying to initiate the handshake with blockchain.info.
Make sure your config.php file is filled out correctly (api key, xpub, root url, etc).

I made a video that should help getting set up with their receive payments API: https://www.youtube.com/watch?v=ASCz5uLs5EE

If the video doesn't help you can also try to debug what's going on.

Save the below code as a php file and run it in the same folder that you have all the files for this project. Tell me what it happens.

debug.php

<?php
require_once('config.php');
$orderID = 1;

//call blockchain info receive payments API
    $callback_url = $rootURL."/callback.php?invoice=".$orderID."&secret=".$secret;
    $receive_url = "https://api.blockchain.info/v2/receive?key=".$api_key."&xpub=".$xpub."&callback=".urlencode($callback_url);
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_URL, $receive_url);
    $ccc = curl_exec($ch);
    $json = json_decode($ccc, true);
        var_dump($json);
?>

from blockchain-receive-payments-api-shopping-cart.

rileyjalexander avatar rileyjalexander commented on September 26, 2024

For some reason when I entered the XPub, I had an extra " in the field. Thanks for helping me troubleshoot and find the issue!

from blockchain-receive-payments-api-shopping-cart.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.