Giter Site home page Giter Site logo

php-sdk's People

Contributors

akalichety-hw avatar akreisman-epam avatar akswaminathan-pp-dev avatar andrej-griniuk avatar apryzhkov-epam avatar arao6 avatar aseveryn-hw avatar asingh-hw avatar bolynykhw avatar dyurchenko-epam avatar fkrauthan-hyperwallet avatar gmeyer-hw avatar grmeyer-hw-dev avatar hlahlou-pp-dev avatar igusar-epam avatar jchanghw avatar jkurra-hw avatar madhankumar3103 avatar ramahalingam avatar rhunterduvar-hw-dev avatar romeritocl avatar rrathinasabapath avatar rukaelin avatar skambar110 avatar specialtactics avatar whersbach-hw avatar wmews-hw avatar yherasym-hw avatar

Stargazers

 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

php-sdk's Issues

ruby gem/sdk

Is it in the process of being built?

If it would accelerate the process my team would be happy to contribute, instead of us building a version and you guys building a version of the gem.

PHPUnit error with PHP 8.1.1

I am doing some tests in a project using PHP 8.1.1 (Symfony 5.4 based project) and this is the error I get

..PHP Fatal error:  During inheritance of Countable: Uncaught Return type of Hyperwallet\Response\ErrorResponse::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

The weird thing is that ErrorResponse implements \Countable and count() returns an integer

WebhookNotification object payload parsed incorrectly

I'm using version 1.6.3 of the SDK

The constructor of WebhookNotification.php appears to parse the object payload incorrectly for a number of webhooks.

It assumes that any webhook type starting with 'USER' will have an object of type User. This appears to be incorrect for webhooks for different payment method events.

For example, for a webhook of type USERS.VENMO_ACCOUNTS.CREATED, I get an object with the following structure:

‌‌print_r($properties['object'], true);
‌Array
(
    [token] => trm-REDACTED
    [type] => VENMO_ACCOUNT
    [status] => ACTIVATED
    [createdOn] => 2021-05-28T15:36:53
    [transferMethodCountry] => US
    [transferMethodCurrency] => USD
    [accountId] => REDACTED
    [userToken] => usr-REDACTED
)

Using v4 to create an user but getting error as WALLET_CREATION_EXCEPTION

I've tried to create an user using the sample input but getting error as WALLET_CREATION_EXCEPTION

An error has occurred and the account(s) was not created.||invalidIssuerForWalletCreation

require_once ('./vendor/autoload.php');

$client = new \Hyperwallet\Hyperwallet("restapiuser@xxxxx", "xxxxxx", null, "https://api.sandbox.hyperwallet.com");

$user = new \Hyperwallet\Model\User();
$user
  ->setProgramToken("prg-xxxxx")  
  ->setClientUserId('test-client-id-1')
  ->setProfileType(\Hyperwallet\Model\User::PROFILE_TYPE_INDIVIDUAL)
  ->setFirstName('Daffyd')
  ->setLastName('y Goliath')
  ->setEmail('[email protected]')
  ->setAddressLine1('123 Main Street')
  ->setCity('Austin')
  ->setStateProvince('TX')
  ->setCountry('US')
  ->setPostalCode('78701');

try {
    $createdUser = $client->createUser($user);
} catch (\Hyperwallet\Exception\HyperwalletException $e) {
    // Add error handling here
    // var_dump($e->getErrorResponse());
    // var_dump($e->getErrorResponse()->getErrors());
    foreach ($e->getErrorResponse()->getErrors() as $error) {
        echo "\n------\n";
        echo $error->getFieldName()."\n";
        echo $error->getCode()."\n";
        echo $error->getMessage()."\n";
    }
}

Could not communicate with the Rest API

I'm using the Hyperwallet SDK V3, it works so far, and just got a sudden error as:

Could not communicate with https://api.paylution.com/rest/v3/users/

Do you have any idea about this error?

Remove unsupported versions of PHP from unit tests, move towards PHP 8

PHP versions 5.6 and 7.0 haven't had security support - let alone feature support for many years, and contain serious security vulnerabilities. HHVM is not an official build of php, and the entire php ecosystem moved on from it a decade ago.

I propose these versions of PHP be removed from the unit testing, and meanwhile newer versions which are supported added. Furthermore, you should begin on working on PHP 8 support. These items are extremely necessary for us at Cover Genius.

If some clients wish to use those PHP versions they would still be able to do so using current tags, so there should be zero issues with that for legacy installations.

However as the PHP ecosystem has long moved forward, you need to be moving with it, otherwise you are creating a blocker for other clients like us, who are unable to use your SDK with an up to date stack.

This is currently a blocker for #73

Cannot install on Laravel 8

I got an issue when tried to install with Laravel 8.

- Can only install one of: guzzlehttp/guzzle[7.2.0, 6.5.x-dev]. - Can only install one of: guzzlehttp/guzzle[6.5.x-dev, 7.2.0]. - Can only install one of: guzzlehttp/guzzle[6.5.x-dev, 7.2.0]. - hyperwallet/sdk 2.1.0 requires guzzlehttp/guzzle ^6.2.1 -> satisfiable by guzzlehttp/guzzle[6.5.x-dev]. - Installation request for hyperwallet/sdk ^2.1 -> satisfiable by hyperwallet/sdk[2.1.0]. - Installation request for guzzlehttp/guzzle (locked at 7.2.0, required as ^7.0.1) -> satisfiable by guzzlehttp/guzzle[7.2.0].

