payme-mini-app 0.2.5 → 0.3.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.
@@ -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.36'
77
+ implementation 'com.github.PayME-Miniapp:native-android:0.0.37'
78
78
  }
79
79
 
80
80
  if (isNewArchitectureEnabled()) {
@@ -34,7 +34,7 @@ class RNPayMEMiniApp: RCTEventEmitter, PayMEDelegate {
34
34
 
35
35
  DispatchQueue.main.sync {
36
36
  let RNVC = UIApplication.shared.delegate?.window??.rootViewController
37
- self.payme.open(with: PayMEOpeningParam(action: openAction, phone: param["phone"] as! String, data: openData), from: RNVC)
37
+ self.payme.open(with: PayMEOpeningParam(action: openAction, phone: param["phone"] as! String, data: openData), from: RNVC, type: PayMEOpeningType(rawValue: type) ?? .screen)
38
38
  }
39
39
  }
40
40
 
@@ -1 +1 @@
1
- {"version":3,"names":["RNPayMEMiniApp","NativeModules","init","appId","publicKey","privateKey","env","initPayME","open","type","openingParam","getBalance","phone","PayMEMiniAppEvents","NativeEventEmitter"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;AAAA;AAGA,MAAMA,cAAc,GAAGC,0BAAa,CAACD,cAAc;AAE5C,SAASE,IAAI,CAClBC,KAAa,EACbC,SAAiB,EACjBC,UAAkB,EAClBC,GAAa,EACb;EACA,OAAON,cAAc,CAACO,SAAS,CAACJ,KAAK,EAAEC,SAAS,EAAEC,UAAU,EAAEC,GAAG,CAAC;AACpE;AAEO,SAASE,IAAI,CAACC,IAAY,EAAEC,YAA+B,EAAE;EAClE,OAAOV,cAAc,CAACQ,IAAI,CAACC,IAAI,EAAEC,YAAY,CAAC;AAChD;AAEO,SAASC,UAAU,CAACC,KAAa,EAAE;EACxC,OAAOZ,cAAc,CAACW,UAAU,CAACC,KAAK,CAAC;AACzC;AAEO,MAAMC,kBAAkB,GAAG,IAAIC,+BAAkB,CAACd,cAAc,CAAC;AAAC"}
1
+ {"version":3,"names":["RNPayMEMiniApp","NativeModules","init","appId","publicKey","privateKey","env","initPayME","open","type","openingParam","getBalance","phone","PayMEMiniAppEvents","NativeEventEmitter"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;AAAA;AAOA,MAAMA,cAAc,GAAGC,0BAAa,CAACD,cAAc;AAE5C,SAASE,IAAI,CAClBC,KAAa,EACbC,SAAiB,EACjBC,UAAkB,EAClBC,GAAa,EACb;EACA,OAAON,cAAc,CAACO,SAAS,CAACJ,KAAK,EAAEC,SAAS,EAAEC,UAAU,EAAEC,GAAG,CAAC;AACpE;AAEO,SAASE,IAAI,CAACC,IAAsB,EAAEC,YAA+B,EAAE;EAC5E,OAAOV,cAAc,CAACQ,IAAI,CAACC,IAAI,EAAEC,YAAY,CAAC;AAChD;AAEO,SAASC,UAAU,CAACC,KAAa,EAAE;EACxC,OAAOZ,cAAc,CAACW,UAAU,CAACC,KAAK,CAAC;AACzC;AAEO,MAAMC,kBAAkB,GAAG,IAAIC,+BAAkB,CAACd,cAAc,CAAC;AAAC"}
@@ -1 +1 @@
1
- {"version":3,"names":["NativeEventEmitter","NativeModules","RNPayMEMiniApp","init","appId","publicKey","privateKey","env","initPayME","open","type","openingParam","getBalance","phone","PayMEMiniAppEvents"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"AAAA,SAASA,kBAAkB,EAAEC,aAAa,QAAQ,cAAc;AAGhE,MAAMC,cAAc,GAAGD,aAAa,CAACC,cAAc;AAEnD,OAAO,SAASC,IAAI,CAClBC,KAAa,EACbC,SAAiB,EACjBC,UAAkB,EAClBC,GAAa,EACb;EACA,OAAOL,cAAc,CAACM,SAAS,CAACJ,KAAK,EAAEC,SAAS,EAAEC,UAAU,EAAEC,GAAG,CAAC;AACpE;AAEA,OAAO,SAASE,IAAI,CAACC,IAAY,EAAEC,YAA+B,EAAE;EAClE,OAAOT,cAAc,CAACO,IAAI,CAACC,IAAI,EAAEC,YAAY,CAAC;AAChD;AAEA,OAAO,SAASC,UAAU,CAACC,KAAa,EAAE;EACxC,OAAOX,cAAc,CAACU,UAAU,CAACC,KAAK,CAAC;AACzC;AAEA,OAAO,MAAMC,kBAAkB,GAAG,IAAId,kBAAkB,CAACE,cAAc,CAAC"}
1
+ {"version":3,"names":["NativeEventEmitter","NativeModules","RNPayMEMiniApp","init","appId","publicKey","privateKey","env","initPayME","open","type","openingParam","getBalance","phone","PayMEMiniAppEvents"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"AAAA,SAASA,kBAAkB,EAAEC,aAAa,QAAQ,cAAc;AAOhE,MAAMC,cAAc,GAAGD,aAAa,CAACC,cAAc;AAEnD,OAAO,SAASC,IAAI,CAClBC,KAAa,EACbC,SAAiB,EACjBC,UAAkB,EAClBC,GAAa,EACb;EACA,OAAOL,cAAc,CAACM,SAAS,CAACJ,KAAK,EAAEC,SAAS,EAAEC,UAAU,EAAEC,GAAG,CAAC;AACpE;AAEA,OAAO,SAASE,IAAI,CAACC,IAAsB,EAAEC,YAA+B,EAAE;EAC5E,OAAOT,cAAc,CAACO,IAAI,CAACC,IAAI,EAAEC,YAAY,CAAC;AAChD;AAEA,OAAO,SAASC,UAAU,CAACC,KAAa,EAAE;EACxC,OAAOX,cAAc,CAACU,UAAU,CAACC,KAAK,CAAC;AACzC;AAEA,OAAO,MAAMC,kBAAkB,GAAG,IAAId,kBAAkB,CAACE,cAAc,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { NativeEventEmitter } from 'react-native';
2
- import type { PayMEEnv, PayMEOpeningParam } from './index.type';
2
+ import type { PayMEEnv, PayMEOpeningParam, PayMEOpeningType } from './index.type';
3
3
  export declare function init(appId: string, publicKey: string, privateKey: string, env: PayMEEnv): any;
4
- export declare function open(type: string, openingParam: PayMEOpeningParam): any;
4
+ export declare function open(type: PayMEOpeningType, openingParam: PayMEOpeningParam): any;
5
5
  export declare function getBalance(phone: string): any;
6
6
  export declare const PayMEMiniAppEvents: NativeEventEmitter;
7
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAiB,MAAM,cAAc,CAAC;AACjE,OAAO,KAAK,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAIhE,wBAAgB,IAAI,CAClB,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,GAAG,EAAE,QAAQ,OAGd;AAED,wBAAgB,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,iBAAiB,OAEjE;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,OAEvC;AAED,eAAO,MAAM,kBAAkB,oBAAyC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAiB,MAAM,cAAc,CAAC;AACjE,OAAO,KAAK,EACV,QAAQ,EACR,iBAAiB,EACjB,gBAAgB,EACjB,MAAM,cAAc,CAAC;AAItB,wBAAgB,IAAI,CAClB,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,GAAG,EAAE,QAAQ,OAGd;AAED,wBAAgB,IAAI,CAAC,IAAI,EAAE,gBAAgB,EAAE,YAAY,EAAE,iBAAiB,OAE3E;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,OAEvC;AAED,eAAO,MAAM,kBAAkB,oBAAyC,CAAC"}
@@ -16,5 +16,6 @@ export type PayMEOpeningParam = {
16
16
  data: PayMEPaymentParam;
17
17
  };
18
18
  export type PayMEEnv = 'PRODUCTION' | 'SANDBOX';
19
+ export type PayMEOpeningType = 'screen' | 'modal';
19
20
  export {};
20
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"}
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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "payme-mini-app",
3
- "version": "0.2.5",
3
+ "version": "0.3.0",
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.1.2"
19
+ s.dependency "PayMEMiniApp", "~> 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.tsx CHANGED
@@ -1,5 +1,9 @@
1
1
  import { NativeEventEmitter, NativeModules } from 'react-native';
2
- import type { PayMEEnv, PayMEOpeningParam } from './index.type';
2
+ import type {
3
+ PayMEEnv,
4
+ PayMEOpeningParam,
5
+ PayMEOpeningType,
6
+ } from './index.type';
3
7
 
4
8
  const RNPayMEMiniApp = NativeModules.RNPayMEMiniApp;
5
9
 
@@ -12,7 +16,7 @@ export function init(
12
16
  return RNPayMEMiniApp.initPayME(appId, publicKey, privateKey, env);
13
17
  }
14
18
 
15
- export function open(type: string, openingParam: PayMEOpeningParam) {
19
+ export function open(type: PayMEOpeningType, openingParam: PayMEOpeningParam) {
16
20
  return RNPayMEMiniApp.open(type, openingParam);
17
21
  }
18
22
 
package/src/index.type.ts CHANGED
@@ -11,3 +11,5 @@ export type PayMEOpeningParam =
11
11
  | { action: 'PAY'; phone: string; data: PayMEPaymentParam };
12
12
 
13
13
  export type PayMEEnv = 'PRODUCTION' | 'SANDBOX';
14
+
15
+ export type PayMEOpeningType = 'screen' | 'modal';