├── app ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── mipmap-hdpi │ │ │ │ ├── kamba_res_ic_launcher.png │ │ │ │ └── kamba_res_ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ │ ├── kamba_res_ic_launcher.png │ │ │ │ └── kamba_res_ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── kamba_res_ic_launcher.png │ │ │ │ └── kamba_res_ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── kamba_res_ic_launcher.png │ │ │ │ └── kamba_res_ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── kamba_res_ic_launcher.png │ │ │ │ └── kamba_res_ic_launcher_round.png │ │ │ ├── values │ │ │ │ ├── colors.xml │ │ │ │ ├── strings.xml │ │ │ │ └── styles.xml │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ ├── kamba_res_ic_launcher.xml │ │ │ │ └── kamba_res_ic_launcher_round.xml │ │ │ ├── layout │ │ │ │ ├── activity_main.xml │ │ │ │ └── activity_checkout.xml │ │ │ ├── drawable-v24 │ │ │ │ └── ic_launcher_foreground.xml │ │ │ └── drawable │ │ │ │ └── ic_launcher_background.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── usekamba │ │ │ │ └── kamba_payments_sdk │ │ │ │ ├── PaymentsDemoApplication.java │ │ │ │ ├── MainActivity.java │ │ │ │ └── CheckoutActivity.java │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── usekamba │ │ │ └── kamba_payments_sdk │ │ │ └── ExampleUnitTest.kt │ └── androidTest │ │ └── java │ │ └── com │ │ └── usekamba │ │ └── kamba_payments_sdk │ │ └── ExampleInstrumentedTest.kt ├── proguard-rules.pro └── build.gradle ├── kamba-android-sdk ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── drawable │ │ │ │ ├── qr.png │ │ │ │ ├── cheap.png │ │ │ │ ├── pay_logo.png │ │ │ │ ├── kamba_logo_green.png │ │ │ │ ├── online_shopping.png │ │ │ │ ├── price_tag_pound.png │ │ │ │ ├── security_checked.png │ │ │ │ ├── qr_card_background.xml │ │ │ │ ├── kamba_res_button.xml │ │ │ │ ├── kamba_res_rect_pressed.xml │ │ │ │ ├── qr_back_pressed.xml │ │ │ │ ├── kamba_res_button_light_theme.xml │ │ │ │ ├── kamba_res_rect_pressed_light_theme.xml │ │ │ │ ├── kamba_res_rect_normal.xml │ │ │ │ ├── qr_back_normal.xml │ │ │ │ ├── kamba_res_rect_normal_light_theme.xml │ │ │ │ └── oval_background.xml │ │ │ ├── font │ │ │ │ ├── roboto.ttf │ │ │ │ ├── google_sans.otf │ │ │ │ ├── roboto_bold.ttf │ │ │ │ ├── montserrat_bold.ttf │ │ │ │ └── google_sans_bold.otf │ │ │ ├── values │ │ │ │ ├── public.xml │ │ │ │ ├── dimens.xml │ │ │ │ ├── strings.xml │ │ │ │ ├── attrs.xml │ │ │ │ └── colors.xml │ │ │ └── layout │ │ │ │ ├── button.xml │ │ │ │ └── checkoutwidget.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── usekamba │ │ │ │ └── kambapaysdk │ │ │ │ ├── ui │ │ │ │ ├── PaymentResultListener.java │ │ │ │ ├── CheckoutWidget.java │ │ │ │ └── KambaButton.java │ │ │ │ ├── core │ │ │ │ ├── model │ │ │ │ │ ├── Metadata.java │ │ │ │ │ ├── QrCode.java │ │ │ │ │ ├── Png.java │ │ │ │ │ ├── Merchant.java │ │ │ │ │ ├── BigMoney.java │ │ │ │ │ └── CheckoutResponse.java │ │ │ │ ├── requests │ │ │ │ │ ├── TransactionCallback.java │ │ │ │ │ ├── TransactionBuilder.java │ │ │ │ │ ├── CheckoutRequest.java │ │ │ │ │ ├── CheckoutTransaction.java │ │ │ │ │ └── CheckoutTransactionBuilder.java │ │ │ │ ├── Platform.java │ │ │ │ ├── security │ │ │ │ │ ├── StringDecoder.java │ │ │ │ │ ├── StringEncoder.java │ │ │ │ │ ├── BinaryEncoder.java │ │ │ │ │ ├── BinaryDecoder.java │ │ │ │ │ ├── Encoder.java │ │ │ │ │ ├── Decoder.java │ │ │ │ │ ├── DigestUtils.java │ │ │ │ │ ├── binary │ │ │ │ │ │ ├── CharSequenceUtils.java │ │ │ │ │ │ ├── BinaryCodec.java │ │ │ │ │ │ └── StringUtils.java │ │ │ │ │ ├── StringEncoderComparator.java │ │ │ │ │ ├── DecoderException.java │ │ │ │ │ ├── EncoderException.java │ │ │ │ │ ├── CharEncoding.java │ │ │ │ │ └── Charsets.java │ │ │ │ ├── HmacSha1.java │ │ │ │ └── client │ │ │ │ │ └── ClientConfig.java │ │ │ │ └── helpers │ │ │ │ ├── Fourme.kt │ │ │ │ └── DateHelper.java │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── usekamba │ │ │ └── kambapaysdk │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── usekamba │ │ └── kambapaysdk │ │ └── ExampleInstrumentedTest.java ├── proguard-rules.pro └── build.gradle ├── screenshots ├── appToapp.gif ├── kamba_widget.png ├── kamba-button-dark-theme.png └── kamba-button-light-theme.png ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .idea ├── caches │ └── build_file_checksums.ser ├── vcs.xml ├── misc.xml ├── runConfigurations.xml └── gradle.xml ├── .gitignore ├── settings.gradle ├── gradle.properties ├── gradlew.bat ├── gradlew └── README.md /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /kamba-android-sdk/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /screenshots/appToapp.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/usekamba/kamba-android-sdk/HEAD/screenshots/appToapp.gif -------------------------------------------------------------------------------- /screenshots/kamba_widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/usekamba/kamba-android-sdk/HEAD/screenshots/kamba_widget.png -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/usekamba/kamba-android-sdk/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /.idea/caches/build_file_checksums.ser: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/usekamba/kamba-android-sdk/HEAD/.idea/caches/build_file_checksums.ser -------------------------------------------------------------------------------- /screenshots/kamba-button-dark-theme.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/usekamba/kamba-android-sdk/HEAD/screenshots/kamba-button-dark-theme.png -------------------------------------------------------------------------------- /screenshots/kamba-button-light-theme.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/usekamba/kamba-android-sdk/HEAD/screenshots/kamba-button-light-theme.png -------------------------------------------------------------------------------- /kamba-android-sdk/src/main/res/drawable/qr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/usekamba/kamba-android-sdk/HEAD/kamba-android-sdk/src/main/res/drawable/qr.png -------------------------------------------------------------------------------- /kamba-android-sdk/src/main/res/font/roboto.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/usekamba/kamba-android-sdk/HEAD/kamba-android-sdk/src/main/res/font/roboto.ttf -------------------------------------------------------------------------------- /kamba-android-sdk/src/main/res/drawable/cheap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/usekamba/kamba-android-sdk/HEAD/kamba-android-sdk/src/main/res/drawable/cheap.png -------------------------------------------------------------------------------- /kamba-android-sdk/src/main/res/drawable/pay_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/usekamba/kamba-android-sdk/HEAD/kamba-android-sdk/src/main/res/drawable/pay_logo.png -------------------------------------------------------------------------------- /kamba-android-sdk/src/main/res/font/google_sans.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/usekamba/kamba-android-sdk/HEAD/kamba-android-sdk/src/main/res/font/google_sans.otf -------------------------------------------------------------------------------- /kamba-android-sdk/src/main/res/font/roboto_bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/usekamba/kamba-android-sdk/HEAD/kamba-android-sdk/src/main/res/font/roboto_bold.ttf -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/kamba_res_ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/usekamba/kamba-android-sdk/HEAD/app/src/main/res/mipmap-hdpi/kamba_res_ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/kamba_res_ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/usekamba/kamba-android-sdk/HEAD/app/src/main/res/mipmap-mdpi/kamba_res_ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/kamba_res_ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/usekamba/kamba-android-sdk/HEAD/app/src/main/res/mipmap-xhdpi/kamba_res_ic_launcher.png -------------------------------------------------------------------------------- /kamba-android-sdk/src/main/res/font/montserrat_bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/usekamba/kamba-android-sdk/HEAD/kamba-android-sdk/src/main/res/font/montserrat_bold.ttf -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/kamba_res_ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/usekamba/kamba-android-sdk/HEAD/app/src/main/res/mipmap-xxhdpi/kamba_res_ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/kamba_res_ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/usekamba/kamba-android-sdk/HEAD/app/src/main/res/mipmap-xxxhdpi/kamba_res_ic_launcher.png -------------------------------------------------------------------------------- /kamba-android-sdk/src/main/res/font/google_sans_bold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/usekamba/kamba-android-sdk/HEAD/kamba-android-sdk/src/main/res/font/google_sans_bold.otf -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/kamba_res_ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/usekamba/kamba-android-sdk/HEAD/app/src/main/res/mipmap-hdpi/kamba_res_ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/kamba_res_ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/usekamba/kamba-android-sdk/HEAD/app/src/main/res/mipmap-mdpi/kamba_res_ic_launcher_round.png -------------------------------------------------------------------------------- /kamba-android-sdk/src/main/res/drawable/kamba_logo_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/usekamba/kamba-android-sdk/HEAD/kamba-android-sdk/src/main/res/drawable/kamba_logo_green.png -------------------------------------------------------------------------------- /kamba-android-sdk/src/main/res/drawable/online_shopping.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/usekamba/kamba-android-sdk/HEAD/kamba-android-sdk/src/main/res/drawable/online_shopping.png -------------------------------------------------------------------------------- /kamba-android-sdk/src/main/res/drawable/price_tag_pound.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/usekamba/kamba-android-sdk/HEAD/kamba-android-sdk/src/main/res/drawable/price_tag_pound.png -------------------------------------------------------------------------------- /kamba-android-sdk/src/main/res/drawable/security_checked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/usekamba/kamba-android-sdk/HEAD/kamba-android-sdk/src/main/res/drawable/security_checked.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/kamba_res_ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/usekamba/kamba-android-sdk/HEAD/app/src/main/res/mipmap-xhdpi/kamba_res_ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/kamba_res_ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/usekamba/kamba-android-sdk/HEAD/app/src/main/res/mipmap-xxhdpi/kamba_res_ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/kamba_res_ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/usekamba/kamba-android-sdk/HEAD/app/src/main/res/mipmap-xxxhdpi/kamba_res_ic_launcher_round.png -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/libraries 5 | /.idea/modules.xml 6 | /.idea/workspace.xml 7 | .DS_Store 8 | /build 9 | /captures 10 | .externalNativeBuild 11 | /.idea/* 12 | -------------------------------------------------------------------------------- /kamba-android-sdk/src/main/java/com/usekamba/kambapaysdk/ui/PaymentResultListener.java: -------------------------------------------------------------------------------- 1 | package com.usekamba.kambapaysdk.ui; 2 | 3 | public interface PaymentResultListener { 4 | void onSuccessfulPayment(); 5 | void onFailure(); 6 | } 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jul 06 12:18:28 WAT 2018 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip 7 | -------------------------------------------------------------------------------- /kamba-android-sdk/src/main/java/com/usekamba/kambapaysdk/core/model/Metadata.java: -------------------------------------------------------------------------------- 1 | package com.usekamba.kambapaysdk.core.model; 2 | 3 | 4 | import java.io.Serializable; 5 | 6 | public class Metadata implements Serializable { 7 | 8 | @Override 9 | public String toString(){ 10 | return 11 | "Metadata{" + 12 | "}"; 13 | } 14 | } -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) UseKamba Ltda - All Rights Reserved 3 | * Unauthorized copying of this file, via any medium is strictly prohibited 4 | * Proprietary and confidential and will be punished by law 5 | * Written by Alexandre Antonio Juca 6 | * 7 | */ 8 | 9 | include ':app', ':kamba-android-sdk' 10 | -------------------------------------------------------------------------------- /kamba-android-sdk/src/main/java/com/usekamba/kambapaysdk/helpers/Fourme.kt: -------------------------------------------------------------------------------- 1 | package com.usekamba.kambapaysdk.helpers 2 | 3 | import java.math.BigDecimal 4 | 5 | fun formatCheckoutAmount(amount: BigDecimal): String? { 6 | return when (amount.toString().contains(".0")) { 7 | true -> { amount.toString() + "0" } 8 | false -> { amount.toString() } 9 | } 10 | } -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/kamba_res_ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/kamba_res_ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /kamba-android-sdk/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 11 | -------------------------------------------------------------------------------- /kamba-android-sdk/src/main/res/values/public.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/java/com/usekamba/kamba_payments_sdk/PaymentsDemoApplication.java: -------------------------------------------------------------------------------- 1 | package com.usekamba.kamba_payments_sdk; 2 | 3 | import android.app.Application; 4 | 5 | import com.usekamba.kambapaysdk.core.client.ClientConfig; 6 | 7 | public class PaymentsDemoApplication extends Application { 8 | @Override 9 | public void onCreate() { 10 | super.onCreate(); 11 | ClientConfig.getInstance().configure("", "", ClientConfig.Environment.PRODUCTION); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /app/src/test/java/com/usekamba/kamba_payments_sdk/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.usekamba.kamba_payments_sdk 2 | 3 | import org.junit.Test 4 | 5 | import org.junit.Assert.* 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * See [testing documentation](http://d.android.com/tools/testing). 11 | */ 12 | class ExampleUnitTest { 13 | @Test 14 | fun addition_isCorrect() { 15 | assertEquals(4, 2 + 2) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | Kamba-Payments-Sdk 11 | start payment 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 14 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /kamba-android-sdk/src/main/res/drawable/qr_card_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /kamba-android-sdk/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 48dp 11 | // Button roundness 12 | 4dp 13 | 4dp 14 | 80dp 15 | 16 | -------------------------------------------------------------------------------- /kamba-android-sdk/src/main/res/drawable/kamba_res_button.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /kamba-android-sdk/src/main/res/drawable/kamba_res_rect_pressed.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /kamba-android-sdk/src/main/java/com/usekamba/kambapaysdk/core/requests/TransactionCallback.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) UseKamba Ltda - All Rights Reserved 3 | * Unauthorized copying of this file, via any medium is strictly prohibited 4 | * Proprietary and confidential and will be punished by law 5 | * Written by Alexandre Antonio Juca 6 | * 7 | */ 8 | 9 | package com.usekamba.kambapaysdk.core.requests; 10 | 11 | import com.usekamba.kambapaysdk.core.model.CheckoutResponse; 12 | 13 | import java.io.IOException; 14 | 15 | import okhttp3.Response; 16 | 17 | public interface TransactionCallback { 18 | void onSuccess(CheckoutResponse checkout); 19 | void onFailure(String message); 20 | } 21 | -------------------------------------------------------------------------------- /kamba-android-sdk/src/main/res/drawable/qr_back_pressed.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /kamba-android-sdk/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | KambaSDK 11 | Pagar com Kamba 12 | Válido até 13 | Total 14 | Pagar com Kamba 15 | 16 | -------------------------------------------------------------------------------- /kamba-android-sdk/src/main/res/drawable/kamba_res_button_light_theme.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 19 | -------------------------------------------------------------------------------- /kamba-android-sdk/src/main/res/drawable/kamba_res_rect_pressed_light_theme.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | 11 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx1536m 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | # org.gradle.parallel=true 14 | -------------------------------------------------------------------------------- /kamba-android-sdk/src/main/java/com/usekamba/kambapaysdk/core/requests/TransactionBuilder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) UseKamba Ltda - All Rights Reserved 3 | * Unauthorized copying of this file, via any medium is strictly prohibited 4 | * Proprietary and confidential and will be punished by law 5 | * Written by Alexandre Antonio Juca 6 | * 7 | */ 8 | 9 | package com.usekamba.kambapaysdk.core.requests; 10 | 11 | import com.usekamba.kambapaysdk.core.client.ClientConfig; 12 | 13 | class Transaction { 14 | 15 | public interface TransactionBuilder { 16 | CheckoutTransaction build(); 17 | CheckoutTransactionBuilder addCheckoutRequest(CheckoutRequest checkoutRequest); 18 | CheckoutTransactionBuilder addClientConfig(ClientConfig clientConfig); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /kamba-android-sdk/src/test/java/com/usekamba/kambapaysdk/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) UseKamba Ltda - All Rights Reserved 3 | * Unauthorized copying of this file, via any medium is strictly prohibited 4 | * Proprietary and confidential and will be punished by law 5 | * Written by Alexandre Antonio Juca 6 | * 7 | */ 8 | 9 | package com.usekamba.kambapaysdk; 10 | 11 | import org.junit.Test; 12 | 13 | import static org.junit.Assert.*; 14 | 15 | /** 16 | * Example local unit test, which will execute on the development machine (host). 17 | * 18 | * @see Testing documentation 19 | */ 20 | public class ExampleUnitTest { 21 | @Test 22 | public void addition_isCorrect() { 23 | assertEquals(4, 2 + 2); 24 | } 25 | } -------------------------------------------------------------------------------- /app/src/androidTest/java/com/usekamba/kamba_payments_sdk/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.usekamba.kamba_payments_sdk 2 | 3 | import android.support.test.InstrumentationRegistry 4 | import android.support.test.runner.AndroidJUnit4 5 | 6 | import org.junit.Test 7 | import org.junit.runner.RunWith 8 | 9 | import org.junit.Assert.* 10 | 11 | /** 12 | * Instrumented test, which will execute on an Android device. 13 | * 14 | * See [testing documentation](http://d.android.com/tools/testing). 15 | */ 16 | @RunWith(AndroidJUnit4::class) 17 | class ExampleInstrumentedTest { 18 | @Test 19 | fun useAppContext() { 20 | // Context of the app under test. 21 | val appContext = InstrumentationRegistry.getTargetContext() 22 | assertEquals("com.usekamba.kamba_payments_sdk", appContext.packageName) 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /kamba-android-sdk/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /kamba-android-sdk/src/main/res/drawable/kamba_res_rect_normal.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /kamba-android-sdk/src/main/res/drawable/qr_back_normal.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /kamba-android-sdk/src/main/java/com/usekamba/kambapaysdk/core/Platform.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) UseKamba Ltda - All Rights Reserved 3 | * Unauthorized copying of this file, via any medium is strictly prohibited 4 | * Proprietary and confidential and will be punished by law 5 | * Written by Alexandre Antonio Juca 6 | * 7 | */ 8 | 9 | package com.usekamba.kambapaysdk.core; 10 | 11 | import android.os.Handler; 12 | import android.os.Looper; 13 | 14 | import java.util.concurrent.Executor; 15 | 16 | public class Platform { 17 | 18 | public Executor defaultCallbackExecutor() { 19 | return new MainThreadExecutor(); 20 | } 21 | 22 | static class MainThreadExecutor implements Executor { 23 | private final Handler handler = new Handler(Looper.getMainLooper()); 24 | 25 | @Override 26 | public void execute(Runnable r) { 27 | handler.post(r); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /kamba-android-sdk/src/main/res/drawable/kamba_res_rect_normal_light_theme.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /kamba-android-sdk/src/main/res/values/attrs.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /kamba-android-sdk/src/main/res/drawable/oval_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 14 | 19 | 20 | 23 | 24 | 29 | -------------------------------------------------------------------------------- /kamba-android-sdk/src/androidTest/java/com/usekamba/kambapaysdk/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) UseKamba Ltda - All Rights Reserved 3 | * Unauthorized copying of this file, via any medium is strictly prohibited 4 | * Proprietary and confidential and will be punished by law 5 | * Written by Alexandre Antonio Juca 6 | * 7 | */ 8 | 9 | package com.usekamba.kambapaysdk; 10 | 11 | import android.content.Context; 12 | import android.support.test.InstrumentationRegistry; 13 | import android.support.test.runner.AndroidJUnit4; 14 | 15 | import org.junit.Test; 16 | import org.junit.runner.RunWith; 17 | 18 | import static org.junit.Assert.*; 19 | 20 | /** 21 | * Instrumented test, which will execute on an Android device. 22 | * 23 | * @see Testing documentation 24 | */ 25 | @RunWith(AndroidJUnit4.class) 26 | public class ExampleInstrumentedTest { 27 | @Test 28 | public void useAppContext() { 29 | // Context of the app under test. 30 | Context appContext = InstrumentationRegistry.getTargetContext(); 31 | 32 | assertEquals("usekamba.com.kambasdk.test", appContext.getPackageName()); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /kamba-android-sdk/src/main/java/com/usekamba/kambapaysdk/core/model/QrCode.java: -------------------------------------------------------------------------------- 1 | package com.usekamba.kambapaysdk.core.model; 2 | 3 | import com.squareup.moshi.Json; 4 | 5 | import java.io.Serializable; 6 | 7 | public class QrCode implements Serializable { 8 | 9 | @Json(name = "string") 10 | private String string; 11 | 12 | @Json(name = "svg") 13 | private String svg; 14 | 15 | @Json(name = "png") 16 | private Png png; 17 | 18 | @Json(name = "html") 19 | private String html; 20 | 21 | public void setString(String string){ 22 | this.string = string; 23 | } 24 | 25 | public String getString(){ 26 | return string; 27 | } 28 | 29 | public void setSvg(String svg){ 30 | this.svg = svg; 31 | } 32 | 33 | public String getSvg(){ 34 | return svg; 35 | } 36 | 37 | public void setPng(Png png){ 38 | this.png = png; 39 | } 40 | 41 | public Png getPng(){ 42 | return png; 43 | } 44 | 45 | public void setHtml(String html){ 46 | this.html = html; 47 | } 48 | 49 | public String getHtml(){ 50 | return html; 51 | } 52 | 53 | @Override 54 | public String toString(){ 55 | return 56 | "QrCode{" + 57 | "string = '" + string + '\'' + 58 | ",svg = '" + svg + '\'' + 59 | ",png = '" + png + '\'' + 60 | ",html = '" + html + '\'' + 61 | "}"; 62 | } 63 | } -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 17 | 18 |