Browse Source

test

master
用户名 3 years ago
parent
commit
2b8afb1df4
  1. 12
      mobile/plugins/payment/wxpay.php

12
mobile/plugins/payment/wxpay.php

@ -187,7 +187,6 @@ class wxpay
$payinfo = $response_data['payinfo'];
$payinfo = json_decode($payinfo,true);
// ....实现自己的$this->getPrepayId()
// 获取prepay_id
@ -195,9 +194,9 @@ class wxpay
$map = [];
parse_str($package, $map);
$prepay_id = $map['prepay_id'];
var_dump($prepay_id);
// var_dump($prepay_id);
// echo "payinfo: " . $payinfo;
// var_dump($payinfo);
var_dump($payinfo);
// var_dump($package);
// echo "1234";
@ -214,6 +213,13 @@ class wxpay
$this->setParameter("notify_url", __URL__ . 'wxpay.php'); // 通知地址
$this->setParameter("trade_type", "JSAPI"); // 交易类型
// 从大连支付接口返回的参数
// $this->parameters["appid"] = $this->payment['wxpay_appid']; // 公众账号ID
// $this->parameters["mch_id"] = $this->payment['wxpay_mchid']; // 商户号
// $this->parameters["spbill_create_ip"] = $_SERVER['REMOTE_ADDR']; // 终端ip
// $this->parameters["nonce_str"] = $this->createNoncestr(); // 随机字符串
// $this->parameters["sign"] = $this->getSign($this->parameters); // 签名
$prepay_id = $this->getPrepayId(); // 要通过大连支付接口获取到
$jsApiParameters = $this->getParameters($prepay_id);
// wxjsbridge

Loading…
Cancel
Save