2026-07-23 14:31:06 +08:00
|
|
|
import { RequestMerchantTransfer, RequestMerchantTransferOptions, RequestMerchantTransferGeneralCallbackResult } from '../interface.uts';
|
|
|
|
|
|
2026-09-23 10:29:41 +08:00
|
|
|
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
|
2026-07-23 14:31:06 +08:00
|
|
|
}
|
2026-09-23 10:29:41 +08:00
|
|
|
if (success) {
|
|
|
|
|
options.success?.(result)
|
|
|
|
|
} else {
|
|
|
|
|
options.fail?.(result)
|
2026-07-23 14:31:06 +08:00
|
|
|
}
|
|
|
|
|
options.complete?.(result)
|
|
|
|
|
}
|
2026-09-23 10:29:41 +08:00
|
|
|
)
|
|
|
|
|
}
|