<?php
/**
*
*/
defined('BASEPATH') OR exit('No direct script access allowed');
class Pc_alipay_service
{
protected $appId;
protected $returnUrl;
protected $notifyUrl;
protected $charset;
//私钥值
protected $rsaPrivateKey;
protected $totalFee;
protected $outTradeNo;
protected $orderName;
protected $orderBody;
protected $rsaPublicKey;
protected $alipaySdkVersion = "*****";
protected $gatewayUrl = "https://openapi.alipay.com/gateway.do";
protected $signType = 'RSA2';
// 表单提交字符集编码
public $postCharset = "UTF-8";
public function __construct()
{
$this->rsaPublicKey = config_item('alipay_public_key');
$this->charset = 'UTF-8';
}
public function setAppid($appid)
{
$this->appId = $appid;
}
public function setReturnUrl($returnUrl)
{
$this->returnUrl = $returnUrl;
}
public function setNotifyUrl($notifyUrl)
{
$this->notifyUrl = $notifyUrl;
}
public function setGatewayUrl($gatewayUrl)
{
$this->gatewayUrl = $gatewayUrl;
}
public function setRsaPrivateKey($saPrivateKey)
{
$this->rsaPrivateKey = $saPrivateKey;
}
public function setRsaPublicKey($saPublicKey)
{
$this->rsaPublicKey = $saPublicKey;
}
public function setTotalFee($payAmount)
{
$this->totalFee = $payAmount;
}
public function setOutTradeNo($outTradeNo)
{
$this->outTradeNo = $outTradeNo;
}
public function setOrderName($orderName)
{
$this->orderName = $orderName;
}
public function setOrderBody($orderBody)
{
$this->
支付宝PC端支付
于 2020-07-17 11:26:59 首次发布
本文详细介绍了如何在PHP环境中实现支付宝PC端支付的流程,包括调用接口所需的参数设置和交互过程,帮助开发者集成这一支付功能。
摘要由CSDN通过智能技术生成