react-native-hyperpay-sdk 0.3.0 → 0.4.0
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/LICENSE +2 -1
- package/OPPWAMobile.framework/.DS_Store +0 -0
- package/README.md +6 -8
- package/android/.DS_Store +0 -0
- package/android/.gradle/6.8/executionHistory/executionHistory.bin +0 -0
- package/android/.gradle/6.8/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/6.8/fileChanges/last-build.bin +0 -0
- package/android/.gradle/6.8/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/6.8/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/6.8/fileHashes/resourceHashesCache.bin +0 -0
- package/android/.gradle/6.8/gc.properties +0 -0
- package/android/.gradle/6.8/javaCompile/javaCompile.lock +0 -0
- package/android/.gradle/7.1.1/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/android/.gradle/7.1.1/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/7.1.1/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/7.1.1/fileChanges/last-build.bin +0 -0
- package/android/.gradle/7.1.1/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/7.1.1/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
- package/android/.gradle/checksums/checksums.lock +0 -0
- package/android/.gradle/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/configuration-cache/gc.properties +0 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/.idea/.gitignore +3 -0
- package/android/.idea/compiler.xml +6 -0
- package/android/.idea/gradle.xml +19 -0
- package/android/.idea/jarRepositories.xml +40 -0
- package/android/.idea/libraries/Gradle____oppwa_mobile_2_44_0_oppwa_mobile_2_44_0_aar.xml +11 -0
- package/android/.idea/libraries/Gradle__com_android_support_appcompat_v7_23_0_1_aar.xml +18 -0
- package/android/.idea/libraries/Gradle__com_android_support_recyclerview_v7_23_0_1_aar.xml +15 -0
- package/android/.idea/libraries/Gradle__com_android_support_support_annotations_23_0_1.xml +13 -0
- package/android/.idea/libraries/Gradle__com_android_support_support_v4_23_0_1_aar.xml +19 -0
- package/android/.idea/libraries/Gradle__com_facebook_fresco_drawee_0_8_1_aar.xml +15 -0
- package/android/.idea/libraries/Gradle__com_facebook_fresco_fbcore_0_8_1_aar.xml +15 -0
- package/android/.idea/libraries/Gradle__com_facebook_fresco_fresco_0_8_1_aar.xml +15 -0
- package/android/.idea/libraries/Gradle__com_facebook_fresco_imagepipeline_0_8_1_aar.xml +15 -0
- package/android/.idea/libraries/Gradle__com_facebook_fresco_imagepipeline_okhttp_0_8_1_aar.xml +15 -0
- package/android/.idea/libraries/Gradle__com_facebook_react_react_native_0_20_1_aar.xml +19 -0
- package/android/.idea/libraries/Gradle__com_facebook_stetho_stetho_1_2_0.xml +13 -0
- package/android/.idea/libraries/Gradle__com_facebook_stetho_stetho_okhttp_1_2_0.xml +13 -0
- package/android/.idea/libraries/Gradle__com_fasterxml_jackson_core_jackson_core_2_2_3.xml +13 -0
- package/android/.idea/libraries/Gradle__com_google_code_findbugs_jsr305_3_0_0.xml +13 -0
- package/android/.idea/libraries/Gradle__com_nineoldandroids_library_2_4_0.xml +13 -0
- package/android/.idea/libraries/Gradle__com_parse_bolts_bolts_android_1_1_4.xml +13 -0
- package/android/.idea/libraries/Gradle__com_squareup_okhttp_okhttp_2_5_0.xml +13 -0
- package/android/.idea/libraries/Gradle__com_squareup_okhttp_okhttp_ws_2_5_0.xml +13 -0
- package/android/.idea/libraries/Gradle__com_squareup_okio_okio_1_6_0.xml +13 -0
- package/android/.idea/libraries/Gradle__commons_cli_commons_cli_1_2.xml +13 -0
- package/android/.idea/libraries/Gradle__org_webkit_android_jsc_r174650_aar.xml +11 -0
- package/android/.idea/misc.xml +9 -0
- package/android/.idea/modules/android.iml +66 -0
- package/android/.idea/modules.xml +8 -0
- package/android/.idea/vcs.xml +6 -0
- package/android/build.gradle +40 -116
- package/android/local.properties +8 -0
- package/android/src/main/AndroidManifest.xml +1 -1
- package/android/src/main/java/com/{reactnativehyperpaysdk/HyperpaySdkModule.java → reactnativehyperpay/HyperPayModule.java} +8 -7
- package/android/src/main/java/com/{reactnativehyperpaysdk/HyperpaySdkPackage.java → reactnativehyperpay/HyperPayPackage.java} +3 -3
- package/ios/HyperPay.h +11 -0
- package/ios/{HyperpaySdk.mm → HyperPay.m} +4 -10
- package/ios/{HyperpaySdk.xcodeproj → HyperPay.xcodeproj}/project.pbxproj +28 -20
- package/ios/{HyperpaySdk.xcodeproj → HyperPay.xcodeproj}/project.xcworkspace/contents.xcworkspacedata +0 -0
- package/package.json +25 -30
- package/react-native-hyperpay.podspec +20 -0
- package/src/index.tsx +5 -3
- package/android/gradle.properties +0 -5
- package/ios/HyperpaySdk.h +0 -5
- package/react-native-hyperpay-sdk.podspec +0 -40
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<module external.linked.project.id="android" external.linked.project.path="$MODULE_DIR$/../.." external.root.project.path="$MODULE_DIR$/../.." external.system.id="GRADLE" external.system.module.group="" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
|
|
3
|
+
<component name="FacetManager">
|
|
4
|
+
<facet type="android-gradle" name="Android-Gradle">
|
|
5
|
+
<configuration>
|
|
6
|
+
<option name="GRADLE_PROJECT_PATH" value=":" />
|
|
7
|
+
<option name="LAST_SUCCESSFUL_SYNC_AGP_VERSION" value="3.5.3" />
|
|
8
|
+
<option name="LAST_KNOWN_AGP_VERSION" value="3.5.3" />
|
|
9
|
+
</configuration>
|
|
10
|
+
</facet>
|
|
11
|
+
<facet type="android" name="Android">
|
|
12
|
+
<configuration>
|
|
13
|
+
<option name="SELECTED_BUILD_VARIANT" value="debug" />
|
|
14
|
+
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
|
|
15
|
+
<option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
|
|
16
|
+
<afterSyncTasks>
|
|
17
|
+
<task>generateDebugSources</task>
|
|
18
|
+
</afterSyncTasks>
|
|
19
|
+
<option name="ALLOW_USER_CONFIGURATION" value="false" />
|
|
20
|
+
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
|
|
21
|
+
<option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
|
|
22
|
+
<option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/../../src/main/res;file://$MODULE_DIR$/../../src/debug/res;file://$MODULE_DIR$/../../build/generated/res/rs/debug;file://$MODULE_DIR$/../../build/generated/res/resValues/debug" />
|
|
23
|
+
<option name="TEST_RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/../../src/androidTest/res;file://$MODULE_DIR$/../../src/androidTestDebug/res;file://$MODULE_DIR$/../../build/generated/res/rs/androidTest/debug;file://$MODULE_DIR$/../../build/generated/res/resValues/androidTest/debug" />
|
|
24
|
+
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" />
|
|
25
|
+
<option name="PROJECT_TYPE" value="1" />
|
|
26
|
+
</configuration>
|
|
27
|
+
</facet>
|
|
28
|
+
</component>
|
|
29
|
+
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
|
|
30
|
+
<output url="file://$MODULE_DIR$/../../build/intermediates/javac/debug/classes" />
|
|
31
|
+
<output-test url="file://$MODULE_DIR$/../../build/intermediates/javac/debugUnitTest/classes" />
|
|
32
|
+
<exclude-output />
|
|
33
|
+
<content url="file://$MODULE_DIR$/../..">
|
|
34
|
+
<sourceFolder url="file://$MODULE_DIR$/../../build/generated/ap_generated_sources/debug/out" isTestSource="false" generated="true" />
|
|
35
|
+
<sourceFolder url="file://$MODULE_DIR$/../../build/generated/res/resValues/debug" type="java-resource" />
|
|
36
|
+
<sourceFolder url="file://$MODULE_DIR$/../../build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
|
|
37
|
+
<sourceFolder url="file://$MODULE_DIR$/../../src/main/java" isTestSource="false" />
|
|
38
|
+
<excludeFolder url="file://$MODULE_DIR$/../../.gradle" />
|
|
39
|
+
<excludeFolder url="file://$MODULE_DIR$/../../build" />
|
|
40
|
+
</content>
|
|
41
|
+
<orderEntry type="jdk" jdkName="Android API 29 Platform" jdkType="Android SDK" />
|
|
42
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
|
43
|
+
<orderEntry type="library" name="Gradle: com.facebook.stetho:stetho-okhttp:1.2.0" level="project" />
|
|
44
|
+
<orderEntry type="library" name="Gradle: com.facebook.stetho:stetho:1.2.0" level="project" />
|
|
45
|
+
<orderEntry type="library" name="Gradle: com.google.code.findbugs:jsr305:3.0.0" level="project" />
|
|
46
|
+
<orderEntry type="library" name="Gradle: commons-cli:commons-cli:1.2" level="project" />
|
|
47
|
+
<orderEntry type="library" name="Gradle: com.squareup.okhttp:okhttp-ws:2.5.0" level="project" />
|
|
48
|
+
<orderEntry type="library" name="Gradle: com.squareup.okhttp:okhttp:2.5.0" level="project" />
|
|
49
|
+
<orderEntry type="library" name="Gradle: com.squareup.okio:okio:1.6.0" level="project" />
|
|
50
|
+
<orderEntry type="library" name="Gradle: com.nineoldandroids:library:2.4.0" level="project" />
|
|
51
|
+
<orderEntry type="library" name="Gradle: com.android.support:support-annotations:23.0.1" level="project" />
|
|
52
|
+
<orderEntry type="library" name="Gradle: com.parse.bolts:bolts-android:1.1.4" level="project" />
|
|
53
|
+
<orderEntry type="library" name="Gradle: com.fasterxml.jackson.core:jackson-core:2.2.3" level="project" />
|
|
54
|
+
<orderEntry type="library" name="Gradle: ./oppwa.mobile-2.44.0/oppwa.mobile-2.44.0.aar" level="project" />
|
|
55
|
+
<orderEntry type="library" name="Gradle: com.facebook.react:react-native:0.20.1@aar" level="project" />
|
|
56
|
+
<orderEntry type="library" name="Gradle: com.facebook.fresco:imagepipeline-okhttp:0.8.1@aar" level="project" />
|
|
57
|
+
<orderEntry type="library" name="Gradle: com.facebook.fresco:fresco:0.8.1@aar" level="project" />
|
|
58
|
+
<orderEntry type="library" name="Gradle: com.facebook.fresco:imagepipeline:0.8.1@aar" level="project" />
|
|
59
|
+
<orderEntry type="library" name="Gradle: com.facebook.fresco:drawee:0.8.1@aar" level="project" />
|
|
60
|
+
<orderEntry type="library" name="Gradle: com.facebook.fresco:fbcore:0.8.1@aar" level="project" />
|
|
61
|
+
<orderEntry type="library" name="Gradle: com.android.support:recyclerview-v7:23.0.1@aar" level="project" />
|
|
62
|
+
<orderEntry type="library" name="Gradle: com.android.support:appcompat-v7:23.0.1@aar" level="project" />
|
|
63
|
+
<orderEntry type="library" name="Gradle: com.android.support:support-v4:23.0.1@aar" level="project" />
|
|
64
|
+
<orderEntry type="library" name="Gradle: org.webkit:android-jsc:r174650@aar" level="project" />
|
|
65
|
+
</component>
|
|
66
|
+
</module>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="ProjectModuleManager">
|
|
4
|
+
<modules>
|
|
5
|
+
<module fileurl="file://$PROJECT_DIR$/.idea/modules/android.iml" filepath="$PROJECT_DIR$/.idea/modules/android.iml" />
|
|
6
|
+
</modules>
|
|
7
|
+
</component>
|
|
8
|
+
</project>
|
package/android/build.gradle
CHANGED
|
@@ -1,138 +1,62 @@
|
|
|
1
1
|
buildscript {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
classpath 'com.android.tools.build:gradle:3.5.3'
|
|
9
|
-
}
|
|
10
|
-
}
|
|
2
|
+
if (project == rootProject) {
|
|
3
|
+
repositories {
|
|
4
|
+
google()
|
|
5
|
+
mavenCentral()
|
|
6
|
+
jcenter()
|
|
7
|
+
}
|
|
11
8
|
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
dependencies {
|
|
10
|
+
classpath 'com.android.tools.build:gradle:3.5.3'
|
|
11
|
+
}
|
|
12
|
+
}
|
|
14
13
|
}
|
|
15
14
|
|
|
16
15
|
apply plugin: 'com.android.library'
|
|
17
16
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
def getExtOrDefault(name) {
|
|
23
|
-
return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties['HyperpaySdk_' + name]
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
def getExtOrIntegerDefault(name) {
|
|
27
|
-
return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties['HyperpaySdk_' + name]).toInteger()
|
|
17
|
+
def safeExtGet(prop, fallback) {
|
|
18
|
+
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
|
|
28
19
|
}
|
|
29
20
|
|
|
30
21
|
android {
|
|
31
|
-
|
|
22
|
+
compileSdkVersion safeExtGet('HyperPay_compileSdkVersion', 29)
|
|
23
|
+
defaultConfig {
|
|
24
|
+
minSdkVersion safeExtGet('HyperPay_minSdkVersion', 21)
|
|
25
|
+
targetSdkVersion safeExtGet('HyperPay_targetSdkVersion', 29)
|
|
26
|
+
versionCode 1
|
|
27
|
+
versionName "1.0"
|
|
32
28
|
|
|
33
|
-
defaultConfig {
|
|
34
|
-
minSdkVersion getExtOrIntegerDefault('minSdkVersion')
|
|
35
|
-
targetSdkVersion getExtOrIntegerDefault('targetSdkVersion')
|
|
36
|
-
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
|
|
37
|
-
}
|
|
38
|
-
buildTypes {
|
|
39
|
-
release {
|
|
40
|
-
minifyEnabled false
|
|
41
29
|
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
lintOptions {
|
|
45
|
-
disable 'GradleCompatible'
|
|
46
|
-
}
|
|
47
30
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
31
|
+
buildTypes {
|
|
32
|
+
release {
|
|
33
|
+
minifyEnabled false
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
lintOptions {
|
|
37
|
+
disable 'GradleCompatible'
|
|
38
|
+
}
|
|
39
|
+
compileOptions {
|
|
40
|
+
sourceCompatibility JavaVersion.VERSION_1_8
|
|
41
|
+
targetCompatibility JavaVersion.VERSION_1_8
|
|
42
|
+
}
|
|
52
43
|
}
|
|
53
44
|
|
|
54
45
|
repositories {
|
|
55
|
-
|
|
56
|
-
google()
|
|
57
|
-
|
|
58
|
-
def found = false
|
|
59
|
-
def defaultDir = null
|
|
60
|
-
def androidSourcesName = 'React Native sources'
|
|
61
|
-
|
|
62
|
-
if (rootProject.ext.has('reactNativeAndroidRoot')) {
|
|
63
|
-
defaultDir = rootProject.ext.get('reactNativeAndroidRoot')
|
|
64
|
-
} else {
|
|
65
|
-
defaultDir = new File(
|
|
66
|
-
projectDir,
|
|
67
|
-
'/../../../node_modules/react-native/android'
|
|
68
|
-
)
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
if (defaultDir.exists()) {
|
|
46
|
+
mavenLocal()
|
|
72
47
|
maven {
|
|
73
|
-
|
|
74
|
-
|
|
48
|
+
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
|
|
49
|
+
url("$rootDir/../node_modules/react-native/android")
|
|
75
50
|
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
} else {
|
|
80
|
-
def parentDir = rootProject.projectDir
|
|
81
|
-
|
|
82
|
-
1.upto(5, {
|
|
83
|
-
if (found) return true
|
|
84
|
-
parentDir = parentDir.parentFile
|
|
85
|
-
|
|
86
|
-
def androidSourcesDir = new File(
|
|
87
|
-
parentDir,
|
|
88
|
-
'node_modules/react-native'
|
|
89
|
-
)
|
|
90
|
-
|
|
91
|
-
def androidPrebuiltBinaryDir = new File(
|
|
92
|
-
parentDir,
|
|
93
|
-
'node_modules/react-native/android'
|
|
94
|
-
)
|
|
95
|
-
|
|
96
|
-
if (androidPrebuiltBinaryDir.exists()) {
|
|
97
|
-
maven {
|
|
98
|
-
url androidPrebuiltBinaryDir.toString()
|
|
99
|
-
name androidSourcesName
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
logger.info(":${project.name}:reactNativeAndroidRoot ${androidPrebuiltBinaryDir.canonicalPath}")
|
|
103
|
-
found = true
|
|
104
|
-
} else if (androidSourcesDir.exists()) {
|
|
105
|
-
maven {
|
|
106
|
-
url androidSourcesDir.toString()
|
|
107
|
-
name androidSourcesName
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
logger.info(":${project.name}:reactNativeAndroidRoot ${androidSourcesDir.canonicalPath}")
|
|
111
|
-
found = true
|
|
112
|
-
}
|
|
113
|
-
})
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
if (!found) {
|
|
117
|
-
throw new GradleException(
|
|
118
|
-
"${project.name}: unable to locate React Native android sources. " +
|
|
119
|
-
"Ensure you have you installed React Native as a dependency in your project and try again."
|
|
120
|
-
)
|
|
121
|
-
}
|
|
51
|
+
google()
|
|
52
|
+
mavenCentral()
|
|
53
|
+
jcenter()
|
|
122
54
|
}
|
|
123
55
|
|
|
124
|
-
|
|
125
56
|
dependencies {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
// From node_modules
|
|
130
|
-
}
|
|
57
|
+
implementation files('oppwa.mobile-2.44.0/oppwa.mobile-3.14.0-release.aar')
|
|
58
|
+
|
|
59
|
+
//noinspection GradleDynamicVersion
|
|
60
|
+
implementation "com.facebook.react:react-native:+" // From node_modules
|
|
131
61
|
|
|
132
|
-
if (isNewArchitectureEnabled()) {
|
|
133
|
-
react {
|
|
134
|
-
jsRootDir = file("../src/")
|
|
135
|
-
libraryName = "HyperpaySdk"
|
|
136
|
-
codegenJavaPackageName = "com.reactnativehyperpaysdk"
|
|
137
|
-
}
|
|
138
62
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
## This file must *NOT* be checked into Version Control Systems,
|
|
2
|
+
# as it contains information specific to your local configuration.
|
|
3
|
+
#
|
|
4
|
+
# Location of the SDK. This is only used by Gradle.
|
|
5
|
+
# For customization when using a Version Control System, please read the
|
|
6
|
+
# header note.
|
|
7
|
+
#Thu Feb 17 07:03:37 EET 2022
|
|
8
|
+
sdk.dir=/Users/r.mabrouk/Library/Android/sdk
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
package com.
|
|
1
|
+
package com.reactnativehyperpay;
|
|
2
2
|
|
|
3
3
|
import androidx.annotation.NonNull;
|
|
4
4
|
|
|
@@ -7,12 +7,12 @@ import com.facebook.react.bridge.ReactApplicationContext;
|
|
|
7
7
|
import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
|
8
8
|
import com.facebook.react.bridge.ReactMethod;
|
|
9
9
|
import com.facebook.react.module.annotations.ReactModule;
|
|
10
|
+
import com.oppwa.mobile.connect.provider.Transaction;
|
|
11
|
+
@ReactModule(name = HyperPayModule.NAME)
|
|
12
|
+
public class HyperPayModule extends ReactContextBaseJavaModule {
|
|
13
|
+
public static final String NAME = "HyperPay";
|
|
10
14
|
|
|
11
|
-
|
|
12
|
-
public class HyperpaySdkModule extends ReactContextBaseJavaModule {
|
|
13
|
-
public static final String NAME = "HyperpaySdk";
|
|
14
|
-
|
|
15
|
-
public HyperpaySdkModule(ReactApplicationContext reactContext) {
|
|
15
|
+
public HyperPayModule(ReactApplicationContext reactContext) {
|
|
16
16
|
super(reactContext);
|
|
17
17
|
}
|
|
18
18
|
|
|
@@ -26,8 +26,9 @@ public class HyperpaySdkModule extends ReactContextBaseJavaModule {
|
|
|
26
26
|
// Example method
|
|
27
27
|
// See https://reactnative.dev/docs/native-modules-android
|
|
28
28
|
@ReactMethod
|
|
29
|
-
public void multiply(
|
|
29
|
+
public void multiply(int a, int b, Promise promise) {
|
|
30
30
|
promise.resolve(a * b);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
+
public static native int nativeMultiply(int a, int b);
|
|
33
34
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
package com.
|
|
1
|
+
package com.reactnativehyperpay;
|
|
2
2
|
|
|
3
3
|
import androidx.annotation.NonNull;
|
|
4
4
|
|
|
@@ -11,12 +11,12 @@ import java.util.ArrayList;
|
|
|
11
11
|
import java.util.Collections;
|
|
12
12
|
import java.util.List;
|
|
13
13
|
|
|
14
|
-
public class
|
|
14
|
+
public class HyperPayPackage implements ReactPackage {
|
|
15
15
|
@NonNull
|
|
16
16
|
@Override
|
|
17
17
|
public List<NativeModule> createNativeModules(@NonNull ReactApplicationContext reactContext) {
|
|
18
18
|
List<NativeModule> modules = new ArrayList<>();
|
|
19
|
-
modules.add(new
|
|
19
|
+
modules.add(new HyperPayModule(reactContext));
|
|
20
20
|
return modules;
|
|
21
21
|
}
|
|
22
22
|
|
package/ios/HyperPay.h
ADDED
|
@@ -1,20 +1,16 @@
|
|
|
1
|
+
|
|
1
2
|
#import <Foundation/Foundation.h>
|
|
2
|
-
#import "
|
|
3
|
+
#import "HyperPay.h"
|
|
3
4
|
#import <React/RCTLog.h>
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
#import "RNHyperpaySdkSpec.h"
|
|
7
|
-
#endif
|
|
8
|
-
|
|
9
|
-
@implementation HyperpaySdk
|
|
6
|
+
@implementation HyperPay
|
|
10
7
|
|
|
11
8
|
OPPPaymentProvider *provider;
|
|
12
9
|
|
|
13
10
|
|
|
14
11
|
|
|
15
12
|
|
|
16
|
-
|
|
17
|
-
RCT_EXPORT_MODULE(HyperpaySdk)
|
|
13
|
+
RCT_EXPORT_MODULE(HyperPay)
|
|
18
14
|
|
|
19
15
|
-(instancetype)init
|
|
20
16
|
{
|
|
@@ -97,5 +93,3 @@ RCT_REMAP_METHOD(multiply,
|
|
|
97
93
|
@end
|
|
98
94
|
|
|
99
95
|
|
|
100
|
-
|
|
101
|
-
|
|
@@ -7,7 +7,9 @@
|
|
|
7
7
|
objects = {
|
|
8
8
|
|
|
9
9
|
/* Begin PBXBuildFile section */
|
|
10
|
-
|
|
10
|
+
|
|
11
|
+
5E555C0D2413F4C50049A1A2 /* HyperPay.m in Sources */ = {isa = PBXBuildFile; fileRef = B3E7B5891CC2AC0600A0062D /* HyperPay.m */; };
|
|
12
|
+
|
|
11
13
|
/* End PBXBuildFile section */
|
|
12
14
|
|
|
13
15
|
/* Begin PBXCopyFilesBuildPhase section */
|
|
@@ -23,9 +25,11 @@
|
|
|
23
25
|
/* End PBXCopyFilesBuildPhase section */
|
|
24
26
|
|
|
25
27
|
/* Begin PBXFileReference section */
|
|
26
|
-
134814201AA4EA6300B7C361 /*
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
134814201AA4EA6300B7C361 /* libHyperPay.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libHyperPay.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
29
|
+
|
|
30
|
+
B3E7B5881CC2AC0600A0062D /* HyperPay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HyperPay.h; sourceTree = "<group>"; };
|
|
31
|
+
B3E7B5891CC2AC0600A0062D /* HyperPay.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HyperPay.m; sourceTree = "<group>"; };
|
|
32
|
+
|
|
29
33
|
/* End PBXFileReference section */
|
|
30
34
|
|
|
31
35
|
/* Begin PBXFrameworksBuildPhase section */
|
|
@@ -42,7 +46,7 @@
|
|
|
42
46
|
134814211AA4EA7D00B7C361 /* Products */ = {
|
|
43
47
|
isa = PBXGroup;
|
|
44
48
|
children = (
|
|
45
|
-
134814201AA4EA6300B7C361 /*
|
|
49
|
+
134814201AA4EA6300B7C361 /* libHyperPay.a */,
|
|
46
50
|
);
|
|
47
51
|
name = Products;
|
|
48
52
|
sourceTree = "<group>";
|
|
@@ -50,8 +54,10 @@
|
|
|
50
54
|
58B511D21A9E6C8500147676 = {
|
|
51
55
|
isa = PBXGroup;
|
|
52
56
|
children = (
|
|
53
|
-
|
|
54
|
-
|
|
57
|
+
|
|
58
|
+
B3E7B5881CC2AC0600A0062D /* HyperPay.h */,
|
|
59
|
+
B3E7B5891CC2AC0600A0062D /* HyperPay.m */,
|
|
60
|
+
|
|
55
61
|
134814211AA4EA7D00B7C361 /* Products */,
|
|
56
62
|
);
|
|
57
63
|
sourceTree = "<group>";
|
|
@@ -59,9 +65,9 @@
|
|
|
59
65
|
/* End PBXGroup section */
|
|
60
66
|
|
|
61
67
|
/* Begin PBXNativeTarget section */
|
|
62
|
-
58B511DA1A9E6C8500147676 /*
|
|
68
|
+
58B511DA1A9E6C8500147676 /* HyperPay */ = {
|
|
63
69
|
isa = PBXNativeTarget;
|
|
64
|
-
buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "
|
|
70
|
+
buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "HyperPay" */;
|
|
65
71
|
buildPhases = (
|
|
66
72
|
58B511D71A9E6C8500147676 /* Sources */,
|
|
67
73
|
58B511D81A9E6C8500147676 /* Frameworks */,
|
|
@@ -71,9 +77,9 @@
|
|
|
71
77
|
);
|
|
72
78
|
dependencies = (
|
|
73
79
|
);
|
|
74
|
-
name =
|
|
80
|
+
name = HyperPay;
|
|
75
81
|
productName = RCTDataManager;
|
|
76
|
-
productReference = 134814201AA4EA6300B7C361 /*
|
|
82
|
+
productReference = 134814201AA4EA6300B7C361 /* libHyperPay.a */;
|
|
77
83
|
productType = "com.apple.product-type.library.static";
|
|
78
84
|
};
|
|
79
85
|
/* End PBXNativeTarget section */
|
|
@@ -90,7 +96,7 @@
|
|
|
90
96
|
};
|
|
91
97
|
};
|
|
92
98
|
};
|
|
93
|
-
buildConfigurationList = 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "
|
|
99
|
+
buildConfigurationList = 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "HyperPay" */;
|
|
94
100
|
compatibilityVersion = "Xcode 3.2";
|
|
95
101
|
developmentRegion = English;
|
|
96
102
|
hasScannedForEncodings = 0;
|
|
@@ -103,7 +109,7 @@
|
|
|
103
109
|
projectDirPath = "";
|
|
104
110
|
projectRoot = "";
|
|
105
111
|
targets = (
|
|
106
|
-
58B511DA1A9E6C8500147676 /*
|
|
112
|
+
58B511DA1A9E6C8500147676 /* HyperPay */,
|
|
107
113
|
);
|
|
108
114
|
};
|
|
109
115
|
/* End PBXProject section */
|
|
@@ -113,7 +119,9 @@
|
|
|
113
119
|
isa = PBXSourcesBuildPhase;
|
|
114
120
|
buildActionMask = 2147483647;
|
|
115
121
|
files = (
|
|
116
|
-
|
|
122
|
+
|
|
123
|
+
B3E7B58A1CC2AC0600A0062D /* HyperPay.m in Sources */,
|
|
124
|
+
|
|
117
125
|
);
|
|
118
126
|
runOnlyForDeploymentPostprocessing = 0;
|
|
119
127
|
};
|
|
@@ -148,7 +156,6 @@
|
|
|
148
156
|
COPY_PHASE_STRIP = NO;
|
|
149
157
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
|
150
158
|
ENABLE_TESTABILITY = YES;
|
|
151
|
-
"EXCLUDED_ARCHS[sdk=*]" = arm64;
|
|
152
159
|
GCC_C_LANGUAGE_STANDARD = gnu99;
|
|
153
160
|
GCC_DYNAMIC_NO_PIC = NO;
|
|
154
161
|
GCC_NO_COMMON_BLOCKS = YES;
|
|
@@ -199,7 +206,6 @@
|
|
|
199
206
|
COPY_PHASE_STRIP = YES;
|
|
200
207
|
ENABLE_NS_ASSERTIONS = NO;
|
|
201
208
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
|
202
|
-
"EXCLUDED_ARCHS[sdk=*]" = arm64;
|
|
203
209
|
GCC_C_LANGUAGE_STANDARD = gnu99;
|
|
204
210
|
GCC_NO_COMMON_BLOCKS = YES;
|
|
205
211
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
|
@@ -226,8 +232,9 @@
|
|
|
226
232
|
);
|
|
227
233
|
LIBRARY_SEARCH_PATHS = "$(inherited)";
|
|
228
234
|
OTHER_LDFLAGS = "-ObjC";
|
|
229
|
-
PRODUCT_NAME =
|
|
235
|
+
PRODUCT_NAME = HyperPay;
|
|
230
236
|
SKIP_INSTALL = YES;
|
|
237
|
+
|
|
231
238
|
};
|
|
232
239
|
name = Debug;
|
|
233
240
|
};
|
|
@@ -242,15 +249,16 @@
|
|
|
242
249
|
);
|
|
243
250
|
LIBRARY_SEARCH_PATHS = "$(inherited)";
|
|
244
251
|
OTHER_LDFLAGS = "-ObjC";
|
|
245
|
-
PRODUCT_NAME =
|
|
252
|
+
PRODUCT_NAME = HyperPay;
|
|
246
253
|
SKIP_INSTALL = YES;
|
|
254
|
+
|
|
247
255
|
};
|
|
248
256
|
name = Release;
|
|
249
257
|
};
|
|
250
258
|
/* End XCBuildConfiguration section */
|
|
251
259
|
|
|
252
260
|
/* Begin XCConfigurationList section */
|
|
253
|
-
58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "
|
|
261
|
+
58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "HyperPay" */ = {
|
|
254
262
|
isa = XCConfigurationList;
|
|
255
263
|
buildConfigurations = (
|
|
256
264
|
58B511ED1A9E6C8500147676 /* Debug */,
|
|
@@ -259,7 +267,7 @@
|
|
|
259
267
|
defaultConfigurationIsVisible = 0;
|
|
260
268
|
defaultConfigurationName = Release;
|
|
261
269
|
};
|
|
262
|
-
58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "
|
|
270
|
+
58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "HyperPay" */ = {
|
|
263
271
|
isa = XCConfigurationList;
|
|
264
272
|
buildConfigurations = (
|
|
265
273
|
58B511F01A9E6C8500147676 /* Debug */,
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-hyperpay-sdk",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"description": "hyperpay",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
7
7
|
"types": "lib/typescript/index.d.ts",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"android",
|
|
14
14
|
"ios",
|
|
15
15
|
"cpp",
|
|
16
|
-
"react-native-hyperpay
|
|
16
|
+
"react-native-hyperpay.podspec",
|
|
17
17
|
"OPPWAMobile-Resources.bundle",
|
|
18
18
|
"OPPWAMobile.framework",
|
|
19
19
|
"!lib/typescript/example",
|
|
@@ -27,50 +27,46 @@
|
|
|
27
27
|
"test": "jest",
|
|
28
28
|
"typescript": "tsc --noEmit",
|
|
29
29
|
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
30
|
-
"prepare": "bob build",
|
|
31
30
|
"release": "release-it",
|
|
32
31
|
"example": "yarn --cwd example",
|
|
33
|
-
"
|
|
32
|
+
"pods": "cd example && pod-install --quiet",
|
|
33
|
+
"bootstrap": "yarn example && yarn && yarn pods"
|
|
34
34
|
},
|
|
35
35
|
"keywords": [
|
|
36
36
|
"react-native",
|
|
37
37
|
"ios",
|
|
38
38
|
"android"
|
|
39
39
|
],
|
|
40
|
-
"repository": "https://github.com/RMabroukS/react-native-hyperpay
|
|
40
|
+
"repository": "https://github.com/RMabroukS/react-native-hyperpay",
|
|
41
41
|
"author": "RMabroukS <r.mabrouk.sayed@gmail.com> (https://github.com/RMabroukS)",
|
|
42
42
|
"license": "MIT",
|
|
43
43
|
"bugs": {
|
|
44
|
-
"url": "https://github.com/RMabroukS/react-native-hyperpay
|
|
44
|
+
"url": "https://github.com/RMabroukS/react-native-hyperpay/issues"
|
|
45
45
|
},
|
|
46
|
-
"homepage": "https://github.com/RMabroukS/react-native-hyperpay
|
|
46
|
+
"homepage": "https://github.com/RMabroukS/react-native-hyperpay#readme",
|
|
47
47
|
"publishConfig": {
|
|
48
48
|
"registry": "https://registry.npmjs.org/"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@
|
|
52
|
-
"@
|
|
53
|
-
"@
|
|
54
|
-
"@
|
|
55
|
-
"@
|
|
56
|
-
"@types/
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"eslint": "^
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"jest": "^28.1.1",
|
|
51
|
+
"@commitlint/config-conventional": "^11.0.0",
|
|
52
|
+
"@react-native-community/eslint-config": "^2.0.0",
|
|
53
|
+
"@release-it/conventional-changelog": "^2.0.0",
|
|
54
|
+
"@types/jest": "^26.0.0",
|
|
55
|
+
"@types/react": "^16.9.19",
|
|
56
|
+
"@types/react-native": "0.62.13",
|
|
57
|
+
"commitlint": "^11.0.0",
|
|
58
|
+
"eslint": "^7.2.0",
|
|
59
|
+
"eslint-config-prettier": "^7.0.0",
|
|
60
|
+
"eslint-plugin-prettier": "^3.1.3",
|
|
61
|
+
"husky": "^6.0.0",
|
|
62
|
+
"jest": "^26.0.1",
|
|
64
63
|
"pod-install": "^0.1.0",
|
|
65
64
|
"prettier": "^2.0.5",
|
|
66
|
-
"react": "
|
|
67
|
-
"react-native": "0.
|
|
68
|
-
"react-native-builder-bob": "^0.18.
|
|
69
|
-
"release-it": "^
|
|
70
|
-
"typescript": "^4.
|
|
71
|
-
},
|
|
72
|
-
"resolutions": {
|
|
73
|
-
"@types/react": "17.0.21"
|
|
65
|
+
"react": "16.13.1",
|
|
66
|
+
"react-native": "0.63.4",
|
|
67
|
+
"react-native-builder-bob": "^0.18.0",
|
|
68
|
+
"release-it": "^14.2.2",
|
|
69
|
+
"typescript": "^4.1.3"
|
|
74
70
|
},
|
|
75
71
|
"peerDependencies": {
|
|
76
72
|
"react": "*",
|
|
@@ -107,7 +103,6 @@
|
|
|
107
103
|
},
|
|
108
104
|
"eslintConfig": {
|
|
109
105
|
"root": true,
|
|
110
|
-
"parser": "@babel/eslint-parser",
|
|
111
106
|
"extends": [
|
|
112
107
|
"@react-native-community",
|
|
113
108
|
"prettier"
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
require "json"
|
|
2
|
+
|
|
3
|
+
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
|
|
4
|
+
|
|
5
|
+
Pod::Spec.new do |s|
|
|
6
|
+
s.name = "react-native-hyperpay"
|
|
7
|
+
s.version = package["version"]
|
|
8
|
+
s.summary = package["description"]
|
|
9
|
+
s.homepage = package["homepage"]
|
|
10
|
+
s.license = package["license"]
|
|
11
|
+
s.authors = package["author"]
|
|
12
|
+
s.platforms = { :ios => "10.0" }
|
|
13
|
+
s.source = { :git => "https://github.com/RMabroukS/react-native-hyperpay.git", :tag => "#{s.version}" }
|
|
14
|
+
s.source_files = "ios/**/*.{h,m,mm}"
|
|
15
|
+
s.dependency "React-Core"
|
|
16
|
+
s.requires_arc = true
|
|
17
|
+
s.vendored_frameworks = "OPPWAMobile.framework"
|
|
18
|
+
s.public_header_files = "OPPWAMobile.framework/Versions/2.47.0/Headers/*.h"
|
|
19
|
+
s.resource_bundle = { 'OPPWAMobile-Resources' => '*' }
|
|
20
|
+
end
|