23 lines
694 B
Plaintext
23 lines
694 B
Plaintext
import { RequestMerchantTransfer, RequestMerchantTransferOptions, RequestMerchantTransferGeneralCallbackResult } from '../interface.uts';
|
|
|
|
export const requestMerchantTransfer : RequestMerchantTransfer = function (options : RequestMerchantTransferOptions) {
|
|
RequestMerchantTransferNative.send(
|
|
options.appId,
|
|
options.mchId,
|
|
options.package,
|
|
options.openId,
|
|
options.subAppId,
|
|
options.subMchId,
|
|
(success : boolean, errMsg : string) => {
|
|
const result : RequestMerchantTransferGeneralCallbackResult = {
|
|
errMsg: errMsg
|
|
}
|
|
if (success) {
|
|
options.success?.(result)
|
|
} else {
|
|
options.fail?.(result)
|
|
}
|
|
options.complete?.(result)
|
|
}
|
|
)
|
|
}
|