You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.6 KiB

<?php
namespace app\base\model\platform;
use think\model\concern\SoftDelete;
class PlatformAlipay extends Base
{
use SoftDelete;
// 设置当前模型对应的完整数据表名称
protected $table = 'base_platform_alipay';
/**
* 获取支付宝小程序配置
* @date 2022-11-01
*/
public function getMpAlipayPlatformParam()
{
$where = [
['uid', '=', $this->mid],
['type', '=', 2]
];
$field = 'name,app_id,sign_type,app_public_key,app_private_key,ali_pay_public_key,alipay_cert_path,alipay_root_cert_path,merchant_cert_path,payee_logon_id,encrypt_key';
return $this->getOneData($where, $field);
}
/**
* 获取支付宝移动应用配置
* @date 2022-11-01
*/
public function getAppAlipayPlatformParam()
{
$where = [
['uid', '=', $this->mid],
['type', '=', 3]
];
$field = 'name,app_id,sign_type,app_public_key,app_private_key,ali_pay_public_key,alipay_cert_path,alipay_root_cert_path,merchant_cert_path,payee_logon_id,encrypt_key';
return $this->getOneData($where, $field);
}
/**
* 获取支付宝网站应用配置
* @date 2022-11-01
*/
public function getH5AlipayPlatformParam()
{
$where = [
['uid', '=', $this->mid],
['type', '=', 4]
];
$field = 'name,app_id,sign_type,app_public_key,app_private_key,ali_pay_public_key,alipay_cert_path,alipay_root_cert_path,merchant_cert_path,payee_logon_id,encrypt_key';
return $this->getOneData($where, $field);
}
}