Skip to content

props.preCreate 大兄弟这个函数有坑 #34

Description

@bughp

版本信息:"version": "1.1.9"
函数:props.preCreate = function (opts) {
var biz_content = {
out_trade_no: opts.outTradeId,
subject: opts.subject,
total_amount: opts.amount,
body: opts.body,
timeout_express: opts.timeout,
goods_detail: opts.goodsDetail,
extend_params: opts.extendParams,
enable_pay_channels: opts.enablePayChannels,
disable_pay_channels: opts.disablePayChannels
};

var params = this.makeParams('alipay.trade.precreate', biz_content);
params.notify_url = this.notifyUrl;
// params.return_url = opts.return_url;

var body = utl.processParams(params, this.rsaPrivate, this.signType);

//缺少步骤
return utl.request({
    method: 'GET',
    url: (this.sandbox? alipay_gate_way_sandbox : alipay_gate_way) + '?' + body
});
//原步骤已注释
// return utl.processParams(params, this.rsaPrivate, this.signType);

};

望修复

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions