初始上传
This commit is contained in:
231
addon/alipay/data/sdk/AlipayMobilePublicMultiMediaClient.php
Executable file
231
addon/alipay/data/sdk/AlipayMobilePublicMultiMediaClient.php
Executable file
@@ -0,0 +1,231 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* 多媒体文件客户端
|
||||
* @author yikai.hu
|
||||
* @version $Id: AlipayMobilePublicMultiMediaClient.php, v 0.1 Aug 15, 2014 10:19:01 AM yikai.hu Exp $
|
||||
*/
|
||||
|
||||
//namespace alipay\api ;
|
||||
|
||||
include("AlipayMobilePublicMultiMediaExecute.php");
|
||||
|
||||
|
||||
class AlipayMobilePublicMultiMediaClient{
|
||||
|
||||
private $DEFAULT_CHARSET = 'UTF-8';
|
||||
private $METHOD_POST = "POST";
|
||||
private $METHOD_GET = "GET";
|
||||
private $SIGN = 'sign'; //get name
|
||||
|
||||
private $timeout = 10 ;// 超时时间
|
||||
private $serverUrl;
|
||||
private $appId;
|
||||
private $privateKey;
|
||||
private $prodCode;
|
||||
private $format = 'json'; //todo
|
||||
private $sign_type = 'RSA'; //todo
|
||||
|
||||
private $charset;
|
||||
private $apiVersion = "1.0";
|
||||
private $apiMethodName = "alipay.mobile.public.multimedia.download";
|
||||
private $media_id = "L21pZnMvVDFQV3hYWGJKWFhYYUNucHJYP3Q9YW13ZiZ4c2lnPTU0MzRhYjg1ZTZjNWJmZTMxZGJiNjIzNDdjMzFkNzkw575";
|
||||
//此处写死的,实际开发中,请传入
|
||||
|
||||
private $connectTimeout = 3000;
|
||||
private $readTimeout = 15000;
|
||||
|
||||
|
||||
|
||||
function __construct($serverUrl = '', $appId = '', $partner_private_key = '', $format = '', $charset = 'GBK'){
|
||||
$this -> serverUrl = $serverUrl;
|
||||
$this -> appId = $appId;
|
||||
$this -> privateKey = $partner_private_key;
|
||||
$this -> format = $format;
|
||||
$this -> charset = $charset;
|
||||
}
|
||||
|
||||
/**
|
||||
* getContents 获取网址内容
|
||||
* @param $request
|
||||
* @return text | bin
|
||||
*/
|
||||
public function getContents(){
|
||||
//自己的服务器如果没有 curl,可用:fsockopen() 等
|
||||
|
||||
|
||||
//1:
|
||||
//2: 私钥格式
|
||||
$datas = array(
|
||||
"app_id" => $this -> appId,
|
||||
"method" => $this -> METHOD_POST,
|
||||
"sign_type" => $this -> sign_type,
|
||||
"version" => $this -> apiVersion,
|
||||
"timestamp" => date('Y-m-d H:i:s') ,//yyyy-MM-dd HH:mm:ss
|
||||
"biz_content" => '{"mediaId":"'. $this -> media_id .'"}',
|
||||
"charset" => $this -> charset
|
||||
);
|
||||
|
||||
|
||||
|
||||
//要提交的数据
|
||||
$data_sign = $this -> buildGetUrl( $datas );
|
||||
|
||||
$post_data = $data_sign;
|
||||
//初始化 curl
|
||||
$ch = curl_init();
|
||||
//设置目标服务器
|
||||
curl_setopt($ch, CURLOPT_URL, $this -> serverUrl );
|
||||
curl_setopt($ch, CURLOPT_HEADER, TRUE);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||
//超时时间
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, $this-> timeout);
|
||||
|
||||
if( $this-> METHOD_POST == 'POST'){
|
||||
// post数据
|
||||
curl_setopt($ch, CURLOPT_POST, 1);
|
||||
// post的变量
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$output = curl_exec($ch);
|
||||
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
curl_close($ch);
|
||||
|
||||
echo $output;
|
||||
|
||||
//分离头部
|
||||
//list($header, $body) = explode("\r\n\r\n", $output, 2);
|
||||
$datas = explode("\r\n\r\n", $output, 2);
|
||||
$header = $datas[0];
|
||||
|
||||
if( $httpCode == '200'){
|
||||
$body = $datas[1];
|
||||
}else{
|
||||
$body = '';
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return $this -> execute( $header, $body, $httpCode );
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param $request
|
||||
* @return text | bin
|
||||
*/
|
||||
public function execute( $header = '', $body = '', $httpCode = '' ){
|
||||
$exe = new AlipayMobilePublicMultiMediaExecute( $header, $body, $httpCode );
|
||||
return $exe;
|
||||
}
|
||||
|
||||
public function buildGetUrl( $query = array() ){
|
||||
|
||||
if( ! is_array( $query ) ){
|
||||
//exit;
|
||||
}
|
||||
|
||||
//排序参数,
|
||||
$data = $this -> buildQuery( $query );
|
||||
|
||||
|
||||
|
||||
// 私钥密码
|
||||
$passphrase = '';
|
||||
$key_width = 64;
|
||||
|
||||
//私钥
|
||||
$privateKey = $this -> privateKey;
|
||||
$p_key = array();
|
||||
//如果私钥是 1行
|
||||
if( ! stripos( $privateKey, "\n" ) ){
|
||||
$i = 0;
|
||||
while( $key_str = substr( $privateKey , $i * $key_width , $key_width) ){
|
||||
$p_key[] = $key_str;
|
||||
$i ++ ;
|
||||
}
|
||||
}else{
|
||||
//echo '一行?';
|
||||
}
|
||||
$privateKey = "-----BEGIN RSA PRIVATE KEY-----\n" . implode("\n", $p_key) ;
|
||||
$privateKey = $privateKey ."\n-----END RSA PRIVATE KEY-----";
|
||||
|
||||
// echo "\n\n私钥:\n";
|
||||
// echo( $privateKey );
|
||||
// echo "\n\n\n";
|
||||
|
||||
//私钥
|
||||
$private_id = openssl_pkey_get_private( $privateKey , $passphrase);
|
||||
|
||||
|
||||
// 签名
|
||||
$signature = '';
|
||||
|
||||
if("RSA2"==$this->sign_type){
|
||||
|
||||
openssl_sign($data, $signature, $private_id, OPENSSL_ALGO_SHA256 );
|
||||
}else{
|
||||
|
||||
openssl_sign($data, $signature, $private_id, OPENSSL_ALGO_SHA1 );
|
||||
}
|
||||
|
||||
openssl_free_key( $private_id );
|
||||
|
||||
//加密后的内容通常含有特殊字符,需要编码转换下
|
||||
$signature = base64_encode($signature);
|
||||
|
||||
$signature = urlencode( $signature );
|
||||
|
||||
//$signature = 'XjUN6YM1Mc9HXebKMv7GTLy7gmyhktyOgKk2/Jf+cz4DtP6udkzTdpkjW2j/Z4ZSD7xD6CNYI1Spz4yS93HPT0a5X9LgFWYY8SaADqe+ArXg+FBSiTwUz49SE//Xd9+LEiIRsSFkbpkuiGoO6mqJmB7vXjlD5lx6qCM3nb41wb8=';
|
||||
|
||||
$out = $data .'&'. $this -> SIGN .'='. $signature;
|
||||
|
||||
// echo "\n\n 加密后:\n";
|
||||
// echo( $out );
|
||||
// echo "\n\n\n";
|
||||
|
||||
return $out ;
|
||||
}
|
||||
|
||||
/*
|
||||
* 查询参数排序 a-z
|
||||
* */
|
||||
public function buildQuery( $query ){
|
||||
if ( !$query ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
//将要 参数 排序
|
||||
ksort( $query );
|
||||
|
||||
//重新组装参数
|
||||
$params = array();
|
||||
foreach($query as $key => $value){
|
||||
$params[] = $key .'='. $value ;
|
||||
}
|
||||
$data = implode('&', $params);
|
||||
|
||||
return $data;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
108
addon/alipay/data/sdk/AlipayMobilePublicMultiMediaExecute.php
Executable file
108
addon/alipay/data/sdk/AlipayMobilePublicMultiMediaExecute.php
Executable file
@@ -0,0 +1,108 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* 多媒体文件客户端
|
||||
* @author yuanwai.wang
|
||||
* @version $Id: AlipayMobilePublicMultiMediaExecute.php, v 0.1 Aug 15, 2014 10:19:01 AM yuanwai.wang Exp $
|
||||
*/
|
||||
|
||||
//namespace alipay\api ;
|
||||
|
||||
|
||||
|
||||
class AlipayMobilePublicMultiMediaExecute{
|
||||
|
||||
private $code = 200 ;
|
||||
private $msg = '';
|
||||
private $body = '';
|
||||
private $params = '';
|
||||
|
||||
private $fileSuffix = array(
|
||||
"image/jpeg" => 'jpg', //+
|
||||
"text/plain" => 'text'
|
||||
);
|
||||
|
||||
/*
|
||||
* @$header : 头部
|
||||
* */
|
||||
function __construct( $header, $body, $httpCode ){
|
||||
$this -> code = $httpCode;
|
||||
$this -> msg = '';
|
||||
$this -> params = $header ;
|
||||
$this -> body = $body;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return text | bin
|
||||
*/
|
||||
public function getCode(){
|
||||
return $this -> code ;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return text | bin
|
||||
*/
|
||||
public function getMsg(){
|
||||
return $this -> msg ;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return text | bin
|
||||
*/
|
||||
public function getType(){
|
||||
$subject = $this -> params ;
|
||||
$pattern = '/Content\-Type:([^;]+)/';
|
||||
preg_match($pattern, $subject, $matches);
|
||||
if( $matches ){
|
||||
$type = $matches[1];
|
||||
}else{
|
||||
$type = 'application/download';
|
||||
}
|
||||
|
||||
return str_replace( ' ', '', $type );
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return text | bin
|
||||
*/
|
||||
public function getContentLength(){
|
||||
$subject = $this -> params ;
|
||||
$pattern = '/Content-Length:\s*([^\n]+)/';
|
||||
preg_match($pattern, $subject, $matches);
|
||||
return (int)( isset($matches[1] ) ? $matches[1] : '' );
|
||||
}
|
||||
|
||||
|
||||
public function getFileSuffix( $fileType ){
|
||||
$type = isset( $this -> fileSuffix[ $fileType ] ) ? $this -> fileSuffix[ $fileType ] : 'text/plain' ;
|
||||
if( !$type ){
|
||||
$type = 'json';
|
||||
}
|
||||
return $type;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @return text | bin
|
||||
*/
|
||||
public function getBody(){
|
||||
//header('Content-type: image/jpeg');
|
||||
return $this -> body ;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取参数
|
||||
* @return text | bin
|
||||
*/
|
||||
public function getParams(){
|
||||
return $this -> params ;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
1241
addon/alipay/data/sdk/AopCertClient.php
Executable file
1241
addon/alipay/data/sdk/AopCertClient.php
Executable file
File diff suppressed because it is too large
Load Diff
527
addon/alipay/data/sdk/AopCertification.php
Executable file
527
addon/alipay/data/sdk/AopCertification.php
Executable file
@@ -0,0 +1,527 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* 验证支付宝公钥证书是否可信
|
||||
* @param $alipayCert 支付宝公钥证书
|
||||
* @param $rootCert 支付宝根证书
|
||||
*/
|
||||
function isTrusted($alipayCert, $rootCert)
|
||||
{
|
||||
$alipayCerts = readPemCertChain($alipayCert);
|
||||
$rootCerts = readPemCertChain($rootCert);
|
||||
if (verifyCertChain($alipayCerts, $rootCerts)) {
|
||||
return verifySignature($alipayCert, $rootCert);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function verifySignature($alipayCert, $rootCert)
|
||||
{
|
||||
$alipayCertArray = explode("-----END CERTIFICATE-----", $alipayCert);
|
||||
$rootCertArray = explode("-----END CERTIFICATE-----", $rootCert);
|
||||
$length = count($rootCertArray) - 1;
|
||||
$checkSign = isCertSigner($alipayCertArray[0] . "-----END CERTIFICATE-----", $alipayCertArray[1] . "-----END CERTIFICATE-----");
|
||||
if (!$checkSign) {
|
||||
$checkSign = isCertSigner($alipayCertArray[1] . "-----END CERTIFICATE-----", $alipayCertArray[0] . "-----END CERTIFICATE-----");
|
||||
if ($checkSign) {
|
||||
$issuer = openssl_x509_parse($alipayCertArray[0] . "-----END CERTIFICATE-----")['issuer'];
|
||||
for ($i = 0; $i < $length; $i++) {
|
||||
$subject = openssl_x509_parse($rootCertArray[$i] . "-----END CERTIFICATE-----")['subject'];
|
||||
if ($issuer == $subject) {
|
||||
isCertSigner($alipayCertArray[0] . "-----END CERTIFICATE-----", $rootCertArray[$i] . $rootCertArray);
|
||||
return $checkSign;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return $checkSign;
|
||||
}
|
||||
} else {
|
||||
$issuer = openssl_x509_parse($alipayCertArray[1] . "-----END CERTIFICATE-----")['issuer'];
|
||||
for ($i = 0; $i < $length; $i++) {
|
||||
$subject = openssl_x509_parse($rootCertArray[$i] . "-----END CERTIFICATE-----")['subject'];
|
||||
if ($issuer == $subject) {
|
||||
$checkSign = isCertSigner($alipayCertArray[1] . "-----END CERTIFICATE-----", $rootCertArray[$i] . "-----END CERTIFICATE-----");
|
||||
return $checkSign;
|
||||
}
|
||||
}
|
||||
return $checkSign;
|
||||
}
|
||||
}
|
||||
|
||||
function readPemCertChain($cert)
|
||||
{
|
||||
$array = explode("-----END CERTIFICATE-----", $cert);
|
||||
$certs[] = null;
|
||||
for ($i = 0; $i < count($array) - 1; $i++) {
|
||||
$certs[$i] = openssl_x509_parse($array[$i] . "-----END CERTIFICATE-----");
|
||||
}
|
||||
return $certs;
|
||||
}
|
||||
|
||||
function verifyCert($prev, $rootCerts)
|
||||
{
|
||||
$nowTime = time();
|
||||
if ($nowTime < $prev['validFrom_time_t']) {
|
||||
echo "证书未激活";
|
||||
return false;
|
||||
}
|
||||
if ($nowTime > $prev['validTo_time_t']) {
|
||||
echo "证书已经过期";
|
||||
return false;
|
||||
}
|
||||
$subjectMap = null;
|
||||
for ($i = 0; $i < count($rootCerts); $i++) {
|
||||
$subjectDN = array2string($rootCerts[$i]['subject']);
|
||||
$subjectMap[$subjectDN] = $rootCerts[$i];
|
||||
}
|
||||
$issuerDN = array2string(($prev['issuer']));
|
||||
if (!array_key_exists($issuerDN, $subjectMap)) {
|
||||
echo "证书链验证失败";
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证证书链是否是信任证书库中证书签发的
|
||||
* @param $alipayCerts 目标验证证书列表
|
||||
* @param $rootCerts 可信根证书列表
|
||||
*/
|
||||
function verifyCertChain($alipayCerts, $rootCerts)
|
||||
{
|
||||
$sorted = sortByDn($alipayCerts);
|
||||
if (!$sorted) {
|
||||
echo "证书链验证失败:不是完整的证书链";
|
||||
return false;
|
||||
}
|
||||
//先验证第一个证书是不是信任库中证书签发的
|
||||
$prev = $alipayCerts[0];
|
||||
$firstOK = verifyCert($prev, $rootCerts);
|
||||
$length = count($alipayCerts);
|
||||
if (!$firstOK || $length == 1) {
|
||||
return $firstOK;
|
||||
}
|
||||
|
||||
$nowTime = time();
|
||||
//验证证书链
|
||||
for ($i = 1; $i < $length; $i++) {
|
||||
$cert = $alipayCerts[$i];
|
||||
if ($nowTime < $cert['validFrom_time_t']) {
|
||||
echo "证书未激活";
|
||||
return false;
|
||||
}
|
||||
if ($nowTime > $cert['validTo_time_t']) {
|
||||
echo "证书已经过期";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 将证书链按照完整的签发顺序进行排序,排序后证书链为:[issuerA, subjectA]-[issuerA, subjectB]-[issuerB, subjectC]-[issuerC, subjectD]...
|
||||
* @param $certs 证书链
|
||||
*/
|
||||
function sortByDn(&$certs)
|
||||
{
|
||||
//是否包含自签名证书
|
||||
$hasSelfSignedCert = false;
|
||||
$subjectMap = null;
|
||||
$issuerMap = null;
|
||||
for ($i = 0; $i < count($certs); $i++) {
|
||||
if (isSelfSigned($certs[$i])) {
|
||||
if ($hasSelfSignedCert) {
|
||||
return false;
|
||||
}
|
||||
$hasSelfSignedCert = true;
|
||||
}
|
||||
$subjectDN = array2string($certs[$i]['subject']);
|
||||
$issuerDN = array2string(($certs[$i]['issuer']));
|
||||
$subjectMap[$subjectDN] = $certs[$i];
|
||||
$issuerMap[$issuerDN] = $certs[$i];
|
||||
}
|
||||
$certChain = null;
|
||||
addressingUp($subjectMap, $certChain, $certs[0]);
|
||||
addressingDown($issuerMap, $certChain, $certs[0]);
|
||||
|
||||
//说明证书链不完整
|
||||
if (count($certs) != count($certChain)) {
|
||||
return false;
|
||||
}
|
||||
//将证书链复制到原先的数据
|
||||
for ($i = 0; $i < count($certs); $i++) {
|
||||
$certs[$i] = $certChain[count($certs) - $i - 1];
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证证书是否是自签发的
|
||||
* @param $cert 目标证书
|
||||
*/
|
||||
function isSelfSigned($cert)
|
||||
{
|
||||
$subjectDN = array2string($cert['subject']);
|
||||
$issuerDN = array2string($cert['issuer']);
|
||||
return ($subjectDN == $issuerDN);
|
||||
}
|
||||
|
||||
|
||||
function array2string($array)
|
||||
{
|
||||
$string = [];
|
||||
if ($array && is_array($array)) {
|
||||
foreach ($array as $key => $value) {
|
||||
$string[] = $key . '=' . $value;
|
||||
}
|
||||
}
|
||||
return implode(',', $string);
|
||||
}
|
||||
|
||||
/**
|
||||
* 向上构造证书链
|
||||
* @param $subjectMap 主题和证书的映射
|
||||
* @param $certChain 证书链
|
||||
* @param $current 当前需要插入证书链的证书,include
|
||||
*/
|
||||
function addressingUp($subjectMap, &$certChain, $current)
|
||||
{
|
||||
$certChain[] = $current;
|
||||
if (isSelfSigned($current)) {
|
||||
return;
|
||||
}
|
||||
$issuerDN = array2string($current['issuer']);
|
||||
|
||||
if (!array_key_exists($issuerDN, $subjectMap)) {
|
||||
return;
|
||||
}
|
||||
addressingUp($subjectMap, $certChain, $subjectMap[$issuerDN]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 向下构造证书链
|
||||
* @param $issuerMap 签发者和证书的映射
|
||||
* @param $certChain 证书链
|
||||
* @param $current 当前需要插入证书链的证书,exclude
|
||||
*/
|
||||
function addressingDown($issuerMap, &$certChain, $current)
|
||||
{
|
||||
$subjectDN = array2string($current['subject']);
|
||||
if (!array_key_exists($subjectDN, $issuerMap)) {
|
||||
return $certChain;
|
||||
}
|
||||
$certChain[] = $issuerMap[$subjectDN];
|
||||
addressingDown($issuerMap, $certChain, $issuerMap[$subjectDN]);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Extract signature from der encoded cert.
|
||||
* Expects x509 der encoded certificate consisting of a section container
|
||||
* containing 2 sections and a bitstream. The bitstream contains the
|
||||
* original encrypted signature, encrypted by the public key of the issuing
|
||||
* signer.
|
||||
* @param string $der
|
||||
* @return string on success
|
||||
* @return bool false on failures
|
||||
*/
|
||||
function extractSignature($der = false)
|
||||
{
|
||||
if (strlen($der) < 5) {
|
||||
return false;
|
||||
}
|
||||
// skip container sequence
|
||||
$der = substr($der, 4);
|
||||
// now burn through two sequences and the return the final bitstream
|
||||
while (strlen($der) > 1) {
|
||||
$class = ord($der[0]);
|
||||
$classHex = dechex($class);
|
||||
switch ($class) {
|
||||
// BITSTREAM
|
||||
case 0x03:
|
||||
$len = ord($der[1]);
|
||||
$bytes = 0;
|
||||
if ($len & 0x80) {
|
||||
$bytes = $len & 0x0f;
|
||||
$len = 0;
|
||||
for ($i = 0; $i < $bytes; $i++) {
|
||||
$len = ($len << 8) | ord($der[$i + 2]);
|
||||
}
|
||||
}
|
||||
return substr($der, 3 + $bytes, $len);
|
||||
break;
|
||||
// SEQUENCE
|
||||
case 0x30:
|
||||
$len = ord($der[1]);
|
||||
$bytes = 0;
|
||||
if ($len & 0x80) {
|
||||
$bytes = $len & 0x0f;
|
||||
$len = 0;
|
||||
for ($i = 0; $i < $bytes; $i++) {
|
||||
$len = ($len << 8) | ord($der[$i + 2]);
|
||||
}
|
||||
}
|
||||
$contents = substr($der, 2 + $bytes, $len);
|
||||
$der = substr($der, 2 + $bytes + $len);
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get signature algorithm oid from der encoded signature data.
|
||||
* Expects decrypted signature data from a certificate in der format.
|
||||
* This ASN1 data should contain the following structure:
|
||||
* SEQUENCE
|
||||
* SEQUENCE
|
||||
* OID (signature algorithm)
|
||||
* NULL
|
||||
* OCTET STRING (signature hash)
|
||||
* @return bool false on failures
|
||||
* @return string oid
|
||||
*/
|
||||
function getSignatureAlgorithmOid($der = null)
|
||||
{
|
||||
// Validate this is the der we need...
|
||||
if (!is_string($der) or strlen($der) < 5) {
|
||||
return false;
|
||||
}
|
||||
$bit_seq1 = 0;
|
||||
$bit_seq2 = 2;
|
||||
$bit_oid = 4;
|
||||
if (ord($der[$bit_seq1]) !== 0x30) {
|
||||
die('Invalid DER passed to getSignatureAlgorithmOid()');
|
||||
}
|
||||
if (ord($der[$bit_seq2]) !== 0x30) {
|
||||
die('Invalid DER passed to getSignatureAlgorithmOid()');
|
||||
}
|
||||
if (ord($der[$bit_oid]) !== 0x06) {
|
||||
die('Invalid DER passed to getSignatureAlgorithmOid');
|
||||
}
|
||||
// strip out what we don't need and get the oid
|
||||
$der = substr($der, $bit_oid);
|
||||
// Get the oid
|
||||
$len = ord($der[1]);
|
||||
$bytes = 0;
|
||||
if ($len & 0x80) {
|
||||
$bytes = $len & 0x0f;
|
||||
$len = 0;
|
||||
for ($i = 0; $i < $bytes; $i++) {
|
||||
$len = ($len << 8) | ord($der[$i + 2]);
|
||||
}
|
||||
}
|
||||
$oid_data = substr($der, 2 + $bytes, $len);
|
||||
// Unpack the OID
|
||||
$oid = floor(ord($oid_data[0]) / 40);
|
||||
$oid .= '.' . ord($oid_data[0]) % 40;
|
||||
$value = 0;
|
||||
$i = 1;
|
||||
while ($i < strlen($oid_data)) {
|
||||
$value = $value << 7;
|
||||
$value = $value | (ord($oid_data[$i]) & 0x7f);
|
||||
if (!(ord($oid_data[$i]) & 0x80)) {
|
||||
$oid .= '.' . $value;
|
||||
$value = 0;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
return $oid;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get signature hash from der encoded signature data.
|
||||
* Expects decrypted signature data from a certificate in der format.
|
||||
* This ASN1 data should contain the following structure:
|
||||
* SEQUENCE
|
||||
* SEQUENCE
|
||||
* OID (signature algorithm)
|
||||
* NULL
|
||||
* OCTET STRING (signature hash)
|
||||
* @return bool false on failures
|
||||
* @return string hash
|
||||
*/
|
||||
function getSignatureHash($der = null)
|
||||
{
|
||||
// Validate this is the der we need...
|
||||
if (!is_string($der) or strlen($der) < 5) {
|
||||
return false;
|
||||
}
|
||||
if (ord($der[0]) !== 0x30) {
|
||||
die('Invalid DER passed to getSignatureHash()');
|
||||
}
|
||||
// strip out the container sequence
|
||||
$der = substr($der, 2);
|
||||
if (ord($der[0]) !== 0x30) {
|
||||
die('Invalid DER passed to getSignatureHash()');
|
||||
}
|
||||
// Get the length of the first sequence so we can strip it out.
|
||||
$len = ord($der[1]);
|
||||
$bytes = 0;
|
||||
if ($len & 0x80) {
|
||||
$bytes = $len & 0x0f;
|
||||
$len = 0;
|
||||
for ($i = 0; $i < $bytes; $i++) {
|
||||
$len = ($len << 8) | ord($der[$i + 2]);
|
||||
}
|
||||
}
|
||||
$der = substr($der, 2 + $bytes + $len);
|
||||
// Now we should have an octet string
|
||||
if (ord($der[0]) !== 0x04) {
|
||||
die('Invalid DER passed to getSignatureHash()');
|
||||
}
|
||||
$len = ord($der[1]);
|
||||
$bytes = 0;
|
||||
if ($len & 0x80) {
|
||||
$bytes = $len & 0x0f;
|
||||
$len = 0;
|
||||
for ($i = 0; $i < $bytes; $i++) {
|
||||
$len = ($len << 8) | ord($der[$i + 2]);
|
||||
}
|
||||
}
|
||||
return bin2hex(substr($der, 2 + $bytes, $len));
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if one cert was used to sign another
|
||||
* Note that more than one CA cert can give a positive result, some certs
|
||||
* re-issue signing certs after having only changed the expiration dates.
|
||||
* @param string $cert - PEM encoded cert
|
||||
* @param string $caCert - PEM encoded cert that possibly signed $cert
|
||||
* @return bool
|
||||
*/
|
||||
function isCertSigner($certPem = null, $caCertPem = null)
|
||||
{
|
||||
if (!function_exists('openssl_pkey_get_public')) {
|
||||
die('Need the openssl_pkey_get_public() function.');
|
||||
}
|
||||
if (!function_exists('openssl_public_decrypt')) {
|
||||
die('Need the openssl_public_decrypt() function.');
|
||||
}
|
||||
if (!function_exists('hash')) {
|
||||
die('Need the php hash() function.');
|
||||
}
|
||||
if (empty($certPem) or empty($caCertPem)) {
|
||||
return false;
|
||||
}
|
||||
// Convert the cert to der for feeding to extractSignature.
|
||||
$certDer = pemToDer($certPem);
|
||||
if (!is_string($certDer)) {
|
||||
die('invalid certPem');
|
||||
}
|
||||
// Grab the encrypted signature from the der encoded cert.
|
||||
$encryptedSig = extractSignature($certDer);
|
||||
if (!is_string($encryptedSig)) {
|
||||
die('Failed to extract encrypted signature from certPem.');
|
||||
}
|
||||
// Extract the public key from the ca cert, which is what has
|
||||
// been used to encrypt the signature in the cert.
|
||||
$pubKey = openssl_pkey_get_public($caCertPem);
|
||||
if ($pubKey === false) {
|
||||
die('Failed to extract the public key from the ca cert.');
|
||||
}
|
||||
// Attempt to decrypt the encrypted signature using the CA's public
|
||||
// key, returning the decrypted signature in $decryptedSig. If
|
||||
// it can't be decrypted, this ca was not used to sign it for sure...
|
||||
$rc = openssl_public_decrypt($encryptedSig, $decryptedSig, $pubKey);
|
||||
if ($rc === false) {
|
||||
return false;
|
||||
}
|
||||
// We now have the decrypted signature, which is der encoded
|
||||
// asn1 data containing the signature algorithm and signature hash.
|
||||
// Now we need what was originally hashed by the issuer, which is
|
||||
// the original DER encoded certificate without the issuer and
|
||||
// signature information.
|
||||
$origCert = stripSignerAsn($certDer);
|
||||
if ($origCert === false) {
|
||||
die('Failed to extract unsigned cert.');
|
||||
}
|
||||
// Get the oid of the signature hash algorithm, which is required
|
||||
// to generate our own hash of the original cert. This hash is
|
||||
// what will be compared to the issuers hash.
|
||||
$oid = getSignatureAlgorithmOid($decryptedSig);
|
||||
if ($oid === false) {
|
||||
die('Failed to determine the signature algorithm.');
|
||||
}
|
||||
switch ($oid) {
|
||||
case '1.2.840.113549.2.2':
|
||||
$algo = 'md2';
|
||||
break;
|
||||
case '1.2.840.113549.2.4':
|
||||
$algo = 'md4';
|
||||
break;
|
||||
case '1.2.840.113549.2.5':
|
||||
$algo = 'md5';
|
||||
break;
|
||||
case '1.3.14.3.2.18':
|
||||
$algo = 'sha';
|
||||
break;
|
||||
case '1.3.14.3.2.26':
|
||||
$algo = 'sha1';
|
||||
break;
|
||||
case '2.16.840.1.101.3.4.2.1':
|
||||
$algo = 'sha256';
|
||||
break;
|
||||
case '2.16.840.1.101.3.4.2.2':
|
||||
$algo = 'sha384';
|
||||
break;
|
||||
case '2.16.840.1.101.3.4.2.3':
|
||||
$algo = 'sha512';
|
||||
break;
|
||||
default:
|
||||
die('Unknown signature hash algorithm oid: ' . $oid);
|
||||
break;
|
||||
}
|
||||
// Get the issuer generated hash from the decrypted signature.
|
||||
$decryptedHash = getSignatureHash($decryptedSig);
|
||||
// Ok, hash the original unsigned cert with the same algorithm
|
||||
// and if it matches $decryptedHash we have a winner.
|
||||
$certHash = hash($algo, $origCert);
|
||||
return ($decryptedHash === $certHash);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert pem encoded certificate to DER encoding
|
||||
* @return string $derEncoded on success
|
||||
* @return bool false on failures
|
||||
*/
|
||||
function pemToDer($pem = null)
|
||||
{
|
||||
if (!is_string($pem)) {
|
||||
return false;
|
||||
}
|
||||
$cert_split = preg_split('/(-----((BEGIN)|(END)) CERTIFICATE-----)/', $pem);
|
||||
if (!isset($cert_split[1])) {
|
||||
return false;
|
||||
}
|
||||
return base64_decode($cert_split[1]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Obtain der cert with issuer and signature sections stripped.
|
||||
* @param string $der - der encoded certificate
|
||||
* @return string $der on success
|
||||
* @return bool false on failures.
|
||||
*/
|
||||
function stripSignerAsn($der = null)
|
||||
{
|
||||
if (!is_string($der) or strlen($der) < 8) {
|
||||
return false;
|
||||
}
|
||||
$bit = 4;
|
||||
$len = ord($der[($bit + 1)]);
|
||||
$bytes = 0;
|
||||
if ($len & 0x80) {
|
||||
$bytes = $len & 0x0f;
|
||||
$len = 0;
|
||||
for ($i = 0; $i < $bytes; $i++) {
|
||||
$len = ($len << 8) | ord($der[$bit + $i + 2]);
|
||||
}
|
||||
}
|
||||
return substr($der, 4, $len + 4);
|
||||
}
|
||||
1251
addon/alipay/data/sdk/AopClient.php
Executable file
1251
addon/alipay/data/sdk/AopClient.php
Executable file
File diff suppressed because it is too large
Load Diff
71
addon/alipay/data/sdk/AopEncrypt.php
Executable file
71
addon/alipay/data/sdk/AopEncrypt.php
Executable file
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
/**
|
||||
* 加密工具类
|
||||
*
|
||||
* User: jiehua
|
||||
* Date: 16/3/30
|
||||
* Time: 下午3:25
|
||||
*/
|
||||
|
||||
/**
|
||||
* 加密方法
|
||||
* @param string $str
|
||||
* @return string
|
||||
*/
|
||||
function new_encrypt($str,$screct_key){
|
||||
//AES, 128 模式加密数据 CBC
|
||||
$screct_key = base64_decode($screct_key);
|
||||
$str = trim($str);
|
||||
$str = addPKCS7Padding($str);
|
||||
$iv = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128,MCRYPT_MODE_CBC),1);
|
||||
$encrypt_str = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $screct_key, $str, MCRYPT_MODE_CBC);
|
||||
return base64_encode($encrypt_str);
|
||||
}
|
||||
|
||||
/**
|
||||
* 解密方法
|
||||
* @param string $str
|
||||
* @return string
|
||||
*/
|
||||
function new_decrypt($str,$screct_key){
|
||||
//AES, 128 模式加密数据 CBC
|
||||
$str = base64_decode($str);
|
||||
$screct_key = base64_decode($screct_key);
|
||||
$iv = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128,MCRYPT_MODE_CBC),1);
|
||||
$encrypt_str = mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $screct_key, $str, MCRYPT_MODE_CBC);
|
||||
$encrypt_str = trim($encrypt_str);
|
||||
|
||||
$encrypt_str = stripPKSC7Padding($encrypt_str);
|
||||
return $encrypt_str;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 填充算法
|
||||
* @param string $source
|
||||
* @return string
|
||||
*/
|
||||
function addPKCS7Padding($source){
|
||||
$source = trim($source);
|
||||
$block = mcrypt_get_block_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC);
|
||||
|
||||
$pad = $block - (strlen($source) % $block);
|
||||
if ($pad <= $block) {
|
||||
$char = chr($pad);
|
||||
$source .= str_repeat($char, $pad);
|
||||
}
|
||||
return $source;
|
||||
}
|
||||
/**
|
||||
* 移去填充算法
|
||||
* @param string $source
|
||||
* @return string
|
||||
*/
|
||||
function stripPKSC7Padding($source){
|
||||
$source = trim($source);
|
||||
$char = substr($source, -1);
|
||||
$num = ord($char);
|
||||
if($num==62)return $source;
|
||||
$source = substr($source,0,-$num);
|
||||
return $source;
|
||||
}
|
||||
19
addon/alipay/data/sdk/EncryptParseItem.php
Executable file
19
addon/alipay/data/sdk/EncryptParseItem.php
Executable file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
/**
|
||||
* TODO 补充说明
|
||||
*
|
||||
* User: jiehua
|
||||
* Date: 16/3/30
|
||||
* Time: 下午8:55
|
||||
*/
|
||||
|
||||
class EncryptParseItem {
|
||||
|
||||
|
||||
public $startIndex;
|
||||
|
||||
public $endIndex;
|
||||
|
||||
public $encryptContent;
|
||||
|
||||
}
|
||||
18
addon/alipay/data/sdk/EncryptResponseData.php
Executable file
18
addon/alipay/data/sdk/EncryptResponseData.php
Executable file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
/**
|
||||
* TODO 补充说明
|
||||
*
|
||||
* User: jiehua
|
||||
* Date: 16/3/30
|
||||
* Time: 下午8:51
|
||||
*/
|
||||
|
||||
class EncryptResponseData {
|
||||
|
||||
|
||||
public $realContent;
|
||||
|
||||
public $returnContent;
|
||||
|
||||
|
||||
}
|
||||
17
addon/alipay/data/sdk/SignData.php
Executable file
17
addon/alipay/data/sdk/SignData.php
Executable file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
namespace addon\alipay\data\sdk;
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: jiehua
|
||||
* Date: 15/5/2
|
||||
* Time: 下午6:21
|
||||
*/
|
||||
|
||||
class SignData {
|
||||
|
||||
public $signSourceData=null;
|
||||
|
||||
|
||||
public $sign=null;
|
||||
|
||||
}
|
||||
120
addon/alipay/data/sdk/request/AlipayFundTransToaccountTransferRequest.php
Executable file
120
addon/alipay/data/sdk/request/AlipayFundTransToaccountTransferRequest.php
Executable file
@@ -0,0 +1,120 @@
|
||||
<?php
|
||||
namespace addon\alipay\data\sdk\request;
|
||||
|
||||
/**
|
||||
* ALIPAY API: alipay.fund.trans.toaccount.transfer request
|
||||
*
|
||||
* @author auto create
|
||||
* @since 1.0, 2018-08-14 14:05:00
|
||||
*/
|
||||
class AlipayFundTransToaccountTransferRequest
|
||||
{
|
||||
/**
|
||||
* 单笔转账到支付宝账户接口
|
||||
**/
|
||||
private $bizContent;
|
||||
|
||||
private $apiParas = array();
|
||||
private $terminalType;
|
||||
private $terminalInfo;
|
||||
private $prodCode;
|
||||
private $apiVersion="1.0";
|
||||
private $notifyUrl;
|
||||
private $returnUrl;
|
||||
private $needEncrypt=false;
|
||||
|
||||
|
||||
public function setBizContent($bizContent)
|
||||
{
|
||||
$this->bizContent = $bizContent;
|
||||
$this->apiParas["biz_content"] = $bizContent;
|
||||
}
|
||||
|
||||
public function getBizContent()
|
||||
{
|
||||
return $this->bizContent;
|
||||
}
|
||||
|
||||
public function getApiMethodName()
|
||||
{
|
||||
return "alipay.fund.trans.toaccount.transfer";
|
||||
}
|
||||
|
||||
public function setNotifyUrl($notifyUrl)
|
||||
{
|
||||
$this->notifyUrl=$notifyUrl;
|
||||
}
|
||||
|
||||
public function getNotifyUrl()
|
||||
{
|
||||
return $this->notifyUrl;
|
||||
}
|
||||
|
||||
public function setReturnUrl($returnUrl)
|
||||
{
|
||||
$this->returnUrl=$returnUrl;
|
||||
}
|
||||
|
||||
public function getReturnUrl()
|
||||
{
|
||||
return $this->returnUrl;
|
||||
}
|
||||
|
||||
public function getApiParas()
|
||||
{
|
||||
return $this->apiParas;
|
||||
}
|
||||
|
||||
public function getTerminalType()
|
||||
{
|
||||
return $this->terminalType;
|
||||
}
|
||||
|
||||
public function setTerminalType($terminalType)
|
||||
{
|
||||
$this->terminalType = $terminalType;
|
||||
}
|
||||
|
||||
public function getTerminalInfo()
|
||||
{
|
||||
return $this->terminalInfo;
|
||||
}
|
||||
|
||||
public function setTerminalInfo($terminalInfo)
|
||||
{
|
||||
$this->terminalInfo = $terminalInfo;
|
||||
}
|
||||
|
||||
public function getProdCode()
|
||||
{
|
||||
return $this->prodCode;
|
||||
}
|
||||
|
||||
public function setProdCode($prodCode)
|
||||
{
|
||||
$this->prodCode = $prodCode;
|
||||
}
|
||||
|
||||
public function setApiVersion($apiVersion)
|
||||
{
|
||||
$this->apiVersion=$apiVersion;
|
||||
}
|
||||
|
||||
public function getApiVersion()
|
||||
{
|
||||
return $this->apiVersion;
|
||||
}
|
||||
|
||||
public function setNeedEncrypt($needEncrypt)
|
||||
{
|
||||
|
||||
$this->needEncrypt=$needEncrypt;
|
||||
|
||||
}
|
||||
|
||||
public function getNeedEncrypt()
|
||||
{
|
||||
return $this->needEncrypt;
|
||||
}
|
||||
|
||||
}
|
||||
119
addon/alipay/data/sdk/request/AlipayFundTransUniTransferRequest.php
Executable file
119
addon/alipay/data/sdk/request/AlipayFundTransUniTransferRequest.php
Executable file
@@ -0,0 +1,119 @@
|
||||
<?php
|
||||
namespace addon\alipay\data\sdk\request;
|
||||
/**
|
||||
* ALIPAY API: alipay.fund.trans.uni.transfer request
|
||||
*
|
||||
* @author auto create
|
||||
* @since 1.0, 2020-04-02 22:40:08
|
||||
*/
|
||||
class AlipayFundTransUniTransferRequest
|
||||
{
|
||||
/**
|
||||
* 支付宝转账支付接口
|
||||
**/
|
||||
private $bizContent;
|
||||
|
||||
private $apiParas = array();
|
||||
private $terminalType;
|
||||
private $terminalInfo;
|
||||
private $prodCode;
|
||||
private $apiVersion="1.0";
|
||||
private $notifyUrl;
|
||||
private $returnUrl;
|
||||
private $needEncrypt=false;
|
||||
|
||||
|
||||
public function setBizContent($bizContent)
|
||||
{
|
||||
$this->bizContent = $bizContent;
|
||||
$this->apiParas["biz_content"] = $bizContent;
|
||||
}
|
||||
|
||||
public function getBizContent()
|
||||
{
|
||||
return $this->bizContent;
|
||||
}
|
||||
|
||||
public function getApiMethodName()
|
||||
{
|
||||
return "alipay.fund.trans.uni.transfer";
|
||||
}
|
||||
|
||||
public function setNotifyUrl($notifyUrl)
|
||||
{
|
||||
$this->notifyUrl=$notifyUrl;
|
||||
}
|
||||
|
||||
public function getNotifyUrl()
|
||||
{
|
||||
return $this->notifyUrl;
|
||||
}
|
||||
|
||||
public function setReturnUrl($returnUrl)
|
||||
{
|
||||
$this->returnUrl=$returnUrl;
|
||||
}
|
||||
|
||||
public function getReturnUrl()
|
||||
{
|
||||
return $this->returnUrl;
|
||||
}
|
||||
|
||||
public function getApiParas()
|
||||
{
|
||||
return $this->apiParas;
|
||||
}
|
||||
|
||||
public function getTerminalType()
|
||||
{
|
||||
return $this->terminalType;
|
||||
}
|
||||
|
||||
public function setTerminalType($terminalType)
|
||||
{
|
||||
$this->terminalType = $terminalType;
|
||||
}
|
||||
|
||||
public function getTerminalInfo()
|
||||
{
|
||||
return $this->terminalInfo;
|
||||
}
|
||||
|
||||
public function setTerminalInfo($terminalInfo)
|
||||
{
|
||||
$this->terminalInfo = $terminalInfo;
|
||||
}
|
||||
|
||||
public function getProdCode()
|
||||
{
|
||||
return $this->prodCode;
|
||||
}
|
||||
|
||||
public function setProdCode($prodCode)
|
||||
{
|
||||
$this->prodCode = $prodCode;
|
||||
}
|
||||
|
||||
public function setApiVersion($apiVersion)
|
||||
{
|
||||
$this->apiVersion=$apiVersion;
|
||||
}
|
||||
|
||||
public function getApiVersion()
|
||||
{
|
||||
return $this->apiVersion;
|
||||
}
|
||||
|
||||
public function setNeedEncrypt($needEncrypt)
|
||||
{
|
||||
|
||||
$this->needEncrypt=$needEncrypt;
|
||||
|
||||
}
|
||||
|
||||
public function getNeedEncrypt()
|
||||
{
|
||||
return $this->needEncrypt;
|
||||
}
|
||||
|
||||
}
|
||||
119
addon/alipay/data/sdk/request/AlipayTradeAppPayRequest.php
Executable file
119
addon/alipay/data/sdk/request/AlipayTradeAppPayRequest.php
Executable file
@@ -0,0 +1,119 @@
|
||||
<?php
|
||||
namespace addon\alipay\data\sdk\request;
|
||||
/**
|
||||
* ALIPAY API: alipay.trade.app.pay request
|
||||
*
|
||||
* @author auto create
|
||||
* @since 1.0, 2018-07-16 16:20:00
|
||||
*/
|
||||
class AlipayTradeAppPayRequest
|
||||
{
|
||||
/**
|
||||
* app支付接口2.0
|
||||
**/
|
||||
private $bizContent;
|
||||
|
||||
private $apiParas = array();
|
||||
private $terminalType;
|
||||
private $terminalInfo;
|
||||
private $prodCode;
|
||||
private $apiVersion="1.0";
|
||||
private $notifyUrl;
|
||||
private $returnUrl;
|
||||
private $needEncrypt=false;
|
||||
|
||||
|
||||
public function setBizContent($bizContent)
|
||||
{
|
||||
$this->bizContent = $bizContent;
|
||||
$this->apiParas["biz_content"] = $bizContent;
|
||||
}
|
||||
|
||||
public function getBizContent()
|
||||
{
|
||||
return $this->bizContent;
|
||||
}
|
||||
|
||||
public function getApiMethodName()
|
||||
{
|
||||
return "alipay.trade.app.pay";
|
||||
}
|
||||
|
||||
public function setNotifyUrl($notifyUrl)
|
||||
{
|
||||
$this->notifyUrl=$notifyUrl;
|
||||
}
|
||||
|
||||
public function getNotifyUrl()
|
||||
{
|
||||
return $this->notifyUrl;
|
||||
}
|
||||
|
||||
public function setReturnUrl($returnUrl)
|
||||
{
|
||||
$this->returnUrl=$returnUrl;
|
||||
}
|
||||
|
||||
public function getReturnUrl()
|
||||
{
|
||||
return $this->returnUrl;
|
||||
}
|
||||
|
||||
public function getApiParas()
|
||||
{
|
||||
return $this->apiParas;
|
||||
}
|
||||
|
||||
public function getTerminalType()
|
||||
{
|
||||
return $this->terminalType;
|
||||
}
|
||||
|
||||
public function setTerminalType($terminalType)
|
||||
{
|
||||
$this->terminalType = $terminalType;
|
||||
}
|
||||
|
||||
public function getTerminalInfo()
|
||||
{
|
||||
return $this->terminalInfo;
|
||||
}
|
||||
|
||||
public function setTerminalInfo($terminalInfo)
|
||||
{
|
||||
$this->terminalInfo = $terminalInfo;
|
||||
}
|
||||
|
||||
public function getProdCode()
|
||||
{
|
||||
return $this->prodCode;
|
||||
}
|
||||
|
||||
public function setProdCode($prodCode)
|
||||
{
|
||||
$this->prodCode = $prodCode;
|
||||
}
|
||||
|
||||
public function setApiVersion($apiVersion)
|
||||
{
|
||||
$this->apiVersion=$apiVersion;
|
||||
}
|
||||
|
||||
public function getApiVersion()
|
||||
{
|
||||
return $this->apiVersion;
|
||||
}
|
||||
|
||||
public function setNeedEncrypt($needEncrypt)
|
||||
{
|
||||
|
||||
$this->needEncrypt=$needEncrypt;
|
||||
|
||||
}
|
||||
|
||||
public function getNeedEncrypt()
|
||||
{
|
||||
return $this->needEncrypt;
|
||||
}
|
||||
|
||||
}
|
||||
119
addon/alipay/data/sdk/request/AlipayTradeCancelRequest.php
Executable file
119
addon/alipay/data/sdk/request/AlipayTradeCancelRequest.php
Executable file
@@ -0,0 +1,119 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* ALIPAY API: alipay.trade.cancel request
|
||||
*
|
||||
* @author auto create
|
||||
* @since 1.0, 2018-07-13 17:18:06
|
||||
*/
|
||||
class AlipayTradeCancelRequest
|
||||
{
|
||||
/**
|
||||
* 统一收单交易撤销接口
|
||||
**/
|
||||
private $bizContent;
|
||||
|
||||
private $apiParas = array ();
|
||||
private $terminalType;
|
||||
private $terminalInfo;
|
||||
private $prodCode;
|
||||
private $apiVersion = "1.0";
|
||||
private $notifyUrl;
|
||||
private $returnUrl;
|
||||
private $needEncrypt = false;
|
||||
|
||||
|
||||
public function setBizContent($bizContent)
|
||||
{
|
||||
$this->bizContent = $bizContent;
|
||||
$this->apiParas[ "biz_content" ] = $bizContent;
|
||||
}
|
||||
|
||||
public function getBizContent()
|
||||
{
|
||||
return $this->bizContent;
|
||||
}
|
||||
|
||||
public function getApiMethodName()
|
||||
{
|
||||
return "alipay.trade.cancel";
|
||||
}
|
||||
|
||||
public function setNotifyUrl($notifyUrl)
|
||||
{
|
||||
$this->notifyUrl = $notifyUrl;
|
||||
}
|
||||
|
||||
public function getNotifyUrl()
|
||||
{
|
||||
return $this->notifyUrl;
|
||||
}
|
||||
|
||||
public function setReturnUrl($returnUrl)
|
||||
{
|
||||
$this->returnUrl = $returnUrl;
|
||||
}
|
||||
|
||||
public function getReturnUrl()
|
||||
{
|
||||
return $this->returnUrl;
|
||||
}
|
||||
|
||||
public function getApiParas()
|
||||
{
|
||||
return $this->apiParas;
|
||||
}
|
||||
|
||||
public function getTerminalType()
|
||||
{
|
||||
return $this->terminalType;
|
||||
}
|
||||
|
||||
public function setTerminalType($terminalType)
|
||||
{
|
||||
$this->terminalType = $terminalType;
|
||||
}
|
||||
|
||||
public function getTerminalInfo()
|
||||
{
|
||||
return $this->terminalInfo;
|
||||
}
|
||||
|
||||
public function setTerminalInfo($terminalInfo)
|
||||
{
|
||||
$this->terminalInfo = $terminalInfo;
|
||||
}
|
||||
|
||||
public function getProdCode()
|
||||
{
|
||||
return $this->prodCode;
|
||||
}
|
||||
|
||||
public function setProdCode($prodCode)
|
||||
{
|
||||
$this->prodCode = $prodCode;
|
||||
}
|
||||
|
||||
public function setApiVersion($apiVersion)
|
||||
{
|
||||
$this->apiVersion = $apiVersion;
|
||||
}
|
||||
|
||||
public function getApiVersion()
|
||||
{
|
||||
return $this->apiVersion;
|
||||
}
|
||||
|
||||
public function setNeedEncrypt($needEncrypt)
|
||||
{
|
||||
|
||||
$this->needEncrypt = $needEncrypt;
|
||||
|
||||
}
|
||||
|
||||
public function getNeedEncrypt()
|
||||
{
|
||||
return $this->needEncrypt;
|
||||
}
|
||||
|
||||
}
|
||||
120
addon/alipay/data/sdk/request/AlipayTradeCloseRequest.php
Executable file
120
addon/alipay/data/sdk/request/AlipayTradeCloseRequest.php
Executable file
@@ -0,0 +1,120 @@
|
||||
<?php
|
||||
namespace addon\alipay\data\sdk\request;
|
||||
|
||||
/**
|
||||
* ALIPAY API: alipay.trade.close request
|
||||
*
|
||||
* @author auto create
|
||||
* @since 1.0, 2018-07-13 17:18:06
|
||||
*/
|
||||
class AlipayTradeCloseRequest
|
||||
{
|
||||
/**
|
||||
* 统一收单交易关闭接口
|
||||
**/
|
||||
private $bizContent;
|
||||
|
||||
private $apiParas = array();
|
||||
private $terminalType;
|
||||
private $terminalInfo;
|
||||
private $prodCode;
|
||||
private $apiVersion="1.0";
|
||||
private $notifyUrl;
|
||||
private $returnUrl;
|
||||
private $needEncrypt=false;
|
||||
|
||||
|
||||
public function setBizContent($bizContent)
|
||||
{
|
||||
$this->bizContent = $bizContent;
|
||||
$this->apiParas["biz_content"] = $bizContent;
|
||||
}
|
||||
|
||||
public function getBizContent()
|
||||
{
|
||||
return $this->bizContent;
|
||||
}
|
||||
|
||||
public function getApiMethodName()
|
||||
{
|
||||
return "alipay.trade.close";
|
||||
}
|
||||
|
||||
public function setNotifyUrl($notifyUrl)
|
||||
{
|
||||
$this->notifyUrl=$notifyUrl;
|
||||
}
|
||||
|
||||
public function getNotifyUrl()
|
||||
{
|
||||
return $this->notifyUrl;
|
||||
}
|
||||
|
||||
public function setReturnUrl($returnUrl)
|
||||
{
|
||||
$this->returnUrl=$returnUrl;
|
||||
}
|
||||
|
||||
public function getReturnUrl()
|
||||
{
|
||||
return $this->returnUrl;
|
||||
}
|
||||
|
||||
public function getApiParas()
|
||||
{
|
||||
return $this->apiParas;
|
||||
}
|
||||
|
||||
public function getTerminalType()
|
||||
{
|
||||
return $this->terminalType;
|
||||
}
|
||||
|
||||
public function setTerminalType($terminalType)
|
||||
{
|
||||
$this->terminalType = $terminalType;
|
||||
}
|
||||
|
||||
public function getTerminalInfo()
|
||||
{
|
||||
return $this->terminalInfo;
|
||||
}
|
||||
|
||||
public function setTerminalInfo($terminalInfo)
|
||||
{
|
||||
$this->terminalInfo = $terminalInfo;
|
||||
}
|
||||
|
||||
public function getProdCode()
|
||||
{
|
||||
return $this->prodCode;
|
||||
}
|
||||
|
||||
public function setProdCode($prodCode)
|
||||
{
|
||||
$this->prodCode = $prodCode;
|
||||
}
|
||||
|
||||
public function setApiVersion($apiVersion)
|
||||
{
|
||||
$this->apiVersion=$apiVersion;
|
||||
}
|
||||
|
||||
public function getApiVersion()
|
||||
{
|
||||
return $this->apiVersion;
|
||||
}
|
||||
|
||||
public function setNeedEncrypt($needEncrypt)
|
||||
{
|
||||
|
||||
$this->needEncrypt=$needEncrypt;
|
||||
|
||||
}
|
||||
|
||||
public function getNeedEncrypt()
|
||||
{
|
||||
return $this->needEncrypt;
|
||||
}
|
||||
|
||||
}
|
||||
119
addon/alipay/data/sdk/request/AlipayTradeCreateRequest.php
Executable file
119
addon/alipay/data/sdk/request/AlipayTradeCreateRequest.php
Executable file
@@ -0,0 +1,119 @@
|
||||
<?php
|
||||
namespace addon\alipay\data\sdk\request;
|
||||
/**
|
||||
* ALIPAY API: alipay.trade.create request
|
||||
*
|
||||
* @author auto create
|
||||
* @since 1.0, 2018-09-01 17:05:01
|
||||
*/
|
||||
class AlipayTradeCreateRequest
|
||||
{
|
||||
/**
|
||||
* 商户通过该接口进行交易的创建下单
|
||||
**/
|
||||
private $bizContent;
|
||||
|
||||
private $apiParas = array();
|
||||
private $terminalType;
|
||||
private $terminalInfo;
|
||||
private $prodCode;
|
||||
private $apiVersion="1.0";
|
||||
private $notifyUrl;
|
||||
private $returnUrl;
|
||||
private $needEncrypt=false;
|
||||
|
||||
|
||||
public function setBizContent($bizContent)
|
||||
{
|
||||
$this->bizContent = $bizContent;
|
||||
$this->apiParas["biz_content"] = $bizContent;
|
||||
}
|
||||
|
||||
public function getBizContent()
|
||||
{
|
||||
return $this->bizContent;
|
||||
}
|
||||
|
||||
public function getApiMethodName()
|
||||
{
|
||||
return "alipay.trade.create";
|
||||
}
|
||||
|
||||
public function setNotifyUrl($notifyUrl)
|
||||
{
|
||||
$this->notifyUrl=$notifyUrl;
|
||||
}
|
||||
|
||||
public function getNotifyUrl()
|
||||
{
|
||||
return $this->notifyUrl;
|
||||
}
|
||||
|
||||
public function setReturnUrl($returnUrl)
|
||||
{
|
||||
$this->returnUrl=$returnUrl;
|
||||
}
|
||||
|
||||
public function getReturnUrl()
|
||||
{
|
||||
return $this->returnUrl;
|
||||
}
|
||||
|
||||
public function getApiParas()
|
||||
{
|
||||
return $this->apiParas;
|
||||
}
|
||||
|
||||
public function getTerminalType()
|
||||
{
|
||||
return $this->terminalType;
|
||||
}
|
||||
|
||||
public function setTerminalType($terminalType)
|
||||
{
|
||||
$this->terminalType = $terminalType;
|
||||
}
|
||||
|
||||
public function getTerminalInfo()
|
||||
{
|
||||
return $this->terminalInfo;
|
||||
}
|
||||
|
||||
public function setTerminalInfo($terminalInfo)
|
||||
{
|
||||
$this->terminalInfo = $terminalInfo;
|
||||
}
|
||||
|
||||
public function getProdCode()
|
||||
{
|
||||
return $this->prodCode;
|
||||
}
|
||||
|
||||
public function setProdCode($prodCode)
|
||||
{
|
||||
$this->prodCode = $prodCode;
|
||||
}
|
||||
|
||||
public function setApiVersion($apiVersion)
|
||||
{
|
||||
$this->apiVersion=$apiVersion;
|
||||
}
|
||||
|
||||
public function getApiVersion()
|
||||
{
|
||||
return $this->apiVersion;
|
||||
}
|
||||
|
||||
public function setNeedEncrypt($needEncrypt)
|
||||
{
|
||||
|
||||
$this->needEncrypt=$needEncrypt;
|
||||
|
||||
}
|
||||
|
||||
public function getNeedEncrypt()
|
||||
{
|
||||
return $this->needEncrypt;
|
||||
}
|
||||
|
||||
}
|
||||
118
addon/alipay/data/sdk/request/AlipayTradeCustomsDeclareRequest.php
Executable file
118
addon/alipay/data/sdk/request/AlipayTradeCustomsDeclareRequest.php
Executable file
@@ -0,0 +1,118 @@
|
||||
<?php
|
||||
/**
|
||||
* ALIPAY API: alipay.trade.customs.declare request
|
||||
*
|
||||
* @author auto create
|
||||
* @since 1.0, 2016-12-08 00:48:24
|
||||
*/
|
||||
class AlipayTradeCustomsDeclareRequest
|
||||
{
|
||||
/**
|
||||
* 统一收单报关接口
|
||||
**/
|
||||
private $bizContent;
|
||||
|
||||
private $apiParas = array();
|
||||
private $terminalType;
|
||||
private $terminalInfo;
|
||||
private $prodCode;
|
||||
private $apiVersion="1.0";
|
||||
private $notifyUrl;
|
||||
private $returnUrl;
|
||||
private $needEncrypt=false;
|
||||
|
||||
|
||||
public function setBizContent($bizContent)
|
||||
{
|
||||
$this->bizContent = $bizContent;
|
||||
$this->apiParas["biz_content"] = $bizContent;
|
||||
}
|
||||
|
||||
public function getBizContent()
|
||||
{
|
||||
return $this->bizContent;
|
||||
}
|
||||
|
||||
public function getApiMethodName()
|
||||
{
|
||||
return "alipay.trade.customs.declare";
|
||||
}
|
||||
|
||||
public function setNotifyUrl($notifyUrl)
|
||||
{
|
||||
$this->notifyUrl=$notifyUrl;
|
||||
}
|
||||
|
||||
public function getNotifyUrl()
|
||||
{
|
||||
return $this->notifyUrl;
|
||||
}
|
||||
|
||||
public function setReturnUrl($returnUrl)
|
||||
{
|
||||
$this->returnUrl=$returnUrl;
|
||||
}
|
||||
|
||||
public function getReturnUrl()
|
||||
{
|
||||
return $this->returnUrl;
|
||||
}
|
||||
|
||||
public function getApiParas()
|
||||
{
|
||||
return $this->apiParas;
|
||||
}
|
||||
|
||||
public function getTerminalType()
|
||||
{
|
||||
return $this->terminalType;
|
||||
}
|
||||
|
||||
public function setTerminalType($terminalType)
|
||||
{
|
||||
$this->terminalType = $terminalType;
|
||||
}
|
||||
|
||||
public function getTerminalInfo()
|
||||
{
|
||||
return $this->terminalInfo;
|
||||
}
|
||||
|
||||
public function setTerminalInfo($terminalInfo)
|
||||
{
|
||||
$this->terminalInfo = $terminalInfo;
|
||||
}
|
||||
|
||||
public function getProdCode()
|
||||
{
|
||||
return $this->prodCode;
|
||||
}
|
||||
|
||||
public function setProdCode($prodCode)
|
||||
{
|
||||
$this->prodCode = $prodCode;
|
||||
}
|
||||
|
||||
public function setApiVersion($apiVersion)
|
||||
{
|
||||
$this->apiVersion=$apiVersion;
|
||||
}
|
||||
|
||||
public function getApiVersion()
|
||||
{
|
||||
return $this->apiVersion;
|
||||
}
|
||||
|
||||
public function setNeedEncrypt($needEncrypt)
|
||||
{
|
||||
|
||||
$this->needEncrypt=$needEncrypt;
|
||||
|
||||
}
|
||||
|
||||
public function getNeedEncrypt()
|
||||
{
|
||||
return $this->needEncrypt;
|
||||
}
|
||||
|
||||
}
|
||||
118
addon/alipay/data/sdk/request/AlipayTradeCustomsQueryRequest.php
Executable file
118
addon/alipay/data/sdk/request/AlipayTradeCustomsQueryRequest.php
Executable file
@@ -0,0 +1,118 @@
|
||||
<?php
|
||||
/**
|
||||
* ALIPAY API: alipay.trade.customs.query request
|
||||
*
|
||||
* @author auto create
|
||||
* @since 1.0, 2018-03-02 14:37:16
|
||||
*/
|
||||
class AlipayTradeCustomsQueryRequest
|
||||
{
|
||||
/**
|
||||
* 查询报关详细信息
|
||||
**/
|
||||
private $bizContent;
|
||||
|
||||
private $apiParas = array();
|
||||
private $terminalType;
|
||||
private $terminalInfo;
|
||||
private $prodCode;
|
||||
private $apiVersion="1.0";
|
||||
private $notifyUrl;
|
||||
private $returnUrl;
|
||||
private $needEncrypt=false;
|
||||
|
||||
|
||||
public function setBizContent($bizContent)
|
||||
{
|
||||
$this->bizContent = $bizContent;
|
||||
$this->apiParas["biz_content"] = $bizContent;
|
||||
}
|
||||
|
||||
public function getBizContent()
|
||||
{
|
||||
return $this->bizContent;
|
||||
}
|
||||
|
||||
public function getApiMethodName()
|
||||
{
|
||||
return "alipay.trade.customs.query";
|
||||
}
|
||||
|
||||
public function setNotifyUrl($notifyUrl)
|
||||
{
|
||||
$this->notifyUrl=$notifyUrl;
|
||||
}
|
||||
|
||||
public function getNotifyUrl()
|
||||
{
|
||||
return $this->notifyUrl;
|
||||
}
|
||||
|
||||
public function setReturnUrl($returnUrl)
|
||||
{
|
||||
$this->returnUrl=$returnUrl;
|
||||
}
|
||||
|
||||
public function getReturnUrl()
|
||||
{
|
||||
return $this->returnUrl;
|
||||
}
|
||||
|
||||
public function getApiParas()
|
||||
{
|
||||
return $this->apiParas;
|
||||
}
|
||||
|
||||
public function getTerminalType()
|
||||
{
|
||||
return $this->terminalType;
|
||||
}
|
||||
|
||||
public function setTerminalType($terminalType)
|
||||
{
|
||||
$this->terminalType = $terminalType;
|
||||
}
|
||||
|
||||
public function getTerminalInfo()
|
||||
{
|
||||
return $this->terminalInfo;
|
||||
}
|
||||
|
||||
public function setTerminalInfo($terminalInfo)
|
||||
{
|
||||
$this->terminalInfo = $terminalInfo;
|
||||
}
|
||||
|
||||
public function getProdCode()
|
||||
{
|
||||
return $this->prodCode;
|
||||
}
|
||||
|
||||
public function setProdCode($prodCode)
|
||||
{
|
||||
$this->prodCode = $prodCode;
|
||||
}
|
||||
|
||||
public function setApiVersion($apiVersion)
|
||||
{
|
||||
$this->apiVersion=$apiVersion;
|
||||
}
|
||||
|
||||
public function getApiVersion()
|
||||
{
|
||||
return $this->apiVersion;
|
||||
}
|
||||
|
||||
public function setNeedEncrypt($needEncrypt)
|
||||
{
|
||||
|
||||
$this->needEncrypt=$needEncrypt;
|
||||
|
||||
}
|
||||
|
||||
public function getNeedEncrypt()
|
||||
{
|
||||
return $this->needEncrypt;
|
||||
}
|
||||
|
||||
}
|
||||
118
addon/alipay/data/sdk/request/AlipayTradeFastpayRefundQueryRequest.php
Executable file
118
addon/alipay/data/sdk/request/AlipayTradeFastpayRefundQueryRequest.php
Executable file
@@ -0,0 +1,118 @@
|
||||
<?php
|
||||
/**
|
||||
* ALIPAY API: alipay.trade.fastpay.refund.query request
|
||||
*
|
||||
* @author auto create
|
||||
* @since 1.0, 2018-07-25 17:25:00
|
||||
*/
|
||||
class AlipayTradeFastpayRefundQueryRequest
|
||||
{
|
||||
/**
|
||||
* 商户可使用该接口查询自已通过alipay.trade.refund提交的退款请求是否执行成功。
|
||||
**/
|
||||
private $bizContent;
|
||||
|
||||
private $apiParas = array();
|
||||
private $terminalType;
|
||||
private $terminalInfo;
|
||||
private $prodCode;
|
||||
private $apiVersion="1.0";
|
||||
private $notifyUrl;
|
||||
private $returnUrl;
|
||||
private $needEncrypt=false;
|
||||
|
||||
|
||||
public function setBizContent($bizContent)
|
||||
{
|
||||
$this->bizContent = $bizContent;
|
||||
$this->apiParas["biz_content"] = $bizContent;
|
||||
}
|
||||
|
||||
public function getBizContent()
|
||||
{
|
||||
return $this->bizContent;
|
||||
}
|
||||
|
||||
public function getApiMethodName()
|
||||
{
|
||||
return "alipay.trade.fastpay.refund.query";
|
||||
}
|
||||
|
||||
public function setNotifyUrl($notifyUrl)
|
||||
{
|
||||
$this->notifyUrl=$notifyUrl;
|
||||
}
|
||||
|
||||
public function getNotifyUrl()
|
||||
{
|
||||
return $this->notifyUrl;
|
||||
}
|
||||
|
||||
public function setReturnUrl($returnUrl)
|
||||
{
|
||||
$this->returnUrl=$returnUrl;
|
||||
}
|
||||
|
||||
public function getReturnUrl()
|
||||
{
|
||||
return $this->returnUrl;
|
||||
}
|
||||
|
||||
public function getApiParas()
|
||||
{
|
||||
return $this->apiParas;
|
||||
}
|
||||
|
||||
public function getTerminalType()
|
||||
{
|
||||
return $this->terminalType;
|
||||
}
|
||||
|
||||
public function setTerminalType($terminalType)
|
||||
{
|
||||
$this->terminalType = $terminalType;
|
||||
}
|
||||
|
||||
public function getTerminalInfo()
|
||||
{
|
||||
return $this->terminalInfo;
|
||||
}
|
||||
|
||||
public function setTerminalInfo($terminalInfo)
|
||||
{
|
||||
$this->terminalInfo = $terminalInfo;
|
||||
}
|
||||
|
||||
public function getProdCode()
|
||||
{
|
||||
return $this->prodCode;
|
||||
}
|
||||
|
||||
public function setProdCode($prodCode)
|
||||
{
|
||||
$this->prodCode = $prodCode;
|
||||
}
|
||||
|
||||
public function setApiVersion($apiVersion)
|
||||
{
|
||||
$this->apiVersion=$apiVersion;
|
||||
}
|
||||
|
||||
public function getApiVersion()
|
||||
{
|
||||
return $this->apiVersion;
|
||||
}
|
||||
|
||||
public function setNeedEncrypt($needEncrypt)
|
||||
{
|
||||
|
||||
$this->needEncrypt=$needEncrypt;
|
||||
|
||||
}
|
||||
|
||||
public function getNeedEncrypt()
|
||||
{
|
||||
return $this->needEncrypt;
|
||||
}
|
||||
|
||||
}
|
||||
118
addon/alipay/data/sdk/request/AlipayTradeOrderSettleRequest.php
Executable file
118
addon/alipay/data/sdk/request/AlipayTradeOrderSettleRequest.php
Executable file
@@ -0,0 +1,118 @@
|
||||
<?php
|
||||
/**
|
||||
* ALIPAY API: alipay.trade.order.settle request
|
||||
*
|
||||
* @author auto create
|
||||
* @since 1.0, 2018-07-13 17:18:06
|
||||
*/
|
||||
class AlipayTradeOrderSettleRequest
|
||||
{
|
||||
/**
|
||||
* 统一收单交易结算接口
|
||||
**/
|
||||
private $bizContent;
|
||||
|
||||
private $apiParas = array();
|
||||
private $terminalType;
|
||||
private $terminalInfo;
|
||||
private $prodCode;
|
||||
private $apiVersion="1.0";
|
||||
private $notifyUrl;
|
||||
private $returnUrl;
|
||||
private $needEncrypt=false;
|
||||
|
||||
|
||||
public function setBizContent($bizContent)
|
||||
{
|
||||
$this->bizContent = $bizContent;
|
||||
$this->apiParas["biz_content"] = $bizContent;
|
||||
}
|
||||
|
||||
public function getBizContent()
|
||||
{
|
||||
return $this->bizContent;
|
||||
}
|
||||
|
||||
public function getApiMethodName()
|
||||
{
|
||||
return "alipay.trade.order.settle";
|
||||
}
|
||||
|
||||
public function setNotifyUrl($notifyUrl)
|
||||
{
|
||||
$this->notifyUrl=$notifyUrl;
|
||||
}
|
||||
|
||||
public function getNotifyUrl()
|
||||
{
|
||||
return $this->notifyUrl;
|
||||
}
|
||||
|
||||
public function setReturnUrl($returnUrl)
|
||||
{
|
||||
$this->returnUrl=$returnUrl;
|
||||
}
|
||||
|
||||
public function getReturnUrl()
|
||||
{
|
||||
return $this->returnUrl;
|
||||
}
|
||||
|
||||
public function getApiParas()
|
||||
{
|
||||
return $this->apiParas;
|
||||
}
|
||||
|
||||
public function getTerminalType()
|
||||
{
|
||||
return $this->terminalType;
|
||||
}
|
||||
|
||||
public function setTerminalType($terminalType)
|
||||
{
|
||||
$this->terminalType = $terminalType;
|
||||
}
|
||||
|
||||
public function getTerminalInfo()
|
||||
{
|
||||
return $this->terminalInfo;
|
||||
}
|
||||
|
||||
public function setTerminalInfo($terminalInfo)
|
||||
{
|
||||
$this->terminalInfo = $terminalInfo;
|
||||
}
|
||||
|
||||
public function getProdCode()
|
||||
{
|
||||
return $this->prodCode;
|
||||
}
|
||||
|
||||
public function setProdCode($prodCode)
|
||||
{
|
||||
$this->prodCode = $prodCode;
|
||||
}
|
||||
|
||||
public function setApiVersion($apiVersion)
|
||||
{
|
||||
$this->apiVersion=$apiVersion;
|
||||
}
|
||||
|
||||
public function getApiVersion()
|
||||
{
|
||||
return $this->apiVersion;
|
||||
}
|
||||
|
||||
public function setNeedEncrypt($needEncrypt)
|
||||
{
|
||||
|
||||
$this->needEncrypt=$needEncrypt;
|
||||
|
||||
}
|
||||
|
||||
public function getNeedEncrypt()
|
||||
{
|
||||
return $this->needEncrypt;
|
||||
}
|
||||
|
||||
}
|
||||
118
addon/alipay/data/sdk/request/AlipayTradeOrderinfoSyncRequest.php
Executable file
118
addon/alipay/data/sdk/request/AlipayTradeOrderinfoSyncRequest.php
Executable file
@@ -0,0 +1,118 @@
|
||||
<?php
|
||||
/**
|
||||
* ALIPAY API: alipay.trade.orderinfo.sync request
|
||||
*
|
||||
* @author auto create
|
||||
* @since 1.0, 2018-07-23 11:40:00
|
||||
*/
|
||||
class AlipayTradeOrderinfoSyncRequest
|
||||
{
|
||||
/**
|
||||
* 支付宝订单信息同步接口
|
||||
**/
|
||||
private $bizContent;
|
||||
|
||||
private $apiParas = array();
|
||||
private $terminalType;
|
||||
private $terminalInfo;
|
||||
private $prodCode;
|
||||
private $apiVersion="1.0";
|
||||
private $notifyUrl;
|
||||
private $returnUrl;
|
||||
private $needEncrypt=false;
|
||||
|
||||
|
||||
public function setBizContent($bizContent)
|
||||
{
|
||||
$this->bizContent = $bizContent;
|
||||
$this->apiParas["biz_content"] = $bizContent;
|
||||
}
|
||||
|
||||
public function getBizContent()
|
||||
{
|
||||
return $this->bizContent;
|
||||
}
|
||||
|
||||
public function getApiMethodName()
|
||||
{
|
||||
return "alipay.trade.orderinfo.sync";
|
||||
}
|
||||
|
||||
public function setNotifyUrl($notifyUrl)
|
||||
{
|
||||
$this->notifyUrl=$notifyUrl;
|
||||
}
|
||||
|
||||
public function getNotifyUrl()
|
||||
{
|
||||
return $this->notifyUrl;
|
||||
}
|
||||
|
||||
public function setReturnUrl($returnUrl)
|
||||
{
|
||||
$this->returnUrl=$returnUrl;
|
||||
}
|
||||
|
||||
public function getReturnUrl()
|
||||
{
|
||||
return $this->returnUrl;
|
||||
}
|
||||
|
||||
public function getApiParas()
|
||||
{
|
||||
return $this->apiParas;
|
||||
}
|
||||
|
||||
public function getTerminalType()
|
||||
{
|
||||
return $this->terminalType;
|
||||
}
|
||||
|
||||
public function setTerminalType($terminalType)
|
||||
{
|
||||
$this->terminalType = $terminalType;
|
||||
}
|
||||
|
||||
public function getTerminalInfo()
|
||||
{
|
||||
return $this->terminalInfo;
|
||||
}
|
||||
|
||||
public function setTerminalInfo($terminalInfo)
|
||||
{
|
||||
$this->terminalInfo = $terminalInfo;
|
||||
}
|
||||
|
||||
public function getProdCode()
|
||||
{
|
||||
return $this->prodCode;
|
||||
}
|
||||
|
||||
public function setProdCode($prodCode)
|
||||
{
|
||||
$this->prodCode = $prodCode;
|
||||
}
|
||||
|
||||
public function setApiVersion($apiVersion)
|
||||
{
|
||||
$this->apiVersion=$apiVersion;
|
||||
}
|
||||
|
||||
public function getApiVersion()
|
||||
{
|
||||
return $this->apiVersion;
|
||||
}
|
||||
|
||||
public function setNeedEncrypt($needEncrypt)
|
||||
{
|
||||
|
||||
$this->needEncrypt=$needEncrypt;
|
||||
|
||||
}
|
||||
|
||||
public function getNeedEncrypt()
|
||||
{
|
||||
return $this->needEncrypt;
|
||||
}
|
||||
|
||||
}
|
||||
120
addon/alipay/data/sdk/request/AlipayTradePagePayRequest.php
Executable file
120
addon/alipay/data/sdk/request/AlipayTradePagePayRequest.php
Executable file
@@ -0,0 +1,120 @@
|
||||
<?php
|
||||
|
||||
namespace addon\alipay\data\sdk\request;
|
||||
/**
|
||||
* ALIPAY API: alipay.trade.page.pay request
|
||||
*
|
||||
* @author auto create
|
||||
* @since 1.0, 2018-08-14 15:31:43
|
||||
*/
|
||||
class AlipayTradePagePayRequest
|
||||
{
|
||||
/**
|
||||
* 统一收单下单并支付页面接口
|
||||
**/
|
||||
private $bizContent;
|
||||
|
||||
private $apiParas = array();
|
||||
private $terminalType;
|
||||
private $terminalInfo;
|
||||
private $prodCode;
|
||||
private $apiVersion="1.0";
|
||||
private $notifyUrl;
|
||||
private $returnUrl;
|
||||
private $needEncrypt=false;
|
||||
|
||||
|
||||
public function setBizContent($bizContent)
|
||||
{
|
||||
$this->bizContent = $bizContent;
|
||||
$this->apiParas["biz_content"] = $bizContent;
|
||||
}
|
||||
|
||||
public function getBizContent()
|
||||
{
|
||||
return $this->bizContent;
|
||||
}
|
||||
|
||||
public function getApiMethodName()
|
||||
{
|
||||
return "alipay.trade.page.pay";
|
||||
}
|
||||
|
||||
public function setNotifyUrl($notifyUrl)
|
||||
{
|
||||
$this->notifyUrl=$notifyUrl;
|
||||
}
|
||||
|
||||
public function getNotifyUrl()
|
||||
{
|
||||
return $this->notifyUrl;
|
||||
}
|
||||
|
||||
public function setReturnUrl($returnUrl)
|
||||
{
|
||||
$this->returnUrl=$returnUrl;
|
||||
}
|
||||
|
||||
public function getReturnUrl()
|
||||
{
|
||||
return $this->returnUrl;
|
||||
}
|
||||
|
||||
public function getApiParas()
|
||||
{
|
||||
return $this->apiParas;
|
||||
}
|
||||
|
||||
public function getTerminalType()
|
||||
{
|
||||
return $this->terminalType;
|
||||
}
|
||||
|
||||
public function setTerminalType($terminalType)
|
||||
{
|
||||
$this->terminalType = $terminalType;
|
||||
}
|
||||
|
||||
public function getTerminalInfo()
|
||||
{
|
||||
return $this->terminalInfo;
|
||||
}
|
||||
|
||||
public function setTerminalInfo($terminalInfo)
|
||||
{
|
||||
$this->terminalInfo = $terminalInfo;
|
||||
}
|
||||
|
||||
public function getProdCode()
|
||||
{
|
||||
return $this->prodCode;
|
||||
}
|
||||
|
||||
public function setProdCode($prodCode)
|
||||
{
|
||||
$this->prodCode = $prodCode;
|
||||
}
|
||||
|
||||
public function setApiVersion($apiVersion)
|
||||
{
|
||||
$this->apiVersion=$apiVersion;
|
||||
}
|
||||
|
||||
public function getApiVersion()
|
||||
{
|
||||
return $this->apiVersion;
|
||||
}
|
||||
|
||||
public function setNeedEncrypt($needEncrypt)
|
||||
{
|
||||
|
||||
$this->needEncrypt=$needEncrypt;
|
||||
|
||||
}
|
||||
|
||||
public function getNeedEncrypt()
|
||||
{
|
||||
return $this->needEncrypt;
|
||||
}
|
||||
|
||||
}
|
||||
120
addon/alipay/data/sdk/request/AlipayTradePayRequest.php
Executable file
120
addon/alipay/data/sdk/request/AlipayTradePayRequest.php
Executable file
@@ -0,0 +1,120 @@
|
||||
<?php
|
||||
namespace addon\alipay\data\sdk\request;
|
||||
/**
|
||||
* ALIPAY API: alipay.trade.pay request
|
||||
*
|
||||
* @author auto create
|
||||
* @since 1.0, 2018-08-31 11:20:00
|
||||
*/
|
||||
class AlipayTradePayRequest
|
||||
{
|
||||
/**
|
||||
* 用于在线下场景交易一次创建并支付掉
|
||||
修改路由策略到R
|
||||
**/
|
||||
private $bizContent;
|
||||
|
||||
private $apiParas = array();
|
||||
private $terminalType;
|
||||
private $terminalInfo;
|
||||
private $prodCode;
|
||||
private $apiVersion="1.0";
|
||||
private $notifyUrl;
|
||||
private $returnUrl;
|
||||
private $needEncrypt=false;
|
||||
|
||||
|
||||
public function setBizContent($bizContent)
|
||||
{
|
||||
$this->bizContent = $bizContent;
|
||||
$this->apiParas["biz_content"] = $bizContent;
|
||||
}
|
||||
|
||||
public function getBizContent()
|
||||
{
|
||||
return $this->bizContent;
|
||||
}
|
||||
|
||||
public function getApiMethodName()
|
||||
{
|
||||
return "alipay.trade.pay";
|
||||
}
|
||||
|
||||
public function setNotifyUrl($notifyUrl)
|
||||
{
|
||||
$this->notifyUrl=$notifyUrl;
|
||||
}
|
||||
|
||||
public function getNotifyUrl()
|
||||
{
|
||||
return $this->notifyUrl;
|
||||
}
|
||||
|
||||
public function setReturnUrl($returnUrl)
|
||||
{
|
||||
$this->returnUrl=$returnUrl;
|
||||
}
|
||||
|
||||
public function getReturnUrl()
|
||||
{
|
||||
return $this->returnUrl;
|
||||
}
|
||||
|
||||
public function getApiParas()
|
||||
{
|
||||
return $this->apiParas;
|
||||
}
|
||||
|
||||
public function getTerminalType()
|
||||
{
|
||||
return $this->terminalType;
|
||||
}
|
||||
|
||||
public function setTerminalType($terminalType)
|
||||
{
|
||||
$this->terminalType = $terminalType;
|
||||
}
|
||||
|
||||
public function getTerminalInfo()
|
||||
{
|
||||
return $this->terminalInfo;
|
||||
}
|
||||
|
||||
public function setTerminalInfo($terminalInfo)
|
||||
{
|
||||
$this->terminalInfo = $terminalInfo;
|
||||
}
|
||||
|
||||
public function getProdCode()
|
||||
{
|
||||
return $this->prodCode;
|
||||
}
|
||||
|
||||
public function setProdCode($prodCode)
|
||||
{
|
||||
$this->prodCode = $prodCode;
|
||||
}
|
||||
|
||||
public function setApiVersion($apiVersion)
|
||||
{
|
||||
$this->apiVersion=$apiVersion;
|
||||
}
|
||||
|
||||
public function getApiVersion()
|
||||
{
|
||||
return $this->apiVersion;
|
||||
}
|
||||
|
||||
public function setNeedEncrypt($needEncrypt)
|
||||
{
|
||||
|
||||
$this->needEncrypt=$needEncrypt;
|
||||
|
||||
}
|
||||
|
||||
public function getNeedEncrypt()
|
||||
{
|
||||
return $this->needEncrypt;
|
||||
}
|
||||
|
||||
}
|
||||
120
addon/alipay/data/sdk/request/AlipayTradePrecreateRequest.php
Executable file
120
addon/alipay/data/sdk/request/AlipayTradePrecreateRequest.php
Executable file
@@ -0,0 +1,120 @@
|
||||
<?php
|
||||
namespace addon\alipay\data\sdk\request;
|
||||
/**
|
||||
* ALIPAY API: alipay.trade.precreate request
|
||||
*
|
||||
* @author auto create
|
||||
* @since 1.0, 2018-06-14 17:32:25
|
||||
*/
|
||||
class AlipayTradePrecreateRequest
|
||||
{
|
||||
/**
|
||||
* 收银员通过收银台或商户后台调用支付宝接口,生成二维码后,展示给伤脑筋户,由用户扫描二维码完成订单支付。
|
||||
修改路由策略到R
|
||||
**/
|
||||
private $bizContent;
|
||||
|
||||
private $apiParas = array();
|
||||
private $terminalType;
|
||||
private $terminalInfo;
|
||||
private $prodCode;
|
||||
private $apiVersion="1.0";
|
||||
private $notifyUrl;
|
||||
private $returnUrl;
|
||||
private $needEncrypt=false;
|
||||
|
||||
|
||||
public function setBizContent($bizContent)
|
||||
{
|
||||
$this->bizContent = $bizContent;
|
||||
$this->apiParas["biz_content"] = $bizContent;
|
||||
}
|
||||
|
||||
public function getBizContent()
|
||||
{
|
||||
return $this->bizContent;
|
||||
}
|
||||
|
||||
public function getApiMethodName()
|
||||
{
|
||||
return "alipay.trade.precreate";
|
||||
}
|
||||
|
||||
public function setNotifyUrl($notifyUrl)
|
||||
{
|
||||
$this->notifyUrl=$notifyUrl;
|
||||
}
|
||||
|
||||
public function getNotifyUrl()
|
||||
{
|
||||
return $this->notifyUrl;
|
||||
}
|
||||
|
||||
public function setReturnUrl($returnUrl)
|
||||
{
|
||||
$this->returnUrl=$returnUrl;
|
||||
}
|
||||
|
||||
public function getReturnUrl()
|
||||
{
|
||||
return $this->returnUrl;
|
||||
}
|
||||
|
||||
public function getApiParas()
|
||||
{
|
||||
return $this->apiParas;
|
||||
}
|
||||
|
||||
public function getTerminalType()
|
||||
{
|
||||
return $this->terminalType;
|
||||
}
|
||||
|
||||
public function setTerminalType($terminalType)
|
||||
{
|
||||
$this->terminalType = $terminalType;
|
||||
}
|
||||
|
||||
public function getTerminalInfo()
|
||||
{
|
||||
return $this->terminalInfo;
|
||||
}
|
||||
|
||||
public function setTerminalInfo($terminalInfo)
|
||||
{
|
||||
$this->terminalInfo = $terminalInfo;
|
||||
}
|
||||
|
||||
public function getProdCode()
|
||||
{
|
||||
return $this->prodCode;
|
||||
}
|
||||
|
||||
public function setProdCode($prodCode)
|
||||
{
|
||||
$this->prodCode = $prodCode;
|
||||
}
|
||||
|
||||
public function setApiVersion($apiVersion)
|
||||
{
|
||||
$this->apiVersion=$apiVersion;
|
||||
}
|
||||
|
||||
public function getApiVersion()
|
||||
{
|
||||
return $this->apiVersion;
|
||||
}
|
||||
|
||||
public function setNeedEncrypt($needEncrypt)
|
||||
{
|
||||
|
||||
$this->needEncrypt=$needEncrypt;
|
||||
|
||||
}
|
||||
|
||||
public function getNeedEncrypt()
|
||||
{
|
||||
return $this->needEncrypt;
|
||||
}
|
||||
|
||||
}
|
||||
121
addon/alipay/data/sdk/request/AlipayTradeQueryRequest.php
Executable file
121
addon/alipay/data/sdk/request/AlipayTradeQueryRequest.php
Executable file
@@ -0,0 +1,121 @@
|
||||
<?php
|
||||
|
||||
namespace addon\alipay\data\sdk\request;
|
||||
/**
|
||||
* ALIPAY API: alipay.trade.query request
|
||||
*
|
||||
* @author auto create
|
||||
* @since 1.0, 2018-05-11 18:28:47
|
||||
*/
|
||||
class AlipayTradeQueryRequest
|
||||
{
|
||||
/**
|
||||
* 统一收单线下交易查询
|
||||
* 修改路由策略到R
|
||||
**/
|
||||
private $bizContent;
|
||||
|
||||
private $apiParas = array ();
|
||||
private $terminalType;
|
||||
private $terminalInfo;
|
||||
private $prodCode;
|
||||
private $apiVersion = "1.0";
|
||||
private $notifyUrl;
|
||||
private $returnUrl;
|
||||
private $needEncrypt = false;
|
||||
|
||||
|
||||
public function setBizContent($bizContent)
|
||||
{
|
||||
$this->bizContent = $bizContent;
|
||||
$this->apiParas[ "biz_content" ] = $bizContent;
|
||||
}
|
||||
|
||||
public function getBizContent()
|
||||
{
|
||||
return $this->bizContent;
|
||||
}
|
||||
|
||||
public function getApiMethodName()
|
||||
{
|
||||
return "alipay.trade.query";
|
||||
}
|
||||
|
||||
public function setNotifyUrl($notifyUrl)
|
||||
{
|
||||
$this->notifyUrl = $notifyUrl;
|
||||
}
|
||||
|
||||
public function getNotifyUrl()
|
||||
{
|
||||
return $this->notifyUrl;
|
||||
}
|
||||
|
||||
public function setReturnUrl($returnUrl)
|
||||
{
|
||||
$this->returnUrl = $returnUrl;
|
||||
}
|
||||
|
||||
public function getReturnUrl()
|
||||
{
|
||||
return $this->returnUrl;
|
||||
}
|
||||
|
||||
public function getApiParas()
|
||||
{
|
||||
return $this->apiParas;
|
||||
}
|
||||
|
||||
public function getTerminalType()
|
||||
{
|
||||
return $this->terminalType;
|
||||
}
|
||||
|
||||
public function setTerminalType($terminalType)
|
||||
{
|
||||
$this->terminalType = $terminalType;
|
||||
}
|
||||
|
||||
public function getTerminalInfo()
|
||||
{
|
||||
return $this->terminalInfo;
|
||||
}
|
||||
|
||||
public function setTerminalInfo($terminalInfo)
|
||||
{
|
||||
$this->terminalInfo = $terminalInfo;
|
||||
}
|
||||
|
||||
public function getProdCode()
|
||||
{
|
||||
return $this->prodCode;
|
||||
}
|
||||
|
||||
public function setProdCode($prodCode)
|
||||
{
|
||||
$this->prodCode = $prodCode;
|
||||
}
|
||||
|
||||
public function setApiVersion($apiVersion)
|
||||
{
|
||||
$this->apiVersion = $apiVersion;
|
||||
}
|
||||
|
||||
public function getApiVersion()
|
||||
{
|
||||
return $this->apiVersion;
|
||||
}
|
||||
|
||||
public function setNeedEncrypt($needEncrypt)
|
||||
{
|
||||
|
||||
$this->needEncrypt = $needEncrypt;
|
||||
|
||||
}
|
||||
|
||||
public function getNeedEncrypt()
|
||||
{
|
||||
return $this->needEncrypt;
|
||||
}
|
||||
|
||||
}
|
||||
120
addon/alipay/data/sdk/request/AlipayTradeRefundRequest.php
Executable file
120
addon/alipay/data/sdk/request/AlipayTradeRefundRequest.php
Executable file
@@ -0,0 +1,120 @@
|
||||
<?php
|
||||
|
||||
namespace addon\alipay\data\sdk\request;
|
||||
/**
|
||||
* ALIPAY API: alipay.trade.refund request
|
||||
*
|
||||
* @author auto create
|
||||
* @since 1.0, 2018-09-01 17:20:00
|
||||
*/
|
||||
class AlipayTradeRefundRequest
|
||||
{
|
||||
/**
|
||||
* 统一收单交易退款接口
|
||||
**/
|
||||
private $bizContent;
|
||||
|
||||
private $apiParas = array();
|
||||
private $terminalType;
|
||||
private $terminalInfo;
|
||||
private $prodCode;
|
||||
private $apiVersion="1.0";
|
||||
private $notifyUrl;
|
||||
private $returnUrl;
|
||||
private $needEncrypt=false;
|
||||
|
||||
|
||||
public function setBizContent($bizContent)
|
||||
{
|
||||
$this->bizContent = $bizContent;
|
||||
$this->apiParas["biz_content"] = $bizContent;
|
||||
}
|
||||
|
||||
public function getBizContent()
|
||||
{
|
||||
return $this->bizContent;
|
||||
}
|
||||
|
||||
public function getApiMethodName()
|
||||
{
|
||||
return "alipay.trade.refund";
|
||||
}
|
||||
|
||||
public function setNotifyUrl($notifyUrl)
|
||||
{
|
||||
$this->notifyUrl=$notifyUrl;
|
||||
}
|
||||
|
||||
public function getNotifyUrl()
|
||||
{
|
||||
return $this->notifyUrl;
|
||||
}
|
||||
|
||||
public function setReturnUrl($returnUrl)
|
||||
{
|
||||
$this->returnUrl=$returnUrl;
|
||||
}
|
||||
|
||||
public function getReturnUrl()
|
||||
{
|
||||
return $this->returnUrl;
|
||||
}
|
||||
|
||||
public function getApiParas()
|
||||
{
|
||||
return $this->apiParas;
|
||||
}
|
||||
|
||||
public function getTerminalType()
|
||||
{
|
||||
return $this->terminalType;
|
||||
}
|
||||
|
||||
public function setTerminalType($terminalType)
|
||||
{
|
||||
$this->terminalType = $terminalType;
|
||||
}
|
||||
|
||||
public function getTerminalInfo()
|
||||
{
|
||||
return $this->terminalInfo;
|
||||
}
|
||||
|
||||
public function setTerminalInfo($terminalInfo)
|
||||
{
|
||||
$this->terminalInfo = $terminalInfo;
|
||||
}
|
||||
|
||||
public function getProdCode()
|
||||
{
|
||||
return $this->prodCode;
|
||||
}
|
||||
|
||||
public function setProdCode($prodCode)
|
||||
{
|
||||
$this->prodCode = $prodCode;
|
||||
}
|
||||
|
||||
public function setApiVersion($apiVersion)
|
||||
{
|
||||
$this->apiVersion=$apiVersion;
|
||||
}
|
||||
|
||||
public function getApiVersion()
|
||||
{
|
||||
return $this->apiVersion;
|
||||
}
|
||||
|
||||
public function setNeedEncrypt($needEncrypt)
|
||||
{
|
||||
|
||||
$this->needEncrypt=$needEncrypt;
|
||||
|
||||
}
|
||||
|
||||
public function getNeedEncrypt()
|
||||
{
|
||||
return $this->needEncrypt;
|
||||
}
|
||||
|
||||
}
|
||||
118
addon/alipay/data/sdk/request/AlipayTradeVendorpayDevicedataUploadRequest.php
Executable file
118
addon/alipay/data/sdk/request/AlipayTradeVendorpayDevicedataUploadRequest.php
Executable file
@@ -0,0 +1,118 @@
|
||||
<?php
|
||||
/**
|
||||
* ALIPAY API: alipay.trade.vendorpay.devicedata.upload request
|
||||
*
|
||||
* @author auto create
|
||||
* @since 1.0, 2016-12-08 00:51:39
|
||||
*/
|
||||
class AlipayTradeVendorpayDevicedataUploadRequest
|
||||
{
|
||||
/**
|
||||
* 厂商支付授权时上传设备数据接口,目前主要包含三星支付。com
|
||||
**/
|
||||
private $bizContent;
|
||||
|
||||
private $apiParas = array();
|
||||
private $terminalType;
|
||||
private $terminalInfo;
|
||||
private $prodCode;
|
||||
private $apiVersion="1.0";
|
||||
private $notifyUrl;
|
||||
private $returnUrl;
|
||||
private $needEncrypt=false;
|
||||
|
||||
|
||||
public function setBizContent($bizContent)
|
||||
{
|
||||
$this->bizContent = $bizContent;
|
||||
$this->apiParas["biz_content"] = $bizContent;
|
||||
}
|
||||
|
||||
public function getBizContent()
|
||||
{
|
||||
return $this->bizContent;
|
||||
}
|
||||
|
||||
public function getApiMethodName()
|
||||
{
|
||||
return "alipay.trade.vendorpay.devicedata.upload";
|
||||
}
|
||||
|
||||
public function setNotifyUrl($notifyUrl)
|
||||
{
|
||||
$this->notifyUrl=$notifyUrl;
|
||||
}
|
||||
|
||||
public function getNotifyUrl()
|
||||
{
|
||||
return $this->notifyUrl;
|
||||
}
|
||||
|
||||
public function setReturnUrl($returnUrl)
|
||||
{
|
||||
$this->returnUrl=$returnUrl;
|
||||
}
|
||||
|
||||
public function getReturnUrl()
|
||||
{
|
||||
return $this->returnUrl;
|
||||
}
|
||||
|
||||
public function getApiParas()
|
||||
{
|
||||
return $this->apiParas;
|
||||
}
|
||||
|
||||
public function getTerminalType()
|
||||
{
|
||||
return $this->terminalType;
|
||||
}
|
||||
|
||||
public function setTerminalType($terminalType)
|
||||
{
|
||||
$this->terminalType = $terminalType;
|
||||
}
|
||||
|
||||
public function getTerminalInfo()
|
||||
{
|
||||
return $this->terminalInfo;
|
||||
}
|
||||
|
||||
public function setTerminalInfo($terminalInfo)
|
||||
{
|
||||
$this->terminalInfo = $terminalInfo;
|
||||
}
|
||||
|
||||
public function getProdCode()
|
||||
{
|
||||
return $this->prodCode;
|
||||
}
|
||||
|
||||
public function setProdCode($prodCode)
|
||||
{
|
||||
$this->prodCode = $prodCode;
|
||||
}
|
||||
|
||||
public function setApiVersion($apiVersion)
|
||||
{
|
||||
$this->apiVersion=$apiVersion;
|
||||
}
|
||||
|
||||
public function getApiVersion()
|
||||
{
|
||||
return $this->apiVersion;
|
||||
}
|
||||
|
||||
public function setNeedEncrypt($needEncrypt)
|
||||
{
|
||||
|
||||
$this->needEncrypt=$needEncrypt;
|
||||
|
||||
}
|
||||
|
||||
public function getNeedEncrypt()
|
||||
{
|
||||
return $this->needEncrypt;
|
||||
}
|
||||
|
||||
}
|
||||
120
addon/alipay/data/sdk/request/AlipayTradeWapPayRequest.php
Executable file
120
addon/alipay/data/sdk/request/AlipayTradeWapPayRequest.php
Executable file
@@ -0,0 +1,120 @@
|
||||
<?php
|
||||
|
||||
namespace addon\alipay\data\sdk\request;
|
||||
/**
|
||||
* ALIPAY API: alipay.trade.wap.pay request
|
||||
*
|
||||
* @author auto create
|
||||
* @since 1.0, 2018-08-06 12:35:00
|
||||
*/
|
||||
class AlipayTradeWapPayRequest
|
||||
{
|
||||
/**
|
||||
* 手机网站支付接口2.0
|
||||
**/
|
||||
private $bizContent;
|
||||
|
||||
private $apiParas = array();
|
||||
private $terminalType;
|
||||
private $terminalInfo;
|
||||
private $prodCode;
|
||||
private $apiVersion="1.0";
|
||||
private $notifyUrl;
|
||||
private $returnUrl;
|
||||
private $needEncrypt=false;
|
||||
|
||||
|
||||
public function setBizContent($bizContent)
|
||||
{
|
||||
$this->bizContent = $bizContent;
|
||||
$this->apiParas["biz_content"] = $bizContent;
|
||||
}
|
||||
|
||||
public function getBizContent()
|
||||
{
|
||||
return $this->bizContent;
|
||||
}
|
||||
|
||||
public function getApiMethodName()
|
||||
{
|
||||
return "alipay.trade.wap.pay";
|
||||
}
|
||||
|
||||
public function setNotifyUrl($notifyUrl)
|
||||
{
|
||||
$this->notifyUrl=$notifyUrl;
|
||||
}
|
||||
|
||||
public function getNotifyUrl()
|
||||
{
|
||||
return $this->notifyUrl;
|
||||
}
|
||||
|
||||
public function setReturnUrl($returnUrl)
|
||||
{
|
||||
$this->returnUrl=$returnUrl;
|
||||
}
|
||||
|
||||
public function getReturnUrl()
|
||||
{
|
||||
return $this->returnUrl;
|
||||
}
|
||||
|
||||
public function getApiParas()
|
||||
{
|
||||
return $this->apiParas;
|
||||
}
|
||||
|
||||
public function getTerminalType()
|
||||
{
|
||||
return $this->terminalType;
|
||||
}
|
||||
|
||||
public function setTerminalType($terminalType)
|
||||
{
|
||||
$this->terminalType = $terminalType;
|
||||
}
|
||||
|
||||
public function getTerminalInfo()
|
||||
{
|
||||
return $this->terminalInfo;
|
||||
}
|
||||
|
||||
public function setTerminalInfo($terminalInfo)
|
||||
{
|
||||
$this->terminalInfo = $terminalInfo;
|
||||
}
|
||||
|
||||
public function getProdCode()
|
||||
{
|
||||
return $this->prodCode;
|
||||
}
|
||||
|
||||
public function setProdCode($prodCode)
|
||||
{
|
||||
$this->prodCode = $prodCode;
|
||||
}
|
||||
|
||||
public function setApiVersion($apiVersion)
|
||||
{
|
||||
$this->apiVersion=$apiVersion;
|
||||
}
|
||||
|
||||
public function getApiVersion()
|
||||
{
|
||||
return $this->apiVersion;
|
||||
}
|
||||
|
||||
public function setNeedEncrypt($needEncrypt)
|
||||
{
|
||||
|
||||
$this->needEncrypt=$needEncrypt;
|
||||
|
||||
}
|
||||
|
||||
public function getNeedEncrypt()
|
||||
{
|
||||
return $this->needEncrypt;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user