金桥
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
* @Author: 万永康
|
||||
* @Date: 2020-10-11 12:32:50
|
||||
* @LastEditTime: 2024-01-27 16:19:49
|
||||
* @LastEditTime: 2024-02-20 16:23:38
|
||||
* @LastEditors: “wanyongkang” “937888580@qq.com”
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /phptest/alipay/Alipay.php
|
||||
@@ -183,6 +183,36 @@ class Alipay
|
||||
|
||||
return $result;
|
||||
|
||||
}
|
||||
public static function pay_jinqiao($param)
|
||||
{
|
||||
global $config;
|
||||
$aop = new \AopClient ();
|
||||
$aop->gatewayUrl = 'https://openapi.alipay.com/gateway.do';
|
||||
$aop->appId = $config['alipay2']['app_id'];;
|
||||
$aop->rsaPrivateKey = $config['alipay2']['private_key'] ;
|
||||
$aop->apiVersion = '1.0';
|
||||
$aop->signType = 'RSA2';
|
||||
$aop->postCharset='utf-8';
|
||||
$aop->format='json';
|
||||
$aop->alipayrsaPublicKey = $config['alipay2']['public_key'];
|
||||
|
||||
$request = new \AlipayTradePagePayRequest();
|
||||
|
||||
|
||||
|
||||
$param = json_encode($param);
|
||||
|
||||
$request->setReturnUrl('http://www.juip.com/user/Index');
|
||||
|
||||
$notifyUrl="http://php-api.juip.com/common/alipay/jinqiaoalipayverify";
|
||||
$request->setNotifyUrl($notifyUrl);
|
||||
|
||||
$request->setBizContent($param);
|
||||
$result = $aop->pageExecute ( $request);
|
||||
|
||||
return $result;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -60,4 +60,21 @@ class Wxpay
|
||||
$url2 = $result["code_url"];
|
||||
return $url2;
|
||||
}
|
||||
|
||||
public function jinqiao_pay($param) {
|
||||
$notify = new \NativePay();
|
||||
$input = new \WxPayUnifiedOrder();
|
||||
$input->SetBody("购买金桥投屏");
|
||||
$input->SetOut_trade_no($param['order_no']);
|
||||
$input->SetTotal_fee($param['money']);
|
||||
$input->SetTime_start(date("YmdHis"));
|
||||
$input->SetTime_expire(date("YmdHis", time() + 600));
|
||||
$input->SetNotify_url("http://php-api.juip.com/common/wxpay/jinqiaowxpayverify");
|
||||
$input->SetTrade_type("NATIVE");
|
||||
|
||||
$result = $notify->GetPayUrl($input);
|
||||
|
||||
$url2 = $result["code_url"];
|
||||
return $url2;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user