seegno / uphold-sdk-php Goto Github PK
View Code? Open in Web Editor NEWUphold PHP SDK
Home Page: http://seegno.com
Uphold PHP SDK
Home Page: http://seegno.com
I am now getting this:
PHP Fatal error: Uncaught exception 'Uphold\Exception\ConnectException' with message 'cURL error 35: error:14077438:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert internal error' in /lib/Uphold/HttpClient/Handler/ErrorHandler.php:49
Stack trace:
#0 lib/Uphold/HttpClient/HttpClient.php(142): Uphold\HttpClient\Handler\ErrorHandler->onException(Object(GuzzleHttp\Exception\ConnectException))
#1 lib/Uphold/HttpClient/HttpClient.php(87): Uphold\HttpClient\HttpClient->request('v0/ticker', NULL, 'GET', Array, Array)
#2 /lib/Uphold/UpholdClient.php(313): Uphold\HttpClient\HttpClient->get('v0/ticker', Array, Array)
#3 /lib/Uphold/UpholdClient.php(152): Uphold\UpholdClient->get('/ticker')
#4 /examples/Ticker.php(11): Uphold\UpholdClient->getRates()
#5 {main}
th in /lib/Uphold/HttpClient/Handler/ErrorHandler.php on line 49
Hi, I do not know why, but I am getting a different response from Uphold.
When I use createCard() method, I get this response:
[{"params":[],"normalized":[{"available":"0.00","balance":"0.00","currency":"USD"}],"wire":[{"accountName":"UPHOLD LDA","address":{"line1":"Rua Tenente Valadim 284","line2":"4100-476 Porto, Portugal"},"currency":"EUR","bic":"BBPIPTPL","iban":"PT50 0010 0000 5108 8690 0026 9","name":"Banco BPI"},{"accountName":"UPHOLD LDA","address":{"line1":"Rua Tenente Valadim 284","line2":"4100-476 Porto, Portugal"},"bic":"BBPIPTPL","currency":"GBP","iban":"PT50 0010 9999 5108 8690 6028 9","name":"Banco BPI"},{"accountName":"Uphold HQ, Inc.","accountNumber":"1463721","address":{"line1":"900 Broad Street","line2":"Newark, NJ 07102"},"bic":"CNNJUS33","currency":"USD","name":"City National Bank of New Jersey"}]}]
What can I do @nunorafaelrocha ? Thanks
I am getting this error at Mamp php 5.5.23
PHP Fatal error: Class 'GuzzleHttp\Message\MessageFactory' not found in ..... /lib/Uphold/HttpClient/Message/MessageFactory.php on line 13
I have tried "composer install -o" but didn't fix it. Could someone help me out?
Hello @nunorafaelrocha
I'm using Symfony 3.3 and I can't install the library with composer as it's asking for symfony/console: ~2.6
I can't downgrade to symfony/console: ~2.6
Any idea how to fix this ?
Thanks.
Hi, I need help please! I am getting this error and I don't know how to solve it. Thanks
in ErrorHandler.php line 49
at ErrorHandler->onException(object(ConnectException)) in HttpClient.php line 142
at HttpClient->request('v0/me', null, 'GET', array('Accept' => 'application/json', 'Content-Type' => 'application/json', 'User-Agent' => 'uphold-sdk-php v4.0.3 (https://github.com/seegno/uphold-sdk-php)', 'Authorization' => 'Bearer '), array('query' => array())) in HttpClient.php line 87
at HttpClient->get('v0/me', array(), array('Accept' => 'application/json', 'Content-Type' => 'application/json', 'User-Agent' => 'uphold-sdk-php v4.0.3 (https://github.com/seegno/uphold-sdk-php)', 'Authorization' => 'Bearer ')) in UpholdClient.php line 313
at UpholdClient->get('/me') in UpholdClient.php line 228
All collection endpoints will support Range Pagination Headers using Range & Content-Range entity-headers.
The currencies array on the user determines which currencies can be used to create cards. It would be nice to have this array exposed on the User model.
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package seegno/uphold-sdk-php could not be found in any version, there may ypo in the package name.
Potential causes:
Read https://getcomposer.org/doc/articles/troubleshooting.md for further common problems.
I wasn't sure if there was an issue or if the package is available via composer. Thanks!
object(Uphold\Paginator\Paginator)#91 (8) {
["client":protected]=>
object(Uphold\UpholdClient)#63 (3) {
["httpClient":"Uphold\UpholdClient":private]=>
object(Uphold\HttpClient\HttpClient)#64 (4) {
["client":protected]=>
object(GuzzleHttp\Client)#68 (5) {
["messageFactory":"GuzzleHttp\Client":private]=>
object(Uphold\HttpClient\Message\MessageFactory)#65 (3) {
["errorPlugin":"GuzzleHttp\Message\MessageFactory":private]=>
object(GuzzleHttp\Subscriber\HttpError)#66 (0) {
}
["redirectPlugin":"GuzzleHttp\Message\MessageFactory":private]=>
object(GuzzleHttp\Subscriber\Redirect)#67 (0) {
}
["customOptions":"GuzzleHttp\Message\MessageFactory":private]=>
array(0) {
}
}
["baseUrl":"GuzzleHttp\Client":private]=>
object(GuzzleHttp\Url)#69 (8) {
["scheme":"GuzzleHttp\Url":private]=>
string(5) "https"
["host":"GuzzleHttp\Url":private]=>
string(14) "api.uphold.com"
["port":"GuzzleHttp\Url":private]=>
NULL
["username":"GuzzleHttp\Url":private]=>
NULL
["password":"GuzzleHttp\Url":private]=>
NULL
["path":"GuzzleHttp\Url":private]=>
string(1) "/"
["fragment":"GuzzleHttp\Url":private]=>
NULL
["query":"GuzzleHttp\Url":private]=>
NULL
}
["defaults":"GuzzleHttp\Client":private]=>
array(5) {
["allow_redirects"]=>
bool(true)
["exceptions"]=>
bool(true)
["decode_content"]=>
bool(true)
["verify"]=>
bool(true)
["headers"]=>
array(1) {
["User-Agent"]=>
string(46) "Guzzle/5.3.0 curl/7.35.0 PHP/5.5.9-1ubuntu4.12"
}
}
["fsm":"GuzzleHttp\Client":private]=>
object(GuzzleHttp\RequestFsm)#77 (3) {
["handler":"GuzzleHttp\RequestFsm":private]=>
object(Closure)#76 (2) {
["static"]=>
array(2) {
["default"]=>
object(Closure)#75 (2) {
["static"]=>
array(2) {
["default"]=>
object(GuzzleHttp\Ring\Client\CurlHandler)#70 (4) {
["factory":"GuzzleHttp\Ring\Client\CurlHandler":private]=>
object(GuzzleHttp\Ring\Client\CurlFactory)#71 (0) {
}
["handles":"GuzzleHttp\Ring\Client\CurlHandler":private]=>
array(1) {
[4]=>
resource(4) of type (curl)
}
["ownedHandles":"GuzzleHttp\Ring\Client\CurlHandler":private]=>
array(1) {
[4]=>
bool(false)
}
["maxHandles":"GuzzleHttp\Ring\Client\CurlHandler":private]=>
int(5)
}
["streaming"]=>
object(GuzzleHttp\Ring\Client\StreamHandler)#74 (2) {
["options":"GuzzleHttp\Ring\Client\StreamHandler":private]=>
array(0) {
}
["lastHeaders":"GuzzleHttp\Ring\Client\StreamHandler":private]=>
NULL
}
}
["parameter"]=>
array(1) {
["$request"]=>
string(10) ""
}
}
["future"]=>
object(GuzzleHttp\Ring\Client\CurlMultiHandler)#72 (6) {
["factory":"GuzzleHttp\Ring\Client\CurlMultiHandler":private]=>
object(GuzzleHttp\Ring\Client\CurlFactory)#73 (0) {
}
["selectTimeout":"GuzzleHttp\Ring\Client\CurlMultiHandler":private]=>
int(1)
["active":"GuzzleHttp\Ring\Client\CurlMultiHandler":private]=>
NULL
["handles":"GuzzleHttp\Ring\Client\CurlMultiHandler":private]=>
array(0) {
}
["delays":"GuzzleHttp\Ring\Client\CurlMultiHandler":private]=>
array(0) {
}
["maxHandles":"GuzzleHttp\Ring\Client\CurlMultiHandler":private]=>
int(100)
}
}
["parameter"]=>
array(1) {
["$request"]=>
string(10) ""
}
}
["mf":"GuzzleHttp\RequestFsm":private]=>
object(Uphold\HttpClient\Message\MessageFactory)#65 (3) {
["errorPlugin":"GuzzleHttp\Message\MessageFactory":private]=>
object(GuzzleHttp\Subscriber\HttpError)#66 (0) {
}
["redirectPlugin":"GuzzleHttp\Message\MessageFactory":private]=>
object(GuzzleHttp\Subscriber\Redirect)#67 (0) {
}
["customOptions":"GuzzleHttp\Message\MessageFactory":private]=>
array(0) {
}
}
["maxTransitions":"GuzzleHttp\RequestFsm":private]=>
int(200)
}
["emitter":"GuzzleHttp\Client":private]=>
object(GuzzleHttp\Event\Emitter)#62 (2) {
["listeners":"GuzzleHttp\Event\Emitter":private]=>
array(0) {
}
["sorted":"GuzzleHttp\Event\Emitter":private]=>
array(0) {
}
}
}
["errorHandler":"Uphold\HttpClient\HttpClient":private]=>
object(Uphold\HttpClient\Handler\ErrorHandler)#78 (1) {
["options":"Uphold\HttpClient\Handler\ErrorHandler":private]=>
array(8) {
["message_factory"]=>
object(Uphold\HttpClient\Message\MessageFactory)#65 (3) {
["errorPlugin":"GuzzleHttp\Message\MessageFactory":private]=>
object(GuzzleHttp\Subscriber\HttpError)#66 (0) {
}
["redirectPlugin":"GuzzleHttp\Message\MessageFactory":private]=>
object(GuzzleHttp\Subscriber\Redirect)#67 (0) {
}
["customOptions":"GuzzleHttp\Message\MessageFactory":private]=>
array(0) {
}
}
["api_version"]=>
string(2) "v0"
["base_url"]=>
string(23) "https://api.uphold.com/"
["debug"]=>
bool(false)
["timeout"]=>
int(10)
["user_agent"]=>
string(67) "uphold-sdk-php {version} (https://github.com/seegno/uphold-sdk-php)"
["version"]=>
string(5) "4.0.0"
["bearer"]=>
string(40) "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
}
["headers":protected]=>
array(0) {
}
["options":protected]=>
array(8) {
["message_factory"]=>
object(Uphold\HttpClient\Message\MessageFactory)#65 (3) {
["errorPlugin":"GuzzleHttp\Message\MessageFactory":private]=>
object(GuzzleHttp\Subscriber\HttpError)#66 (0) {
}
["redirectPlugin":"GuzzleHttp\Message\MessageFactory":private]=>
object(GuzzleHttp\Subscriber\Redirect)#67 (0) {
}
["customOptions":"GuzzleHttp\Message\MessageFactory":private]=>
array(0) {
}
}
["api_version"]=>
string(2) "v0"
["base_url"]=>
string(23) "https://api.uphold.com/"
["debug"]=>
bool(false)
["timeout"]=>
int(10)
["user_agent"]=>
string(67) "uphold-sdk-php {version} (https://github.com/seegno/uphold-sdk-php)"
["version"]=>
string(5) "4.0.0"
["bearer"]=>
string(40) "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
}
["reserve":"Uphold\UpholdClient":private]=>
NULL
["options":"Uphold\UpholdClient":private]=>
array(7) {
["api_version"]=>
string(2) "v0"
["base_url"]=>
string(23) "https://api.uphold.com/"
["debug"]=>
bool(false)
["timeout"]=>
int(10)
["user_agent"]=>
string(67) "uphold-sdk-php {version} (https://github.com/seegno/uphold-sdk-php)"
["version"]=>
string(5) "4.0.0"
["bearer"]=>
string(40) "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
}
["count":protected]=>
NULL
["model":protected]=>
string(24) "Uphold\Model\Transaction"
["path":protected]=>
string(16) "/me/transactions"
["parameters":protected]=>
array(0) {
}
["headers":protected]=>
array(0) {
}
["offset":protected]=>
int(0)
["limit":protected]=>
NULL
}
I'm not sure why it's not working. I have tested with card transactions as well and have the same issue. I can verify that transactions do exist and that they have been commited and filled. Please let me know if you need anything else. (I've removed my bearer key)
We need to move the place where we keep the access token. Instead of saving the access token on the BitreserveClient
, we need to keep the access token on the user model.
That way we can only use one instance of BitreserveClient
with multiple users and the access token will be in a place where it makes more sense.
We could start implement tests using Peridot
Add a new section called "Tests" with the install and phpunit commands.
We could add a method to retrieve an user card by address.
I need to send BTC to many people. So I want to know that can I use any external bitcoin address while committing a new transaction?
Add a console command to create personal access tokens
We need to rename the return value of getTickers
to rates
.
Replace all array_reduce
implementations that should be using array_map
instead.
Hi, in Readme says getCardsById('ade869d8-7913-4f67-bb4d-72719f0a2be0'); but I think that it would say getCardById('ade869d8-7913-4f67-bb4d-72719f0a2be0'); (no s in getCardById).
It would be useful to add the possibility to get a card using its address too.
We need to add the option to create and commit a transaction in a single request using the paremeter commit=true
in the URL.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.