http上线

This commit is contained in:
“wanyongkang”
2023-12-26 16:37:09 +08:00
parent e768fdf8e1
commit 95200f1c5a
13 changed files with 1269 additions and 3 deletions

View File

@@ -2,7 +2,7 @@
/*
* @Author: 万永康
* @Date: 2020-10-11 12:32:50
* @LastEditTime: 2023-11-11 14:15:28
* @LastEditTime: 2023-12-06 16:47:16
* @LastEditors: “wanyongkang” “937888580@qq.com”
* @Description: In User Settings Edit
* @FilePath: /phptest/alipay/Alipay.php
@@ -122,6 +122,37 @@ class Alipay
return $result;
}
public static function pay_http($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/product/http');
$notifyUrl="http://php-api.juip.com/common/alipay/httalipayverify";
$request->setNotifyUrl($notifyUrl);
$request->setBizContent($param);
$result = $aop->pageExecute ( $request);
return $result;
}
/**
* @description: 获取支付返回参数