klarna / klarna-on-demand-android

Klarna On Demand SDK for Android

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Klarna on Demand

Build Status License

Klarna on-demand allows you to integrate Klarna's payment solution in mobile apps that offer on demand services. It's a perfect fit for apps selling concert tickets, taxi rides, food pick-ups, etc.

This project contains Klarna's on-demand payment solution SDK for Android 4+, as well as a sample application utilizing the SDK.

Note: This project is still a work in progress, and as such the documentation may be behind (or ahead) what is currently implemented.

It's Klarna in your App

While not necessary, the simplest way to get going with both the sample application and the SDK is to use Gradle and so all the following instructions will focus on that approach. For an alternative approach, see the official documentation (coming soon).

Using the SDK

Have a look at the integration guide for full details on how to use our SDK in your application.

For a short overview of the recent changes, please check out the project's changelog.

Running the sample application

Prerequisites

To run the application, you must first compile it. To that end, you will require the following:

  1. The Java Runtime Environment (or the Java Development Kit, also through the link)
  2. The Android SDK
  3. Android SDK packages

Running the application

Simply clone the project repository and follow these steps:

  1. Open a terminal and navigate to the repository.
  2. Connect an android device to run the application on (see below).
  3. Type ./gradlew installDebug into your terminal (if you work on Windows, type gradlew.bat installDebug).
  4. The application is now installed on all connected devices. Run it.

Running a local server

While the instructions above will get the application up and running, you will not be able to successfully perform purchases without a backend for the application to interact with. You should go here and follow the instructions provided to get a sample backend running on your local machine.

Since the sample application expects the server to be running on the same "machine", you will not be able to see a fully functional application running on a physical device. We recommend running the sample application on an emulator, such as Genymotion.

Problems?

There are quite a few things that could break along the way and prevent you from successfully running the application. Gradle will usually output very helpful error messages, but do let us know if you have an issue and we will do our best to help.

Contributing

You'd like to help us out? That's great! Here's what you need to do in order to contribute.

Prerequisites

As per running the application.

Setup

  1. Fork the project and clone your repository
  2. Import the project into a Gradle-friendly work environment such as Android Studio or Eclipse with Gradle tooling support
    Note! When using Android Studio, please make sure its version is 1.0 and JDK's version is lower or equal to 1.7.
  3. Get busy!

Tests

Pull requests must include tests for their proposed fixes/functionality. We use JUnit to write our tests and you can find the tests themselves here.

Use the following guide in order to setup a JUnit4 testing environment.

License

Klarna on Demand is available under the Apache 2.0 license. See the LICENSE file for more info.

About

Klarna On Demand SDK for Android

License:Other


Languages

Language:Java 100.0%