Closed santanu-amit-team closed 2 years ago
What version of the PHP library is this? What version of PHP is this?
summarize_prepared_transaction
isn't a network call, meaning you're likely using a old version of this library.
PHP version 7.4.
We have used "composer require block_io-php/block_io-php" to download the composer
You're not using v2.0.x of the library -- there is no "block_io.php" anymore.
You need to follow instructions more clearly (see README and docs). Here's the composer.json
you need for your project:
{
"require":{
"block_io-php/block_io-php": "2.0.2",
"bitwasp/bitcoin": "dev-minimal"
},
"repositories": [
{
"type": "git",
"url": "https://github.com/doersf/bitcoin-php.git"
}
]
}
This will install v2.0.2 of the library, and use the proper bitcoin-php repository for its dependency.
When trying to install bitcoin-php it gives us this error https://prnt.sc/zOeJcYbkjL75
This is why you need to use the composer.json as provided above. The bitcoin-php repository needs to be doersf/bitcoin-php#dev-minimal.
Now able to install all the required settings. We are trying to implement bitcoin and dogecoin as payment on our website. Just to confirm this library will accept payment of bitcoin and dogecoin from any wallet right?
The library works for Bitcoin, Dogecoin, Litecoin, and their testnets.
While trying to process the transaction got this error. This is during the summarize_prepared_transaction call
Fatal error: Uncaught Error: Object of class stdClass could not be converted to string in /home/naturetrustus/public_html/test/vendor/block_io-php/block_io-php/lib/block_io.php:86 Stack trace:
0 /home/naturetrustus/public_html/test/vendor/block_io-php/block_io-php/lib/block_io.php(65): BlockIo->_request('summarize_prepa...', Object(stdClass))
1 /home/naturetrustus/public_html/test/test.php(63): BlockIo->__call('summarize_prepa...', Object(stdClass))
2 {main}
thrown in /home/naturetrustus/public_html/test/vendor/block_io-php/block_io-php/lib/block_io.php on line 86