Giter Site home page Giter Site logo

rabobank-nederland / omnikassa-php-sdk Goto Github PK

View Code? Open in Web Editor NEW
5.0 13.0 15.0 180 KB

This repository contains the official PHP SDK for Rabo OmniKassa.

Home Page: https://www.rabobank.nl/omnikassa

License: MIT License

PHP 100.00%
rabobank omnikassa

omnikassa-php-sdk's Issues

Add an exception if Omnikassa is unavailable

Hello,

We use omnikassa in our application, and sometimes the sandbox environment is unavailable, the problem is that the error that is send when the service is unavaible doesn't speak for itself. We hava a Warning: Trying to access array offset on value of type null send from the class AccessToken line 48.

Maybe a fix can be to see if the access token contain an error message before creating the access token from the json in the method retrieveNewToken in the class ApiConnector like this:

    /**
     * @return AccessToken
     */
    private function retrieveNewToken()
    {
        $refreshToken = $this->tokenProvider->getRefreshToken();

        $this->restTemplate->setToken($refreshToken);
        $accessTokenJson = $this->restTemplate->get('gatekeeper/refresh');

        if (str_contains($accessTokenJson, 'Tijdelijk niet beschikbaar')) {
            throw new \HttpException('OmniKassa is temporarily unavailable', 503);
        }

        return AccessToken::fromJson($accessTokenJson);
    }

What do you think?

Guzzle 7 support

To upgrade a few projects with this package, Guzzle 7 is needed.

There are multiple Pull Requests to address this issue.

Action required:

  • Choose one or more solutions to fix the problem

PRs:

Fatal error: Uncaught GuzzleHttp\Ring\Exception\ConnectException: cURL error 6

Hello, I have an issue with making transactions with certain amounts(37.91 and 68.57, EUR), in an older version of your SDK, this was an issue with the rounding of numbers and is fixed in the newer versions, but when I updated our entire SDK, I got an error which states " Fatal error: Uncaught GuzzleHttp\Ring\Exception\ConnectException: cURL error 6: Could not resolve host: gatekeeper;".
So I ended up updating only the part that rounds the total price of the transaction, but when this is done, it takes those 2 amounts, adds 1 cent and creates the transaction, which results in the amount to be paid ends up being 37.92 or 68.58.
Do you current solution for these problems?

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.