Please help to check and upgrade the guzzlehttp/guzzle to version 7.x

Help

Cant commit my .gitignore file

PHP 8 support

Hello

PHP 7.x is no longer supported, we really need to move to PHP 8, and this SDK is blocking us

PHP 8 + v2.2.2 - Error: The information entered does not match our records. Please try again.

Running the same code under the following package combination works without error or issue on PHP 8.1.

"php": "^8.0",
"guzzlehttp/guzzle": "^6.0",
"hyperwallet/sdk": "^1.3",
"laravel/framework": "^8.0"

However, the following package combination produces an almost instant error response of Error: The information entered does not match our records. Please try again.

"php": "^8.1",
"guzzlehttp/guzzle": "7.4.5",
"hyperwallet/sdk": "^2.2.2",
"laravel/framework": "^8.0"

The stack trace points to at vendor/hyperwallet/sdk/src/Hyperwallet/Util/ApiClient.php:198

I've tried different combinations of Guzzle, PHP, and the HyperWallet SDK without any luck.

Any ideas?

Non-json server error throws php error

Hi,

Found an issue with the error reporting, on this line in particular:

$body = \GuzzleHttp\json_decode($e->getResponse()->getBody(), true);

We've got some errors returned in plain HTML, which (obviously) failed to be json_decoded

Screen Shot 2020-02-11 at 9 49 25 pm

This might be a server issue more than the SDK, however that would be good to be able to handle a non-json error as well, as for not it just throws a PHP error, and I had to manually edit the package on prod to be able to see what was happening

Cheers,

Null pointer exception

We are using your SDK and at the mentioned line, a null pointer exception occurred.
$errorResponse[0] is null, so calling a method on it fails.

parent::__construct($errorResponse[0]->getMessage(), null, $previous);

here is the stack trace:

Uncaught Error: Call to a member function getMessage() on null in ***/vendor/hyperwallet/sdk/src/Hyperwallet/Exception/HyperwalletApiException.php:26
Stack trace:
#0 ***/vendor/hyperwallet/sdk/src/Hyperwallet/Util/ApiClient.php(145): Hyperwallet\Exception\HyperwalletApiException->__construct(Object(Hyperwallet\Response\ErrorResponse), Object(GuzzleHttp\Exception\ServerException))
#1 ***/vendor/hyperwallet/sdk/src/Hyperwallet/Util/ApiClient.php(107): Hyperwallet\Util\ApiClient->doRequest('GET', '/rest/v3/transf...', Array, Array)
#2 ***/vendor/hyperwallet/sdk/src/Hyperwallet/Hyperwallet.php(1347): Hyperwallet\Util\ApiClient->doGet('/rest/v3/transf...', Array, Array)
#3

User Model is missing businessType constants

Hello 🙂

while I was trying to implement a matching algorithm between Hyperwallet businessType values and organization types in German Law, I found that the User model is missing some businessType constants.

According to the API v4 documentation here: https://docs.hyperwallet.com/content/api/v4/resources/users/retrieve
A User of profileType = BUSINESS can have the following businessTypes:

  • CORPORATION
  • PRIVATE_COMPANY
  • PARTNERSHIP
  • NOT_FOR_PROFIT_ORGANIZATION
  • GOVERNMENT_ENTITY
  • PUBLIC_COMPANY

However, inside the User.php file, the only available constants are:
https://github.com/hyperwallet/php-sdk/blob/master/src/Hyperwallet/Model/User.php#L80

const BUSINESS_TYPE_CORPORATION = 'CORPORATION';
const BUSINESS_TYPE_PARTNERSHIP = 'PARTNERSHIP';

Am I missing something or shouldn't there be constants for the other businessTypes as well?

As another reference to a typed implementation of the sdk:

The java-sdk does have more constants:
https://github.com/hyperwallet/java-sdk/blob/master/src/main/java/com/hyperwallet/clientsdk/model/HyperwalletUser.java#L21

However, I am not sure if it is the best reference, because it also contains the value: CANADIAN_REGISTERED_CHARITY which isn't part of the API documentation anymore.

Users list offset regression

It appears that the 'offset' parameter was added, and then inadvertently removed with this update.

a3eec7c

I believe 'offset' is valid for v3 and should be allowed in 1.x. We continue to have to use a forked repo to pass that to the API.

Sandbox not working with v4 APIs

I can't use this library in 2.* version with the sandbox. Sandbox seems to be restricted to v3 APIs. When will it be supported ?

Weired to test the solution with an outdated library

REST version not supported? FORBIDDEN_REST_VERSION

I'm trying to get v4 SDK to work with Laravel 8. However, anytime I try to do an API call I am getting an exception "FORBIDDEN_REST_VERSION". I've tried calling listUsers and getProgram. Both give me the same exception.

I'm using the branch that adds support for guzzle 7.

Any help would be greatly appreciated.

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.