react-native-hyperpay-sdk 0.3.0 → 0.6.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} +17 -16
- package/ios/{HyperpaySdk.xcodeproj → HyperPay.xcodeproj}/project.pbxproj +28 -20
- package/ios/{HyperpaySdk.xcodeproj → HyperPay.xcodeproj}/project.xcworkspace/contents.xcworkspacedata +0 -0
- package/lib/typescript/index.d.ts +32 -1
- package/package.json +25 -30
- package/react-native-hyperpay.podspec +20 -0
- package/src/index.tsx +22 -11
- package/android/gradle.properties +0 -5
- package/ios/HyperpaySdk.h +0 -5
- package/react-native-hyperpay-sdk.podspec +0 -40
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.6.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
|
package/src/index.tsx
CHANGED
|
@@ -1,20 +1,31 @@
|
|
|
1
1
|
import { NativeModules, Platform } from 'react-native';
|
|
2
|
-
|
|
2
|
+
import type { CreateTransactionResponseType, CreateTransactionParams, ConfigType } from '../lib/typescript'
|
|
3
3
|
const LINKING_ERROR =
|
|
4
|
-
`The package 'react-native-hyperpay
|
|
4
|
+
`The package 'react-native-hyperpay' doesn't seem to be linked. Make sure: \n\n` +
|
|
5
5
|
Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) +
|
|
6
6
|
'- You rebuilt the app after installing the package\n' +
|
|
7
7
|
'- You are not using Expo managed workflow\n';
|
|
8
8
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
const HyperPay = NativeModules.HyperPay
|
|
10
|
+
? NativeModules.HyperPay
|
|
11
|
+
: new Proxy(
|
|
12
|
+
{},
|
|
13
|
+
{
|
|
14
|
+
get() {
|
|
15
|
+
throw new Error(LINKING_ERROR);
|
|
16
|
+
},
|
|
17
|
+
}
|
|
18
|
+
);
|
|
17
19
|
|
|
18
20
|
export function multiply(a: number, b: number): Promise<number> {
|
|
19
|
-
return
|
|
21
|
+
return HyperPay.multiply(a, b);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function createPaymentTransaction(params: CreateTransactionParams): Promise<CreateTransactionResponseType> {
|
|
25
|
+
return HyperPay.createPaymentTransaction(params);
|
|
20
26
|
}
|
|
27
|
+
export function setConfig(params: ConfigType): ConfigType {
|
|
28
|
+
return HyperPay.setConfig(params);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
|
package/ios/HyperpaySdk.h
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
require "json"
|
|
2
|
-
|
|
3
|
-
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
|
|
4
|
-
folly_version = '2021.06.28.00-v2'
|
|
5
|
-
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
|
|
6
|
-
|
|
7
|
-
Pod::Spec.new do |s|
|
|
8
|
-
s.name = "react-native-hyperpay-sdk"
|
|
9
|
-
s.version = package["version"]
|
|
10
|
-
s.summary = package["description"]
|
|
11
|
-
s.homepage = package["homepage"]
|
|
12
|
-
s.license = package["license"]
|
|
13
|
-
s.authors = package["author"]
|
|
14
|
-
|
|
15
|
-
s.platforms = { :ios => "10.0" }
|
|
16
|
-
s.source = { :git => "https://github.com/RMabroukS/react-native-hyperpay-sdk.git", :tag => "#{s.version}" }
|
|
17
|
-
|
|
18
|
-
s.source_files = "ios/**/*.{h,m,mm}"
|
|
19
|
-
|
|
20
|
-
s.dependency "React-Core"
|
|
21
|
-
s.requires_arc = true
|
|
22
|
-
s.vendored_frameworks = "OPPWAMobile.framework"
|
|
23
|
-
s.public_header_files = "OPPWAMobile.framework/Versions/2.47.0/Headers/*.h"
|
|
24
|
-
s.resource_bundle = { 'OPPWAMobile-Resources' => '*' }
|
|
25
|
-
|
|
26
|
-
# Don't install the dependencies when we run `pod install` in the old architecture.
|
|
27
|
-
if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
|
|
28
|
-
s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
|
|
29
|
-
s.pod_target_xcconfig = {
|
|
30
|
-
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
|
|
31
|
-
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
s.dependency "React-Codegen"
|
|
35
|
-
s.dependency "RCT-Folly", folly_version
|
|
36
|
-
s.dependency "RCTRequired"
|
|
37
|
-
s.dependency "RCTTypeSafety"
|
|
38
|
-
s.dependency "ReactCommon/turbomodule/core"
|
|
39
|
-
end
|
|
40
|
-
end
|