1
This commit is contained in:
parent
f3a91073d5
commit
ee98b07c3a
@ -109,11 +109,29 @@ class UnifiedWeiXin extends BaseSdk {
|
||||
'errcode' => 0,
|
||||
'errmsg' => '',
|
||||
'cp_orderid' => $cp_orderid,
|
||||
'prepayid' => '' . $xml->prepay_id
|
||||
'prepayid' => $this->genJSApiData(
|
||||
$this->conf_appid,
|
||||
$cp_orderid,
|
||||
$xml->prepay_id)
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
private function genJSApiData($appid, $cp_orderid, $prepay_id)
|
||||
{
|
||||
$data = array(
|
||||
'appId' => $appid,
|
||||
'timeStamp' => time(),
|
||||
'nonceStr' => md5($cp_orderid . uniqid()),
|
||||
'package' => 'prepay_id=' . $prepay_id,
|
||||
);
|
||||
$data['paySign'] = phpcommon\wxPaySign($data,
|
||||
$this->conf_pay_secret_key
|
||||
);
|
||||
$data['signType'] = 'MD5';
|
||||
return json_encode($data);
|
||||
}
|
||||
|
||||
public function payNotify()
|
||||
{
|
||||
$raw_data = file_get_contents('php://input');
|
||||
|
Loading…
x
Reference in New Issue
Block a user