Socket
Book a DemoInstallSign in
Socket

swiss-klarna_proxy

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

swiss-klarna_proxy

bundlerRubygems
Version
1.0.0
Version published
Maintainers
1
Created
Source

Klarna SDK

This is a non-complete implementation of the Klarna Payment and Klarna Order Management API.

Development

To work properly the library needs credentials for the Klarna API. In development these credentials are read from the environment. In an actual application they are passed in as options to the Klarna::Client. There must be two variables set when running the tests or the dummy app:

  • KLARNA_API_KEY
  • KLARNA_API_SECRET

Both can be obtained from Klarna. There's a third option to set the region; currently tested are us (default) and uk.

  • KLARNA_REGION

Dummy HTTP app

The gem comes with a dummy Sinatra app that's used in the specs and can also be used for manual testing against the API. That's because some calls to the API require an authorization_token which can only be obtained by running frontend code in an iFrame. To run the app, simply execute bin/app.

Testing

The tests can be executed via rake.

FAQs

Package last updated on 03 Jan 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts