/* * @Author: gaorf30153 gaorf30153@hundsun.com * @Date: 2024-06-26 08:41:43 * @LastEditors: gaorf30153 gaorf30153@hundsun.com * @LastEditTime: 2024-06-26 08:59:33 * @FilePath: \wxminipro\miniprogram\functional-pages\request-payment.js * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE */ exports.beforeRequestPayment = function (paymentArgs, callback) { // 自定义的参数,此处应为从插件传递过来的 paymentArgs console.log(paymentArgs) var error = null var requestPaymentArgs = { //该对象为下单所需参数,以后端接口返回的为准!! timeStamp: paymentArgs.timeStamp, nonceStr: paymentArgs.nonceStr, package: paymentArgs.package, signType: paymentArgs.signType, paySign: paymentArgs.paySign, } callback(error, requestPaymentArgs) //重点:返回requestPaymentArgs console.log(requestPaymentArgs) }