龙空技术网

php 获取支付宝APP支付签名

干饭人小羽 162

前言:

此刻朋友们对“php网站支付宝接口”可能比较着重,小伙伴们都需要分析一些“php网站支付宝接口”的相关文章。那么小编在网络上网罗了一些有关“php网站支付宝接口””的相关内容,希望朋友们能喜欢,看官们快快来了解一下吧!

// ali支付参数	public function ali_app($params,$aliCfg){						require_once EXTEND_PATH.'alipay/AopSdk.php';				require_once EXTEND_PATH.'alipay/aop/AopClient.php';		require_once EXTEND_PATH.'alipay/aop/request/AlipayTradeAppPayRequest.php';				//读取配置信息		$aop = new \AopClient;		$aop->gatewayUrl = ";;		$aop->appId = $aliCfg['alipay_appid'] ;		$aop->rsaPrivateKey = $aliCfg['alipay_privateKey'];//私钥		$aop->format = "json";		$aop->charset = "UTF-8";		$aop->signType = "RSA2";		$aop->alipayrsaPublicKey = $aliCfg['alipay_publicKey'];//公钥				$request = new \AlipayTradeAppPayRequest();		//$bizcontent = "{\"body\":\"" . $this->uniacid . "\","		$bizcontent = "{\"body\":\"" . $params['goodsName'] . "\","//商品名称					. "\"subject\": \"" . $params['goodsName'] . "\","					. "\"out_trade_no\": \"" . $params['orderId'] . "\","//订单编号					. "\"timeout_express\": \"30m\","					. "\"total_amount\": \"" . $params['payPrice'] . "\","//付款金额					. "\"product_code\":\"QUICK_MSECURITY_PAY\""					. "}";		$request->setNotifyUrl($params['notify_url']);//异步回调地址		$request->setBizContent($bizcontent);				$response = $aop->sdkExecute($request);		$payInfo = $response; //就是orderString 可以直接给客户端请求,无需再做处理。		return array(				"payInfo" => $payInfo,		);				}

标签: #php网站支付宝接口 #php支付宝接口开发步骤 #支付宝php回调