Giter Club home page Giter Club logo

kco_php's Introduction

Klarna Checkout PHP library (DEPRECATED)

Packagist Version Build Status Coverage Status

Deprecation notice

This repo has been marked as deprecated. The SDK is not longer supported. Please use https://github.com/klarna/kco_rest_php SDK instead.

About Klarna

Klarna was founded in Stockholm in 2005 with the idea of providing a zero-friction online payment solution that would allow consumers and merchants to interact with each other as safely and simply as possible. We do this by letting the consumer receive the goods first and pay afterwards, while we assume the credit and fraud risks for the merchants. Today, Klarna is one of Europe's fastest growing companies. In just 8 years, we've grown to 800 employees operating in 7 European countries with over 8 million consumers. But we are not satisfied with that. Our goal is to become market leaders within invoice-based payments worldwide and change the way the world shops online.

Klarna Checkout is a revolutionary new payment solution that is changing the way people shop online. First, consumers verify their purchase with a minimal amount of information through intelligent identification, securing your order immediately, and then complete their payment afterwards – separating buying from paying and dramatically increasing conversion. Klarna Checkout also allows merchants to offer all payment methods through one supplier, minimizing administration, costs and integration time.

Documentation

Documentation and more examples can be found at developers.klarna.com.

How to contribute

At Klarna, we strive toward achieving the highest possible quality for our products. Therefore, we require you to follow these guidelines if you wish to contribute.

To contribute, the following criteria needs to be fulfilled:

  • Description regarding what has been changed and why
  • Pull requests should implement a boxed change
  • All code and documentation must follow the PEAR coding standards
  • All classes must follow the PSR-0 standard
  • New features and bug fixes must have accompanying unit tests:
    • Positive tests
    • Negative tests
    • Boundary tests (if possible)
    • No less than 90% decision coverage
  • All unit tests should pass

Questions and feedback

If you have any questions concerning this product or the implementation, please contact [email protected].

Acknowledgements

  • David Keijser
  • Rickard Dybeck
  • Majid Garmaroudi
  • Magnus Nordlander
  • Christer Gustavsson
  • Fredrik Liljegren
  • Jan Kohlhof
  • Maksim Kotlyar
  • Matthias Feist

License

The Klarna Checkout PHP library is released under Apache License, Version 2.0

kco_php's People

Contributors

alexions avatar joakimlofgren avatar magnusnordlander avatar makasim 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  avatar  avatar  avatar  avatar  avatar

Watchers

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

kco_php's Issues

Status on php 7 support?

The klarna docs claims:

PHP >= 5.x (PHP 7 is currently not supported)

kco_php seems to support PHP 7, based on our internal tests.

  • No issues found testing the SDK code with alexia/php7mar and sstalle/php7cc.
  • No PHP 7 issues with forked code in travis(disclaimer: I do not fully understand Travis/GIT).
  • Everything works as expected running Checkout on our dev-site again testdrive(all snippets rendering, we get the push, no errors in our log-files, etc)
  • Everything works as expected running Checkout on our live-site again klarnas live system(all snippets rendering, we get the push, no errors in our log-files, etc)

The reply contacting [email protected] was basically(paraphrasing a bit):

It might work under php 7, but we do not support php 7.
It has not been prioritized(to test php 7 support), so we do not know if it works or not.

I assumed that the lack of support for php 7 was due to either major code rewrites needed or that it would break compatibility with earlier php 5.x versions. Not wanting to test the code was an unexpected and a bit disappointing reason.

It would feel a lot better to get official php 7 support in klarna checkout before we switch php version on our live server.

Has anyone in the community run into any issues with using Klarna Checkout on PHP 7?

Chore: Archive repository

What should be changed

  • Build process

  • Dependencies

  • Other tools:

    • Status of the project

Current State

The project just has a deprecation notice.

Expected state

The project is properly archived with the help of https://help.github.com/en/articles/archiving-repositories.

The reasoning

  • Shows in a better way that the repository is not maintained anymore and will also reduce noise but being able to create issues or Pull Requests. If people want to fork the repository they can still do this.

Settlements API Unexpected Header

Executing

$payout = new \Klarna\Rest\Settlements\Payouts($connector);
$payout->page($offset, $size, $start_date, $end_date, $currency_code);

we get

PHP Fatal error: Uncaught exception 'RuntimeException' with message 'Unexpected Content-Type header received: application/json; charset=utf-8' in ../vendor/klarna/kco_rest/src/Klarna/Rest/Transport/ResponseValidator.php:105

ResponseValidator is checking against 'application/json' without charset information

Notice: country kallades <strong>felaktigt</strong>

Notice: country kallades felaktigt. Customer properties should not be accessed directly. Backtrace: require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), do_action('template_redirect'), WP_Hook->do_action, WP_Hook->apply_filters, wc_template_redirect, WooCommerce->payment_gateways, WC_Payment_Gateways::instance, WC_Payment_Gateways->__construct, WC_Payment_Gateways->init, apply_filters('woocommerce_payment_gateways'), WP_Hook->apply_filters, WCML_WC_Gateways->loaded_woocommerce_payment_gateways, WC_Gateway_Klarna_Invoice->__construct, WC_Gateway_Klarna_Helper->get_account_icon, WC_Legacy_Customer->__get, wc_doing_it_wrong Vänligen se Felsökning i WordPress för mer information. (Detta meddelande lades till i version 3.0.) in /srv/www/dev-birthposter.com/current/web/wp/wp-includes/functions.php on line 4138

With:

Wordpress 4.7.5
Klaran checkout från Krokodil 2.3.8
Woocommerce 3.0.7
PHP 7.1

Any clues what I'm doing wrong?

Use PSR-4 instead of PSR-0

As of 2014-10-21 PSR-0 has been marked as deprecated. PSR-4 is now recommended as an alternative.

Are there any plans to update this lib?

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.