payme-mini-app 0.1.5 → 0.1.7
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/ios/RNPayMEMiniApp.m +1 -0
- package/ios/RNPayMEMiniApp.swift +9 -1
- package/ios/RNPayMEMiniApp.xcodeproj/project.xcworkspace/xcuserdata/montossc.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/lib/commonjs/index.js +4 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/index.js +3 -0
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/index.d.ts +2 -1
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/index.type.d.ts +3 -0
- package/lib/typescript/index.type.d.ts.map +1 -1
- package/package.json +1 -1
- package/payme-mini-app.podspec +1 -1
- package/src/index.tsx +5 -1
- package/src/index.type.ts +4 -0
package/ios/RNPayMEMiniApp.m
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
RCT_EXTERN_METHOD(initPayME:(NSString*)appId publicKey:(NSString)publicKey privateKey:(NSString)privateKey env:(NSString)env)
|
|
7
7
|
RCT_EXTERN_METHOD(open:(NSString*)type param:(NSDictionary)param)
|
|
8
|
+
RCT_EXTERN_METHOD(changeConfig:(NSDictionary*)newConfig)
|
|
8
9
|
|
|
9
10
|
+ (BOOL)requiresMainQueueSetup
|
|
10
11
|
{
|
package/ios/RNPayMEMiniApp.swift
CHANGED
|
@@ -12,6 +12,14 @@ class RNPayMEMiniApp: RCTEventEmitter, PayMEDelegate {
|
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
@objc func changeConfig(_ newConfig: NSDictionary) {
|
|
16
|
+
DispatchQueue.main.sync {
|
|
17
|
+
if let isLogging = newConfig["isLogging"] as? Bool {
|
|
18
|
+
PayMEConfig.instance.isLogging = isLogging
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
15
23
|
@objc func open(_ type: String, param: NSDictionary) {
|
|
16
24
|
let openAction: PayMEAction = {
|
|
17
25
|
switch param["action"] as? String {
|
|
@@ -27,7 +35,7 @@ class RNPayMEMiniApp: RCTEventEmitter, PayMEDelegate {
|
|
|
27
35
|
case "PAYME": fallthrough
|
|
28
36
|
case "OPEN": return nil
|
|
29
37
|
case "PAY":
|
|
30
|
-
return PayMEPaymentParam(amount: data["amount"] as! Int, transactionId: data["transactionId"] as! String, note: data["note"] as? String)
|
|
38
|
+
return PayMEPaymentParam(amount: data["amount"] as! Int, transactionId: data["transactionId"] as! String, note: data["note"] as? String, ipnUrl: data["ipnUrl"] as? String)
|
|
31
39
|
default: fatalError("Invalid action!")
|
|
32
40
|
}
|
|
33
41
|
}
|
|
Binary file
|
package/lib/commonjs/index.js
CHANGED
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.PayMEMiniAppEvents = void 0;
|
|
7
|
+
exports.changeConfig = changeConfig;
|
|
7
8
|
exports.init = init;
|
|
8
9
|
exports.open = open;
|
|
9
10
|
var _reactNative = require("react-native");
|
|
@@ -14,6 +15,9 @@ function init(appId, publicKey, privateKey, env) {
|
|
|
14
15
|
function open(type, openingParam) {
|
|
15
16
|
return RNPayMEMiniApp.open(type, openingParam);
|
|
16
17
|
}
|
|
18
|
+
function changeConfig(config) {
|
|
19
|
+
return RNPayMEMiniApp.changeConfig(config);
|
|
20
|
+
}
|
|
17
21
|
const PayMEMiniAppEvents = new _reactNative.NativeEventEmitter(RNPayMEMiniApp);
|
|
18
22
|
exports.PayMEMiniAppEvents = PayMEMiniAppEvents;
|
|
19
23
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["RNPayMEMiniApp","NativeModules","init","appId","publicKey","privateKey","env","initPayME","open","type","openingParam","PayMEMiniAppEvents","NativeEventEmitter"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"names":["RNPayMEMiniApp","NativeModules","init","appId","publicKey","privateKey","env","initPayME","open","type","openingParam","changeConfig","config","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,YAAY,CAACC,MAAmB,EAAE;EAChD,OAAOZ,cAAc,CAACW,YAAY,CAACC,MAAM,CAAC;AAC5C;AAEO,MAAMC,kBAAkB,GAAG,IAAIC,+BAAkB,CAACd,cAAc,CAAC;AAAC"}
|
package/lib/module/index.js
CHANGED
|
@@ -6,5 +6,8 @@ export function init(appId, publicKey, privateKey, env) {
|
|
|
6
6
|
export function open(type, openingParam) {
|
|
7
7
|
return RNPayMEMiniApp.open(type, openingParam);
|
|
8
8
|
}
|
|
9
|
+
export function changeConfig(config) {
|
|
10
|
+
return RNPayMEMiniApp.changeConfig(config);
|
|
11
|
+
}
|
|
9
12
|
export const PayMEMiniAppEvents = new NativeEventEmitter(RNPayMEMiniApp);
|
|
10
13
|
//# sourceMappingURL=index.js.map
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["NativeEventEmitter","NativeModules","RNPayMEMiniApp","init","appId","publicKey","privateKey","env","initPayME","open","type","openingParam","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,MAAMC,kBAAkB,GAAG,
|
|
1
|
+
{"version":3,"names":["NativeEventEmitter","NativeModules","RNPayMEMiniApp","init","appId","publicKey","privateKey","env","initPayME","open","type","openingParam","changeConfig","config","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,YAAY,CAACC,MAAmB,EAAE;EAChD,OAAOX,cAAc,CAACU,YAAY,CAACC,MAAM,CAAC;AAC5C;AAEA,OAAO,MAAMC,kBAAkB,GAAG,IAAId,kBAAkB,CAACE,cAAc,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { NativeEventEmitter } from 'react-native';
|
|
2
|
-
import type { PayMEEnv, PayMEOpeningParam } from './index.type';
|
|
2
|
+
import type { PayMEConfig, PayMEEnv, PayMEOpeningParam } from './index.type';
|
|
3
3
|
export declare function init(appId: string, publicKey: string, privateKey: string, env: PayMEEnv): any;
|
|
4
4
|
export declare function open(type: string, openingParam: PayMEOpeningParam): any;
|
|
5
|
+
export declare function changeConfig(config: PayMEConfig): any;
|
|
5
6
|
export declare const PayMEMiniAppEvents: NativeEventEmitter;
|
|
6
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;
|
|
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,WAAW,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAI7E,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,YAAY,CAAC,MAAM,EAAE,WAAW,OAE/C;AAED,eAAO,MAAM,kBAAkB,oBAAyC,CAAC"}
|
|
@@ -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,WAAW,GAAG;IACxB,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC"}
|
package/package.json
CHANGED
package/payme-mini-app.podspec
CHANGED
|
@@ -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.0.
|
|
19
|
+
s.dependency "PayMEMiniApp", "0.0.2"
|
|
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,5 @@
|
|
|
1
1
|
import { NativeEventEmitter, NativeModules } from 'react-native';
|
|
2
|
-
import type { PayMEEnv, PayMEOpeningParam } from './index.type';
|
|
2
|
+
import type { PayMEConfig, PayMEEnv, PayMEOpeningParam } from './index.type';
|
|
3
3
|
|
|
4
4
|
const RNPayMEMiniApp = NativeModules.RNPayMEMiniApp;
|
|
5
5
|
|
|
@@ -16,4 +16,8 @@ export function open(type: string, openingParam: PayMEOpeningParam) {
|
|
|
16
16
|
return RNPayMEMiniApp.open(type, openingParam);
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
export function changeConfig(config: PayMEConfig) {
|
|
20
|
+
return RNPayMEMiniApp.changeConfig(config);
|
|
21
|
+
}
|
|
22
|
+
|
|
19
23
|
export const PayMEMiniAppEvents = new NativeEventEmitter(RNPayMEMiniApp);
|