Git Product home page Git Product logo

uphold-sdk-php's People

Contributors

arevalomalina avatar byrnereese avatar fixe avatar joaonice avatar kratos-42 avatar nunofgs avatar nunorafaelrocha avatar ruimarinho avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

uphold-sdk-php's Issues

Error in example: "Create and commit a new transaction"

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.

FATAL Error

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?

cURL error 35: SSL connect error

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

Bad response from createCard()

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

Issue when adding to composer.

: composer update

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!

Implement access token on user model

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.

Add support for pagination

All collection endpoints will support Range Pagination Headers using Range & Content-Range entity-headers.

Model/User.php getTransactions() does not get transactions

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)

Guzzle 6 support

  • seegno/uphold-sdk-php 5.0.1 requires guzzlehttp/guzzle ~5.1 -> satisfiable by guzzlehttp/guzzle[5.1.0, 5.2.0, 5.3.0, 5.3.1, 5.3.2, 5.3.x-dev] but these conflict with your requirements or minimum-stability.

PHP Fatal error:

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

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.