|
|
@@ -97,13 +97,12 @@ class Lakala
|
|
|
$openId = $params['openId'] ?? '';
|
|
|
$ip = $this->getClientIp();
|
|
|
$location_info = ['request_ip' => $ip];
|
|
|
- $trans_type = $params['transType'] ?? 71;
|
|
|
$arr = [
|
|
|
'merchant_no' => $this->merchant_no,
|
|
|
'term_no' => $this->term_no,
|
|
|
'out_trade_no' => $orderSn,
|
|
|
'account_type' => 'WECHAT',
|
|
|
- 'trans_type' => $trans_type,
|
|
|
+ 'trans_type' => 71,
|
|
|
'total_amount' => $amount * 100,
|
|
|
'location_info' => $location_info,
|
|
|
'subject' => $subject,
|
|
|
@@ -125,6 +124,40 @@ class Lakala
|
|
|
return $this->post($this->preUrl . 'preorder', $body, $authorization);
|
|
|
}
|
|
|
|
|
|
+ public function driveNativeWxPay($params)
|
|
|
+ {
|
|
|
+ $orderSn = $params['orderSn'];
|
|
|
+ $amount = $params['amount'];
|
|
|
+ $notifyUrl = $params['notifyUrl'];
|
|
|
+ $subject = $params['subject'];
|
|
|
+ $capitalType = $params['capitalType'];
|
|
|
+ $ip = $this->getClientIp();
|
|
|
+ $location_info = ['request_ip' => $ip];
|
|
|
+ $arr = [
|
|
|
+ 'merchant_no' => $this->merchant_no,
|
|
|
+ 'term_no' => $this->term_no,
|
|
|
+ 'out_trade_no' => $orderSn,
|
|
|
+ 'account_type' => 'WECHAT',
|
|
|
+ 'trans_type' => 71,
|
|
|
+ 'total_amount' => $amount * 100,
|
|
|
+ 'location_info' => $location_info,
|
|
|
+ 'subject' => $subject,
|
|
|
+ 'notify_url' => $notifyUrl,
|
|
|
+ 'remark' => '{"capitalType":' . $capitalType . '}',
|
|
|
+ 'acc_busi_fields' => [
|
|
|
+ 'timeout_express' => 30,
|
|
|
+ ],
|
|
|
+ ];
|
|
|
+ $baseRequestVO = [
|
|
|
+ 'req_data' => $arr,
|
|
|
+ 'req_time' => date("YmdHis"),
|
|
|
+ 'version' => $this->version,
|
|
|
+ ];
|
|
|
+ $body = json_encode($baseRequestVO, JSON_UNESCAPED_UNICODE);
|
|
|
+ $authorization = $this->getAuthorization($body);
|
|
|
+ return $this->post($this->preUrl . 'preorder', $body, $authorization);
|
|
|
+ }
|
|
|
+
|
|
|
//主扫交易,支付宝
|
|
|
public function driveAliPay($params)
|
|
|
{
|