judokit-react-native 4.1.0 → 4.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/RNJudopay.podspec
CHANGED
|
@@ -15,7 +15,7 @@ Pod::Spec.new do |s|
|
|
|
15
15
|
s.source_files = "ios/Classes/**/*.{h,m}"
|
|
16
16
|
s.requires_arc = true
|
|
17
17
|
s.dependency "React"
|
|
18
|
-
s.dependency "JudoKit-iOS", "3.2.
|
|
18
|
+
s.dependency "JudoKit-iOS", "3.2.4"
|
|
19
19
|
|
|
20
20
|
s.test_spec 'RNJudoTests' do |test_spec|
|
|
21
21
|
test_spec.source_files = 'ios/RNJudoTests/**/*.{h,m}'
|
package/android/build.gradle
CHANGED
|
@@ -74,8 +74,6 @@ repositories {
|
|
|
74
74
|
mavenCentral()
|
|
75
75
|
google()
|
|
76
76
|
|
|
77
|
-
maven { url 'https://vocalinkzapp.jfrog.io/artifactory/merchant-library-maven/' }
|
|
78
|
-
|
|
79
77
|
def found = false
|
|
80
78
|
def defaultDir = null
|
|
81
79
|
def androidSourcesName = 'React Native sources'
|
|
@@ -153,7 +151,7 @@ dependencies {
|
|
|
153
151
|
implementation 'androidx.core:core-ktx:1.9.0'
|
|
154
152
|
implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.1.0'
|
|
155
153
|
|
|
156
|
-
implementation 'com.judopay:judokit-android:4.1.
|
|
154
|
+
implementation 'com.judopay:judokit-android:4.1.2'
|
|
157
155
|
|
|
158
156
|
//JUnit 5
|
|
159
157
|
testImplementation "org.junit.jupiter:junit-jupiter-api:$junit5_version"
|
|
@@ -8,21 +8,13 @@ import androidx.fragment.app.FragmentActivity
|
|
|
8
8
|
import androidx.localbroadcastmanager.content.LocalBroadcastManager
|
|
9
9
|
import com.facebook.react.bridge.*
|
|
10
10
|
import com.judopay.judokit.android.Judo
|
|
11
|
-
import com.judopay.judokit.android.api.JudoApiService
|
|
12
|
-
import com.judopay.judokit.android.api.error.toJudoError
|
|
13
11
|
import com.judopay.judokit.android.api.factory.JudoApiServiceFactory
|
|
14
12
|
import com.judopay.judokit.android.api.model.response.JudoApiCallResult
|
|
15
13
|
import com.judopay.judokit.android.api.model.response.Receipt
|
|
16
|
-
import com.judopay.judokit.android.api.model.response.toCardVerificationModel
|
|
17
|
-
import com.judopay.judokit.android.api.model.response.toJudoPaymentResult
|
|
18
14
|
import com.judopay.judokit.android.api.model.response.toJudoResult
|
|
19
15
|
import com.judopay.judokit.android.model.*
|
|
20
16
|
import com.judopay.judokit.android.service.CardTransactionManager
|
|
21
17
|
import com.judopay.judokit.android.service.CardTransactionManagerResultListener
|
|
22
|
-
import com.judopay.judokit.android.toTokenRequest
|
|
23
|
-
import com.judopay.judokit.android.ui.cardverification.THREE_DS_ONE_DIALOG_FRAGMENT_TAG
|
|
24
|
-
import com.judopay.judokit.android.ui.cardverification.ThreeDSOneCardVerificationDialogFragment
|
|
25
|
-
import com.judopay.judokit.android.ui.cardverification.ThreeDSOneCompletionCallback
|
|
26
18
|
import com.judopay.judokit.android.ui.common.BR_PBBA_RESULT
|
|
27
19
|
import com.judopay.judokit.android.ui.common.PBBA_RESULT
|
|
28
20
|
import com.judopay.judokit.android.ui.common.isBankingAppAvailable
|
|
@@ -1,17 +1,52 @@
|
|
|
1
1
|
package com.reactlibrary
|
|
2
2
|
|
|
3
|
-
import android.widget.Button
|
|
4
3
|
import com.facebook.react.uimanager.SimpleViewManager
|
|
5
4
|
import com.facebook.react.uimanager.ThemedReactContext
|
|
5
|
+
import com.judopay.judokit.android.ui.common.PayByBankButton
|
|
6
|
+
import com.facebook.react.bridge.Arguments
|
|
7
|
+
import com.facebook.react.bridge.WritableMap
|
|
8
|
+
import com.facebook.react.common.MapBuilder
|
|
9
|
+
import com.facebook.react.uimanager.UIManagerHelper
|
|
10
|
+
import com.facebook.react.uimanager.events.Event
|
|
6
11
|
|
|
7
|
-
class
|
|
12
|
+
internal class OnPressEvent constructor(surfaceId: Int, viewId: Int):Event<OnPressEvent>(surfaceId, viewId) {
|
|
13
|
+
|
|
14
|
+
override fun getEventName(): String = EVENT_NAME
|
|
15
|
+
|
|
16
|
+
override fun getCoalescingKey(): Short = 0
|
|
17
|
+
|
|
18
|
+
override fun getEventData(): WritableMap? = Arguments.createMap()
|
|
19
|
+
|
|
20
|
+
companion object {
|
|
21
|
+
const val EVENT_NAME = "onPress"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
class JudoReactNativePBBAManager: SimpleViewManager<PayByBankButton>() {
|
|
8
26
|
|
|
9
27
|
override fun getName(): String {
|
|
10
28
|
return "RNPBBAButton"
|
|
11
29
|
}
|
|
12
30
|
|
|
13
|
-
override fun createViewInstance(reactContext: ThemedReactContext):
|
|
14
|
-
|
|
31
|
+
override fun createViewInstance(reactContext: ThemedReactContext): PayByBankButton {
|
|
32
|
+
val button = PayByBankButton(reactContext)
|
|
33
|
+
button.setOnClickListener {
|
|
34
|
+
val screenContext = it.context as ThemedReactContext
|
|
35
|
+
val eventDispatcher = UIManagerHelper.getEventDispatcherForReactTag(screenContext, it.id)
|
|
36
|
+
eventDispatcher?.dispatchEvent(
|
|
37
|
+
OnPressEvent(
|
|
38
|
+
screenContext.surfaceId,
|
|
39
|
+
it.id
|
|
40
|
+
)
|
|
41
|
+
)
|
|
42
|
+
}
|
|
43
|
+
return button
|
|
15
44
|
}
|
|
16
45
|
|
|
46
|
+
override fun getExportedCustomBubblingEventTypeConstants(): Map<String, Any> {
|
|
47
|
+
return MapBuilder.of(
|
|
48
|
+
OnPressEvent.EVENT_NAME,
|
|
49
|
+
MapBuilder.of("registrationName", "onPress"),
|
|
50
|
+
)
|
|
51
|
+
}
|
|
17
52
|
}
|
package/ios/Podfile
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "judokit-react-native",
|
|
3
3
|
"title": "Judopay React Native Module",
|
|
4
|
-
"version": "4.1.
|
|
4
|
+
"version": "4.1.2",
|
|
5
5
|
"description": "A React Native module for the Judopay native SDKs to take payments on iOS and Android.",
|
|
6
6
|
"main": "JudoPay.tsx",
|
|
7
7
|
"scripts": {
|