Skip to content

Commit 81e21a4

Browse files
committed
Update knet sdk to required api 34. latest uikit , removed card
1 parent 75baf82 commit 81e21a4

File tree

14 files changed

+72
-82
lines changed

14 files changed

+72
-82
lines changed

.idea/compiler.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/gradle.xml

Lines changed: 1 addition & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ dependencies {
5252
implementation 'com.github.Tap-Payments:TapAndroidForm:0.0.3'
5353
implementation project(path: ':knet-sdk')
5454

55-
implementation 'com.github.Tap-Payments:Card-Android:0.0.52'
55+
implementation 'com.github.Tap-Payments:Card-Android:0.0.68'
5656

5757
// implementation 'com.github.Tap-Payments:Knet-Android:0.0.0.1'
5858

app/src/main/java/com/example/knet_android/MainActivity.kt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,11 @@ class MainActivity : AppCompatActivity() ,KnetPayStatusDelegate{
124124
tapCardInputViewWeb = tapCard,
125125
tapMapConfiguration = configuration,
126126
tapCardStatusDelegate = object : TapCardStatusDelegate {
127-
override fun onError(error: String) {
127+
override fun onCardError(error: String) {
128128
Log.e("error", error.toString())
129129
}
130130

131-
override fun onSuccess(data: String) {
131+
override fun onCardSuccess(data: String) {
132132
// authenticateID = data
133133
val gson = Gson()
134134
val neededData = gson.fromJson(data, CardResponse::class.java)
@@ -395,13 +395,13 @@ class MainActivity : AppCompatActivity() ,KnetPayStatusDelegate{
395395

396396
}
397397

398-
override fun onReady() {
398+
override fun onKnetReady() {
399399
findViewById<TextView>(R.id.text).text = ""
400400
findViewById<TextView>(R.id.text).text = "onReady"
401401
Toast.makeText(this, "onReady", Toast.LENGTH_SHORT).show()
402402
}
403403

404-
override fun onSuccess(data: String) {
404+
override fun onKnetSuccess(data: String) {
405405
Log.i("onSuccess",data)
406406
findViewById<TextView>(R.id.text).text = ""
407407
findViewById<TextView>(R.id.text).text = "onSuccess $data"
@@ -411,38 +411,38 @@ class MainActivity : AppCompatActivity() ,KnetPayStatusDelegate{
411411

412412
}
413413

414-
override fun onClick() {
414+
override fun onKnetClick() {
415415
Toast.makeText(this, "onClick", Toast.LENGTH_SHORT).show()
416416
findViewById<TextView>(R.id.text).text = ""
417417
findViewById<TextView>(R.id.text).text = "onClick "
418418

419419
}
420420

421-
override fun onBindIdentification(data: String) {
421+
override fun onKnetBindIdentification(data: String) {
422422
Toast.makeText(this, "onBindIdentification", Toast.LENGTH_SHORT).show()
423423
findViewById<TextView>(R.id.text).text = ""
424424
findViewById<TextView>(R.id.text).text = "onBindIdentification $data "
425425
}
426426

427-
override fun onChargeCreated(data: String) {
427+
override fun onKnetChargeCreated(data: String) {
428428
Log.e("data",data.toString())
429429
findViewById<TextView>(R.id.text).text = ""
430430
findViewById<TextView>(R.id.text).text = "onChargeCreated $data"
431431
Toast.makeText(this, "onChargeCreated $data", Toast.LENGTH_SHORT).show()
432432

433433
}
434434

435-
override fun onOrderCreated(data: String) {
435+
override fun onKnetOrderCreated(data: String) {
436436
findViewById<TextView>(R.id.text).text = ""
437437
findViewById<TextView>(R.id.text).text = "onOrderCreated $data"
438438
Toast.makeText(this, "onOrderCreated $data", Toast.LENGTH_SHORT).show()
439439
}
440440

441-
override fun cancel() {
441+
override fun onKnetcancel() {
442442
Toast.makeText(this, "Cancel ", Toast.LENGTH_SHORT).show()
443443
}
444444

445-
override fun onError(error: String) {
445+
override fun onKnetError(error: String) {
446446
Log.e("error",error.toString())
447447
findViewById<TextView>(R.id.text).text = ""
448448
findViewById<TextView>(R.id.text).text = "onError $error"

knet-sdk/build.gradle

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ def getVersionName = { ->
2020
}
2121
}
2222
android {
23-
compileSdkVersion 31
24-
buildToolsVersion "30.0.3"
23+
compileSdkVersion 34
24+
2525
namespace 'company.tap.tapWebForm'
2626

2727
defaultConfig {
2828
minSdkVersion 24
29-
targetSdkVersion 31
29+
targetSdkVersion 34
3030
versionCode 1
3131
versionName "1.0.1"
3232

@@ -58,14 +58,13 @@ dependencies {
5858
implementation 'androidx.appcompat:appcompat:1.4.2'
5959
implementation 'com.google.android.material:material:1.6.1'
6060
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
61-
implementation 'com.github.Tap-Payments:TapCardInputKit-Android:1.0.0'
62-
api 'com.github.Tap-Payments:TapCardInputKit-Android:1.0.0'
61+
// implementation 'com.github.Tap-Payments:TapCardInputKit-Android:1.0.0'
62+
// api 'com.github.Tap-Payments:TapCardInputKit-Android:1.0.0'
63+
6364

64-
api 'com.github.Tap-Payments:TapUIKit-Android:2.0.7'
65-
implementation 'com.github.Tap-Payments:TapNFCCardReaderKit-Android:0.0.1.6.1'
6665
implementation "io.reactivex.rxjava2:rxjava:2.2.19"
6766
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
68-
implementation 'com.github.Tap-Payments:TapNetwrok-Android:0.2.2.34'
67+
implementation 'com.github.Tap-Payments:TapNetwrok-Android:0.2.2.45'
6968
api 'com.google.code.gson:gson:2.8.9'
7069
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
7170
implementation 'com.squareup.okhttp3:logging-interceptor:4.9.0'
@@ -78,11 +77,10 @@ dependencies {
7877
implementation 'jp.wasabeef:blurry:4.0.1'
7978

8079
implementation 'com.github.bumptech.glide:glide:4.12.0'
81-
implementation 'com.github.Tap-Payments:TapNFCCardReaderKit-Android:0.0.1.7'
82-
api 'com.github.Tap-Payments:TapCardScannerKit-Android:0.0.2'
83-
implementation 'company.tap:PayCards-Tap-Android:0.1.6.4'
80+
api 'com.github.Tap-Payments:TapCardScannerKit-Android:0.0.3.1'
81+
implementation 'com.intuit.sdp:sdp-android:1.1.0'
8482
api 'com.github.Tap-Payments:CommonDataModelsWeb-Andriod:0.0.14'
85-
implementation 'com.github.Tap-Payments:TapUIKit-Android:2.0.4'
83+
implementation 'com.github.Tap-Payments:TapUIKit-Android:2.0.16'
8684
implementation 'androidx.lifecycle:lifecycle-process:2.6.2'
8785
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
8886

knet-sdk/src/main/java/company/tap/tapWebForm/open/DataConfiguration.kt renamed to knet-sdk/src/main/java/company/tap/tapWebForm/open/KnetDataConfiguration.kt

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package company.tap.tapWebForm.open
22

33
import Customer
44
import TapAuthentication
5-
import TapCardConfigurations
65
import android.annotation.SuppressLint
76
import android.app.Activity
87
import android.content.Context
@@ -23,7 +22,7 @@ Copyright (c) 2022 Tap Payments.
2322
All rights reserved.
2423
**/
2524
@SuppressLint("StaticFieldLeak")
26-
object DataConfiguration {
25+
object KnetDataConfiguration {
2726

2827
private var knetPayStatusDelegate: KnetPayStatusDelegate? = null
2928
private var applicationLifecycle: ApplicationLifecycle? = null
@@ -140,15 +139,15 @@ object DataConfiguration {
140139
}
141140

142141
interface KnetPayStatusDelegate {
143-
fun onSuccess(data: String)
144-
fun onReady(){}
145-
fun onClick(){}
146-
fun onOrderCreated(data: String){}
147-
fun onChargeCreated(data:String){}
148-
fun onError(error: String)
149-
fun cancel(){}
150-
fun onHeightChange(heightChange:String){}
151-
fun onBindIdentification(data: String){}
142+
fun onKnetSuccess(data: String)
143+
fun onKnetReady(){}
144+
fun onKnetClick(){}
145+
fun onKnetOrderCreated(data: String){}
146+
fun onKnetChargeCreated(data:String){}
147+
fun onKnetError(error: String)
148+
fun onKnetcancel(){}
149+
fun onKnetHeightChange(heightChange:String){}
150+
fun onKnetBindIdentification(data: String){}
152151

153152
}
154153

knet-sdk/src/main/java/company/tap/tapWebForm/open/LifeCycleListener.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ class AppLifecycleObserver : LifecycleObserver {
99

1010
@OnLifecycleEvent(Lifecycle.Event.ON_RESUME)
1111
fun onEnterForeground() {
12-
DataConfiguration.getAppLifeCycle()?.onEnterForeground()
12+
KnetDataConfiguration.getAppLifeCycle()?.onEnterForeground()
1313
}
1414

1515
@OnLifecycleEvent(Lifecycle.Event.ON_STOP)
1616
fun onEnterBackground() {
17-
DataConfiguration.getAppLifeCycle()?.onEnterBackground()
17+
KnetDataConfiguration.getAppLifeCycle()?.onEnterBackground()
1818
}
1919
}

knet-sdk/src/main/java/company/tap/tapWebForm/open/web_wrapper/TapKnetConfiguration.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import android.util.Log
66
import androidx.lifecycle.ProcessLifecycleOwner
77
import company.tap.tapWebForm.R
88
import company.tap.tapWebForm.open.AppLifecycleObserver
9-
import company.tap.tapWebForm.open.DataConfiguration
10-
import company.tap.tapWebForm.open.DataConfiguration.configurationsAsHashMap
9+
import company.tap.tapWebForm.open.KnetDataConfiguration
10+
import company.tap.tapWebForm.open.KnetDataConfiguration.configurationsAsHashMap
1111
import company.tap.tapWebForm.open.KnetPayStatusDelegate
1212
import company.tap.tapWebForm.open.web_wrapper.enums.*
1313
import company.tap.tapnetworkkit.connection.NetworkApp
@@ -43,7 +43,7 @@ class TapKnetConfiguration {
4343
publickKey.toString()
4444
)
4545

46-
DataConfiguration.addTapBenefitPayStatusDelegate(knetPayStatusDelegate)
46+
KnetDataConfiguration.addTapBenefitPayStatusDelegate(knetPayStatusDelegate)
4747
tapCardInputViewWeb?.init(KnetConfiguration.MapConfigruation,buttonType)
4848

4949
}

0 commit comments

Comments
 (0)