payme-mini-app 0.4.4 → 0.4.6

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.43'
77
+ implementation 'com.github.PayME-Miniapp:native-android:0.0.61'
78
78
  }
79
79
 
80
80
  if (isNewArchitectureEnabled()) {
@@ -80,7 +80,9 @@ class RNPayMEMiniAppModule(reactContext: ReactApplicationContext) :
80
80
  try {
81
81
  Log.d("PAYMELOG", "jsonObject $jsonObject")
82
82
  val payload = JsonConvert.jsonToReact(jsonObject)
83
- payload.putString("action", actionOpenMiniApp.toString())
83
+ if (!payload.hasKey("action")) {
84
+ payload.putString("action", actionOpenMiniApp.toString())
85
+ }
84
86
  sendEvent(
85
87
  reactApplicationContext,
86
88
  "onResponse", payload
@@ -7,7 +7,7 @@ class RNPayMEMiniApp: RCTEventEmitter, PayMEDelegate {
7
7
  @objc func initPayME(_ appId: String, publicKey: String, privateKey: String, env: String, mode: String? = "product") {
8
8
  DispatchQueue.main.sync {
9
9
  PayMEConfig.instance.setMode(mode ?? "miniapp_product")
10
- PayMEConfig.instance.env = (env == "SANDBOX") ? .sbx : .prod
10
+ PayMEConfig.instance.env = (env == "DEV") ? .dev : ((env == "SANDBOX") ? .sbx : .prod)
11
11
  self.payme = PayME(key: PayMEKey(appId: appId, publicKey: publicKey, privateKey: privateKey))
12
12
  self.payme.delegate = self
13
13
  }
@@ -15,7 +15,7 @@ export type PayMEOpeningParam = {
15
15
  phone: string;
16
16
  data: PayMEPaymentParam;
17
17
  };
18
- export type PayMEEnv = 'PRODUCTION' | 'SANDBOX';
18
+ export type PayMEEnv = 'PRODUCTION' | 'SANDBOX' | 'DEV';
19
19
  export type PayMEOpeningType = 'screen' | 'modal';
20
20
  export {};
21
21
  //# sourceMappingURL=index.type.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.type.d.ts","sourceRoot":"","sources":["../../src/index.type.ts"],"names":[],"mappings":"AAAA,KAAK,iBAAiB,GAAG;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GACzB;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAClC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACjC;IAAE,MAAM,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,iBAAiB,CAAA;CAAE,CAAC;AAE9D,MAAM,MAAM,QAAQ,GAAG,YAAY,GAAG,SAAS,CAAC;AAEhD,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,OAAO,CAAC"}
1
+ {"version":3,"file":"index.type.d.ts","sourceRoot":"","sources":["../../src/index.type.ts"],"names":[],"mappings":"AAAA,KAAK,iBAAiB,GAAG;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GACzB;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAClC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACjC;IAAE,MAAM,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,iBAAiB,CAAA;CAAE,CAAC;AAE9D,MAAM,MAAM,QAAQ,GAAG,YAAY,GAAG,SAAS,GAAG,KAAK,CAAC;AAExD,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,OAAO,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "payme-mini-app",
3
- "version": "0.4.4",
3
+ "version": "0.4.6",
4
4
  "description": "test",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -16,7 +16,7 @@ Pod::Spec.new do |s|
16
16
  s.swift_versions = "5.0"
17
17
  s.source_files = "ios/**/*.{h,m,mm,swift}"
18
18
 
19
- s.dependency "PayMEMiniApp", "~> 0.2.0"
19
+ s.dependency "PayME-Miniapp", "~> 0.2.0"
20
20
  s.dependency "React-Core"
21
21
  s.pod_target_xcconfig = { 'BUILD_LIBRARY_FOR_DISTRIBUTION' => 'YES' }
22
22
  # Don't install the dependencies when we run `pod install` in the old architecture.
package/src/index.type.ts CHANGED
@@ -10,6 +10,6 @@ export type PayMEOpeningParam =
10
10
  | { action: 'OPEN'; phone: string }
11
11
  | { action: 'PAY'; phone: string; data: PayMEPaymentParam };
12
12
 
13
- export type PayMEEnv = 'PRODUCTION' | 'SANDBOX';
13
+ export type PayMEEnv = 'PRODUCTION' | 'SANDBOX' | 'DEV';
14
14
 
15
15
  export type PayMEOpeningType = 'screen' | 'modal';