-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJK_PAY.js
More file actions
32 lines (27 loc) · 790 Bytes
/
JK_PAY.js
File metadata and controls
32 lines (27 loc) · 790 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
'use strict';
// 收银台
Object.defineProperty(exports, "__esModule", {
value: true
});
var _config = require('./APP/config');
var name = 'JK_PAY';
var PAY = function PAY(obj) {
var fn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (_) {};
if (typeof fn === 'function') {
(0, _config.WinJSDec)(function (_) {
window.WinJSBridge.call('pay', 'payment', obj, function (res) {
var code = res.code,
response = res.response;
if (code == 0) {
fn(response);
} else {
throw new Error('[' + name + '] ' + _config.appError);
}
});
});
} else {
throw new TypeError('[' + name + '] ' + _config.fnError);
}
};
exports.default = PAY;
//# sourceMappingURL=JK_PAY.js.map