import { UniPaymentProvider, RequestPayment, RequestPaymentOptions} from "../interface.uts"; import { RequestPaymentFailImpl } from '../unierror.uts'; import { UTSiOS } from "DCloudUTSFoundation"; export const requestPayment : RequestPayment = function (options : RequestPaymentOptions) { const provider = UTSiOS.getExtApiProvider("payment", options.provider) if(provider != null){ provider!.requestPayment(options) } else { const err = new RequestPaymentFailImpl(700000); options.fail?.(err) options.complete?.(err) } };