payme-mini-app 0.7.0 → 0.7.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.
@@ -74,7 +74,7 @@ dependencies {
74
74
  //noinspection GradleDynamicVersion
75
75
  implementation "com.facebook.react:react-native:+"
76
76
  implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
77
- implementation 'com.github.PayME-Miniapp:native-android:0.0.95'
77
+ implementation 'com.github.PayME-Miniapp:native-android:0.0.96'
78
78
  }
79
79
 
80
80
  if (isNewArchitectureEnabled()) {
@@ -41,7 +41,7 @@ class RNPayMEMiniAppModule(reactContext: ReactApplicationContext) :
41
41
  @ReactMethod
42
42
  fun initPayME(appId: String, publicKey: String, privateKey: String, locale: String, env: String, mode: String) {
43
43
  val fragmentActivity: Activity? = currentActivity
44
- MiniAppFragment.setLoadUrl("https://543a-113-161-36-155.ngrok-free.app/")
44
+
45
45
  payMEMiniApp = fragmentActivity?.let {
46
46
  PayMEMiniApp(
47
47
  it, appId, publicKey, privateKey, getEnv(env), getLocale(locale)
@@ -73,6 +73,11 @@ class RNPayMEMiniAppModule(reactContext: ReactApplicationContext) :
73
73
  payMEMiniApp?.setLanguage(locale)
74
74
  }
75
75
 
76
+ @ReactMethod
77
+ fun closeMiniApp() {
78
+ payMEMiniApp?.close()
79
+ }
80
+
76
81
  @ReactMethod
77
82
  fun open(type: String, openingParam: ReadableMap) {
78
83
  val action = openingParam.getString("action") ?: "PAYME"
@@ -321,11 +326,7 @@ class RNPayMEMiniAppModule(reactContext: ReactApplicationContext) :
321
326
  .emit(eventName, params)
322
327
  }
323
328
  }
324
-
325
- private fun closeMiniApp(){
326
- payMEMiniApp?.close()
327
- }
328
-
329
+
329
330
  companion object {
330
331
  const val NAME = "RNPayMEMiniApp"
331
332
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "payme-mini-app",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
4
4
  "description": "Thư viện tích hợp PayME Miniapp",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",