init: 导入团队知识库内容
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Copyright © 2026 Qiantong Technology Co., Ltd.
|
||||
qModel Model Platform(Open Source Edition)
|
||||
*
|
||||
License:
|
||||
Released under the Apache License, Version 2.0.
|
||||
You may use, modify, and distribute this software for commercial purposes
|
||||
under the terms of the License.
|
||||
*
|
||||
Special Notice:
|
||||
All derivative versions are strictly prohibited from modifying or removing
|
||||
the default system logo and copyright information.
|
||||
For brand customization, please apply for brand customization authorization via official channels.
|
||||
*
|
||||
More information: https://qmodel.qiantong.tech/business.html
|
||||
*
|
||||
============================================================================
|
||||
*
|
||||
版权所有 © 2026 江苏千桐科技有限公司
|
||||
qModel 模型平台(开源版)
|
||||
*
|
||||
许可协议:
|
||||
本项目基于 Apache License 2.0 开源协议发布,
|
||||
允许在遵守协议的前提下进行商用、修改和分发。
|
||||
*
|
||||
特别说明:
|
||||
所有衍生版本不得修改或移除系统默认的 LOGO 和版权信息;
|
||||
如需定制品牌,请通过官方渠道申请品牌定制授权。
|
||||
*
|
||||
更多信息请访问:https://qmodel.qiantong.tech/business.html
|
||||
-->
|
||||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>qmodel-framework</artifactId>
|
||||
<groupId>tech.qiantong</groupId>
|
||||
<version>1.0.1</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>qmodel-pay</artifactId>
|
||||
|
||||
<description>
|
||||
pay模块
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
<!-- 通用工具-->
|
||||
<dependency>
|
||||
<groupId>tech.qiantong</groupId>
|
||||
<artifactId>qmodel-common</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--支付宝SDK-->
|
||||
<dependency>
|
||||
<groupId>com.alipay.sdk</groupId>
|
||||
<artifactId>alipay-sdk-java</artifactId>
|
||||
<version>4.22.110.ALL</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alipay.sdk</groupId>
|
||||
<artifactId>alipay-easysdk</artifactId>
|
||||
<version>2.2.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* Copyright © 2026 Qiantong Technology Co., Ltd.
|
||||
* qModel Model Platform(Open Source Edition)
|
||||
* *
|
||||
* License:
|
||||
* Released under the Apache License, Version 2.0.
|
||||
* You may use, modify, and distribute this software for commercial purposes
|
||||
* under the terms of the License.
|
||||
* *
|
||||
* Special Notice:
|
||||
* All derivative versions are strictly prohibited from modifying or removing
|
||||
* the default system logo and copyright information.
|
||||
* For brand customization, please apply for brand customization authorization via official channels.
|
||||
* *
|
||||
* More information: https://qmodel.qiantong.tech/business.html
|
||||
* *
|
||||
* ============================================================================
|
||||
* *
|
||||
* 版权所有 © 2026 江苏千桐科技有限公司
|
||||
* qModel 模型平台(开源版)
|
||||
* *
|
||||
* 许可协议:
|
||||
* 本项目基于 Apache License 2.0 开源协议发布,
|
||||
* 允许在遵守协议的前提下进行商用、修改和分发。
|
||||
* *
|
||||
* 特别说明:
|
||||
* 所有衍生版本不得修改或移除系统默认的 LOGO 和版权信息;
|
||||
* 如需定制品牌,请通过官方渠道申请品牌定制授权。
|
||||
* *
|
||||
* 更多信息请访问:https://qmodel.qiantong.tech/business.html
|
||||
*/
|
||||
|
||||
package tech.qiantong.qmodel.pay.config;
|
||||
|
||||
import com.alipay.easysdk.factory.Factory;
|
||||
import com.alipay.easysdk.kernel.Config;
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
|
||||
@Data
|
||||
@Component
|
||||
@ConfigurationProperties(prefix = "payment.alipay")
|
||||
public class AliPayConfig {
|
||||
private String appId;
|
||||
private String appPrivateKey;
|
||||
private String alipayPublicKey;
|
||||
private String notifyUrl;
|
||||
private String returnUrl;
|
||||
private String gatewayHost;
|
||||
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
// 设置参数(全局只需设置一次)
|
||||
Config config = new Config();
|
||||
config.protocol = "https";
|
||||
config.gatewayHost = this.gatewayHost;
|
||||
config.signType = "RSA2";
|
||||
config.appId = this.appId;
|
||||
config.merchantPrivateKey = this.appPrivateKey;
|
||||
config.alipayPublicKey = this.alipayPublicKey;
|
||||
config.notifyUrl = this.notifyUrl;
|
||||
Factory.setOptions(config);
|
||||
System.out.println("=======支付宝SDK初始化成功=======");
|
||||
}
|
||||
|
||||
}
|
||||
+146
@@ -0,0 +1,146 @@
|
||||
/*
|
||||
* Copyright © 2026 Qiantong Technology Co., Ltd.
|
||||
* qModel Model Platform(Open Source Edition)
|
||||
* *
|
||||
* License:
|
||||
* Released under the Apache License, Version 2.0.
|
||||
* You may use, modify, and distribute this software for commercial purposes
|
||||
* under the terms of the License.
|
||||
* *
|
||||
* Special Notice:
|
||||
* All derivative versions are strictly prohibited from modifying or removing
|
||||
* the default system logo and copyright information.
|
||||
* For brand customization, please apply for brand customization authorization via official channels.
|
||||
* *
|
||||
* More information: https://qmodel.qiantong.tech/business.html
|
||||
* *
|
||||
* ============================================================================
|
||||
* *
|
||||
* 版权所有 © 2026 江苏千桐科技有限公司
|
||||
* qModel 模型平台(开源版)
|
||||
* *
|
||||
* 许可协议:
|
||||
* 本项目基于 Apache License 2.0 开源协议发布,
|
||||
* 允许在遵守协议的前提下进行商用、修改和分发。
|
||||
* *
|
||||
* 特别说明:
|
||||
* 所有衍生版本不得修改或移除系统默认的 LOGO 和版权信息;
|
||||
* 如需定制品牌,请通过官方渠道申请品牌定制授权。
|
||||
* *
|
||||
* 更多信息请访问:https://qmodel.qiantong.tech/business.html
|
||||
*/
|
||||
|
||||
package tech.qiantong.qmodel.pay.domain;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 封装支付宝回调通知的参数
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
public class AlipayNotification extends Notification{
|
||||
|
||||
/** 交易创建时间 */
|
||||
private String gmtCreate;
|
||||
|
||||
/** 编码格式 */
|
||||
private String charset;
|
||||
|
||||
/** 交易付款时间 */
|
||||
private String gmtPayment;
|
||||
|
||||
/** 通知的发送时间 */
|
||||
private String notifyTime;
|
||||
|
||||
/** 商品标题 */
|
||||
private String subject;
|
||||
|
||||
/** 签名 */
|
||||
private String sign;
|
||||
|
||||
/** 买家支付宝用户号 */
|
||||
private String buyerId;
|
||||
|
||||
/** 开票金额 */
|
||||
private String invoiceAmount;
|
||||
|
||||
/** 接口版本 */
|
||||
private String version;
|
||||
|
||||
/** 通知校验ID */
|
||||
private String notifyId;
|
||||
|
||||
/** 支付渠道信息 */
|
||||
private List<FundBill> fundBillList;
|
||||
|
||||
/** 通知类型 */
|
||||
private String notifyType;
|
||||
|
||||
/** 商户订单号 */
|
||||
private String outTradeNo;
|
||||
|
||||
/** 订单金额 */
|
||||
private String totalAmount;
|
||||
|
||||
/** 交易状态 */
|
||||
private String tradeStatus;
|
||||
|
||||
/** 支付宝交易号 */
|
||||
private String tradeNo;
|
||||
|
||||
/** 授权方的AppId */
|
||||
private String authAppId;
|
||||
|
||||
/** 实收金额 */
|
||||
private String receiptAmount;
|
||||
|
||||
/** 集分宝金额 */
|
||||
private String pointAmount;
|
||||
|
||||
/** 付款金额 */
|
||||
private String buyerPayAmount;
|
||||
|
||||
/** 支付宝分配给开发者的应用ID */
|
||||
private String appId;
|
||||
|
||||
/** 签名类型 */
|
||||
private String signType;
|
||||
|
||||
/** 卖家支付宝用户号 */
|
||||
private String sellerId;
|
||||
|
||||
public static class FundBill {
|
||||
/** 支付金额 */
|
||||
private String amount;
|
||||
|
||||
/** 支付渠道 */
|
||||
private String fundChannel;
|
||||
|
||||
// 构造器、Getters 和 Setters
|
||||
|
||||
public FundBill(String amount, String fundChannel) {
|
||||
this.amount = amount;
|
||||
this.fundChannel = fundChannel;
|
||||
}
|
||||
|
||||
public String getAmount() {
|
||||
return amount;
|
||||
}
|
||||
|
||||
public void setAmount(String amount) {
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public String getFundChannel() {
|
||||
return fundChannel;
|
||||
}
|
||||
|
||||
public void setFundChannel(String fundChannel) {
|
||||
this.fundChannel = fundChannel;
|
||||
}
|
||||
}
|
||||
}
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* Copyright © 2026 Qiantong Technology Co., Ltd.
|
||||
* qModel Model Platform(Open Source Edition)
|
||||
* *
|
||||
* License:
|
||||
* Released under the Apache License, Version 2.0.
|
||||
* You may use, modify, and distribute this software for commercial purposes
|
||||
* under the terms of the License.
|
||||
* *
|
||||
* Special Notice:
|
||||
* All derivative versions are strictly prohibited from modifying or removing
|
||||
* the default system logo and copyright information.
|
||||
* For brand customization, please apply for brand customization authorization via official channels.
|
||||
* *
|
||||
* More information: https://qmodel.qiantong.tech/business.html
|
||||
* *
|
||||
* ============================================================================
|
||||
* *
|
||||
* 版权所有 © 2026 江苏千桐科技有限公司
|
||||
* qModel 模型平台(开源版)
|
||||
* *
|
||||
* 许可协议:
|
||||
* 本项目基于 Apache License 2.0 开源协议发布,
|
||||
* 允许在遵守协议的前提下进行商用、修改和分发。
|
||||
* *
|
||||
* 特别说明:
|
||||
* 所有衍生版本不得修改或移除系统默认的 LOGO 和版权信息;
|
||||
* 如需定制品牌,请通过官方渠道申请品牌定制授权。
|
||||
* *
|
||||
* 更多信息请访问:https://qmodel.qiantong.tech/business.html
|
||||
*/
|
||||
|
||||
package tech.qiantong.qmodel.pay.domain;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 封装支付宝回调通知的参数
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
public class Notification {
|
||||
}
|
||||
+100
@@ -0,0 +1,100 @@
|
||||
/*
|
||||
* Copyright © 2026 Qiantong Technology Co., Ltd.
|
||||
* qModel Model Platform(Open Source Edition)
|
||||
* *
|
||||
* License:
|
||||
* Released under the Apache License, Version 2.0.
|
||||
* You may use, modify, and distribute this software for commercial purposes
|
||||
* under the terms of the License.
|
||||
* *
|
||||
* Special Notice:
|
||||
* All derivative versions are strictly prohibited from modifying or removing
|
||||
* the default system logo and copyright information.
|
||||
* For brand customization, please apply for brand customization authorization via official channels.
|
||||
* *
|
||||
* More information: https://qmodel.qiantong.tech/business.html
|
||||
* *
|
||||
* ============================================================================
|
||||
* *
|
||||
* 版权所有 © 2026 江苏千桐科技有限公司
|
||||
* qModel 模型平台(开源版)
|
||||
* *
|
||||
* 许可协议:
|
||||
* 本项目基于 Apache License 2.0 开源协议发布,
|
||||
* 允许在遵守协议的前提下进行商用、修改和分发。
|
||||
* *
|
||||
* 特别说明:
|
||||
* 所有衍生版本不得修改或移除系统默认的 LOGO 和版权信息;
|
||||
* 如需定制品牌,请通过官方渠道申请品牌定制授权。
|
||||
* *
|
||||
* 更多信息请访问:https://qmodel.qiantong.tech/business.html
|
||||
*/
|
||||
|
||||
package tech.qiantong.qmodel.pay.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 表示发起支付请求时的请求数据。
|
||||
* 该类包含支付网关处理支付所需的所有必要信息。
|
||||
*/
|
||||
@Data
|
||||
public class PaymentRequest {
|
||||
|
||||
/**
|
||||
* 商户系统中的订单唯一标识符。
|
||||
* 用于将支付交易与商户订单关联。
|
||||
*/
|
||||
private String orderId;
|
||||
|
||||
/**
|
||||
* 支付的总金额,以货币的最小单位表示(例如人民币的分)。
|
||||
* 使用整数表示,以避免浮点数精度问题。
|
||||
*/
|
||||
private long amount;
|
||||
|
||||
/**
|
||||
* 用户选择的支付方式,例如支付宝(ALIPAY)或微信支付(WECHAT)。
|
||||
* 决定使用哪个支付网关处理交易。
|
||||
*/
|
||||
private PaymentType paymentType;
|
||||
|
||||
/**
|
||||
* 购买的商品或服务的简要描述。
|
||||
* 通常会显示在支付页面或凭证中,便于用户识别支付内容。
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 用户在商户系统中的唯一标识符。
|
||||
* 用于将支付记录与用户进行关联。
|
||||
*/
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 发起支付请求的客户端IP地址。
|
||||
* 用于安全校验和防欺诈分析。
|
||||
*/
|
||||
private String clientIp;
|
||||
|
||||
/**
|
||||
* 支付成功后的异步回调通知URL。
|
||||
* 支付完成后通过此URL通知商户系统支付结果。
|
||||
*/
|
||||
private String notifyUrl;
|
||||
|
||||
/**
|
||||
* 支付成功后用户跳转的页面URL。
|
||||
* 支付成功后,支付网关会引导用户跳转至此URL。
|
||||
*/
|
||||
private String returnUrl;
|
||||
|
||||
/**
|
||||
* 扩展参数,允许传递额外的自定义业务信息。
|
||||
* 可用于在支付过程中传递特殊的业务需求。
|
||||
*/
|
||||
private Map<String, String> extraParams;
|
||||
|
||||
}
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* Copyright © 2026 Qiantong Technology Co., Ltd.
|
||||
* qModel Model Platform(Open Source Edition)
|
||||
* *
|
||||
* License:
|
||||
* Released under the Apache License, Version 2.0.
|
||||
* You may use, modify, and distribute this software for commercial purposes
|
||||
* under the terms of the License.
|
||||
* *
|
||||
* Special Notice:
|
||||
* All derivative versions are strictly prohibited from modifying or removing
|
||||
* the default system logo and copyright information.
|
||||
* For brand customization, please apply for brand customization authorization via official channels.
|
||||
* *
|
||||
* More information: https://qmodel.qiantong.tech/business.html
|
||||
* *
|
||||
* ============================================================================
|
||||
* *
|
||||
* 版权所有 © 2026 江苏千桐科技有限公司
|
||||
* qModel 模型平台(开源版)
|
||||
* *
|
||||
* 许可协议:
|
||||
* 本项目基于 Apache License 2.0 开源协议发布,
|
||||
* 允许在遵守协议的前提下进行商用、修改和分发。
|
||||
* *
|
||||
* 特别说明:
|
||||
* 所有衍生版本不得修改或移除系统默认的 LOGO 和版权信息;
|
||||
* 如需定制品牌,请通过官方渠道申请品牌定制授权。
|
||||
* *
|
||||
* 更多信息请访问:https://qmodel.qiantong.tech/business.html
|
||||
*/
|
||||
|
||||
package tech.qiantong.qmodel.pay.domain;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 类表示支付请求的响应数据。
|
||||
* 该类包含支付网关返回的结果信息。
|
||||
*
|
||||
* @author qModel
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
public class PaymentResponse {
|
||||
|
||||
/**
|
||||
* 支付状态,表示支付是否成功或失败。
|
||||
* 例如,“SUCCESS”表示成功,“FAILED”表示失败。
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 支付跳转链接,用户可以通过此链接完成支付。
|
||||
* 对于需要用户跳转的支付方式(如PC网页支付),此链接尤为重要。
|
||||
*/
|
||||
private String paymentUrl;
|
||||
|
||||
/**
|
||||
* 商户系统中的订单唯一标识符。
|
||||
* 用于标识该支付响应针对的订单。
|
||||
*/
|
||||
private String orderId;
|
||||
|
||||
}
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* Copyright © 2026 Qiantong Technology Co., Ltd.
|
||||
* qModel Model Platform(Open Source Edition)
|
||||
* *
|
||||
* License:
|
||||
* Released under the Apache License, Version 2.0.
|
||||
* You may use, modify, and distribute this software for commercial purposes
|
||||
* under the terms of the License.
|
||||
* *
|
||||
* Special Notice:
|
||||
* All derivative versions are strictly prohibited from modifying or removing
|
||||
* the default system logo and copyright information.
|
||||
* For brand customization, please apply for brand customization authorization via official channels.
|
||||
* *
|
||||
* More information: https://qmodel.qiantong.tech/business.html
|
||||
* *
|
||||
* ============================================================================
|
||||
* *
|
||||
* 版权所有 © 2026 江苏千桐科技有限公司
|
||||
* qModel 模型平台(开源版)
|
||||
* *
|
||||
* 许可协议:
|
||||
* 本项目基于 Apache License 2.0 开源协议发布,
|
||||
* 允许在遵守协议的前提下进行商用、修改和分发。
|
||||
* *
|
||||
* 特别说明:
|
||||
* 所有衍生版本不得修改或移除系统默认的 LOGO 和版权信息;
|
||||
* 如需定制品牌,请通过官方渠道申请品牌定制授权。
|
||||
* *
|
||||
* 更多信息请访问:https://qmodel.qiantong.tech/business.html
|
||||
*/
|
||||
|
||||
package tech.qiantong.qmodel.pay.domain;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 类表示支付状态查询的响应数据。
|
||||
* 该类包含支付网关返回的订单支付状态信息。
|
||||
*
|
||||
* @author qModel
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
public class PaymentStatusResponse {
|
||||
|
||||
/**
|
||||
* 支付状态,表示订单的当前支付状态。
|
||||
* 例如,可以使用“SUCCESS”、“PENDING”、“FAILED”等状态来表示。
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 商户系统中的订单唯一标识符。
|
||||
* 用于标识该支付状态响应针对的订单。
|
||||
*/
|
||||
private String orderId;
|
||||
}
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* Copyright © 2026 Qiantong Technology Co., Ltd.
|
||||
* qModel Model Platform(Open Source Edition)
|
||||
* *
|
||||
* License:
|
||||
* Released under the Apache License, Version 2.0.
|
||||
* You may use, modify, and distribute this software for commercial purposes
|
||||
* under the terms of the License.
|
||||
* *
|
||||
* Special Notice:
|
||||
* All derivative versions are strictly prohibited from modifying or removing
|
||||
* the default system logo and copyright information.
|
||||
* For brand customization, please apply for brand customization authorization via official channels.
|
||||
* *
|
||||
* More information: https://qmodel.qiantong.tech/business.html
|
||||
* *
|
||||
* ============================================================================
|
||||
* *
|
||||
* 版权所有 © 2026 江苏千桐科技有限公司
|
||||
* qModel 模型平台(开源版)
|
||||
* *
|
||||
* 许可协议:
|
||||
* 本项目基于 Apache License 2.0 开源协议发布,
|
||||
* 允许在遵守协议的前提下进行商用、修改和分发。
|
||||
* *
|
||||
* 特别说明:
|
||||
* 所有衍生版本不得修改或移除系统默认的 LOGO 和版权信息;
|
||||
* 如需定制品牌,请通过官方渠道申请品牌定制授权。
|
||||
* *
|
||||
* 更多信息请访问:https://qmodel.qiantong.tech/business.html
|
||||
*/
|
||||
|
||||
package tech.qiantong.qmodel.pay.domain;
|
||||
|
||||
/**
|
||||
* 定义了系统中支持的支付方式。
|
||||
*
|
||||
* @author qModel
|
||||
*/
|
||||
public enum PaymentType {
|
||||
|
||||
/**
|
||||
* 支付宝支付
|
||||
*/
|
||||
ALIPAY,
|
||||
|
||||
/**
|
||||
* 微信支付
|
||||
*/
|
||||
WECHAT;
|
||||
|
||||
/**
|
||||
* 根据输入的字符串值获取对应的支付类型。
|
||||
*
|
||||
* @param type 输入的字符串,如 "ALIPAY" 或 "WECHAT"
|
||||
* @return 返回对应的 PaymentType 枚举值,如果没有匹配则返回 null
|
||||
*/
|
||||
public static PaymentType fromString(String type) {
|
||||
for (PaymentType paymentType : PaymentType.values()) {
|
||||
if (paymentType.name().equalsIgnoreCase(type)) {
|
||||
return paymentType;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Copyright © 2026 Qiantong Technology Co., Ltd.
|
||||
* qModel Model Platform(Open Source Edition)
|
||||
* *
|
||||
* License:
|
||||
* Released under the Apache License, Version 2.0.
|
||||
* You may use, modify, and distribute this software for commercial purposes
|
||||
* under the terms of the License.
|
||||
* *
|
||||
* Special Notice:
|
||||
* All derivative versions are strictly prohibited from modifying or removing
|
||||
* the default system logo and copyright information.
|
||||
* For brand customization, please apply for brand customization authorization via official channels.
|
||||
* *
|
||||
* More information: https://qmodel.qiantong.tech/business.html
|
||||
* *
|
||||
* ============================================================================
|
||||
* *
|
||||
* 版权所有 © 2026 江苏千桐科技有限公司
|
||||
* qModel 模型平台(开源版)
|
||||
* *
|
||||
* 许可协议:
|
||||
* 本项目基于 Apache License 2.0 开源协议发布,
|
||||
* 允许在遵守协议的前提下进行商用、修改和分发。
|
||||
* *
|
||||
* 特别说明:
|
||||
* 所有衍生版本不得修改或移除系统默认的 LOGO 和版权信息;
|
||||
* 如需定制品牌,请通过官方渠道申请品牌定制授权。
|
||||
* *
|
||||
* 更多信息请访问:https://qmodel.qiantong.tech/business.html
|
||||
*/
|
||||
|
||||
package tech.qiantong.qmodel.pay.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 类表示退款请求的数据。
|
||||
* 该类包含发起退款操作所需的所有信息。
|
||||
*
|
||||
* @author anivia
|
||||
*/
|
||||
@Data
|
||||
public class RefundRequest {
|
||||
|
||||
/**
|
||||
* 商户系统中的订单唯一标识符。
|
||||
* 用于标识需要退款的订单。
|
||||
*/
|
||||
private String orderId;
|
||||
|
||||
/**
|
||||
* 退款金额,以货币的最小单位表示(例如人民币的分)。
|
||||
* 通常退款金额不应超过原支付金额。
|
||||
*/
|
||||
private long amount;
|
||||
|
||||
/**
|
||||
* 支付方式,例如支付宝(ALIPAY)或微信支付(WECHAT)。
|
||||
* 用于指定通过哪个支付网关处理退款。
|
||||
*/
|
||||
private PaymentType paymentType;
|
||||
}
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Copyright © 2026 Qiantong Technology Co., Ltd.
|
||||
* qModel Model Platform(Open Source Edition)
|
||||
* *
|
||||
* License:
|
||||
* Released under the Apache License, Version 2.0.
|
||||
* You may use, modify, and distribute this software for commercial purposes
|
||||
* under the terms of the License.
|
||||
* *
|
||||
* Special Notice:
|
||||
* All derivative versions are strictly prohibited from modifying or removing
|
||||
* the default system logo and copyright information.
|
||||
* For brand customization, please apply for brand customization authorization via official channels.
|
||||
* *
|
||||
* More information: https://qmodel.qiantong.tech/business.html
|
||||
* *
|
||||
* ============================================================================
|
||||
* *
|
||||
* 版权所有 © 2026 江苏千桐科技有限公司
|
||||
* qModel 模型平台(开源版)
|
||||
* *
|
||||
* 许可协议:
|
||||
* 本项目基于 Apache License 2.0 开源协议发布,
|
||||
* 允许在遵守协议的前提下进行商用、修改和分发。
|
||||
* *
|
||||
* 特别说明:
|
||||
* 所有衍生版本不得修改或移除系统默认的 LOGO 和版权信息;
|
||||
* 如需定制品牌,请通过官方渠道申请品牌定制授权。
|
||||
* *
|
||||
* 更多信息请访问:https://qmodel.qiantong.tech/business.html
|
||||
*/
|
||||
|
||||
package tech.qiantong.qmodel.pay.domain;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 类表示退款请求的响应数据。
|
||||
* 该类包含支付网关返回的退款结果信息。
|
||||
* @author anivia
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
public class RefundResponse {
|
||||
|
||||
/**
|
||||
* 退款状态,表示退款操作是否成功或失败。
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 商户系统中的订单唯一标识符。
|
||||
*/
|
||||
private String orderId;
|
||||
|
||||
}
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* Copyright © 2026 Qiantong Technology Co., Ltd.
|
||||
* qModel Model Platform(Open Source Edition)
|
||||
* *
|
||||
* License:
|
||||
* Released under the Apache License, Version 2.0.
|
||||
* You may use, modify, and distribute this software for commercial purposes
|
||||
* under the terms of the License.
|
||||
* *
|
||||
* Special Notice:
|
||||
* All derivative versions are strictly prohibited from modifying or removing
|
||||
* the default system logo and copyright information.
|
||||
* For brand customization, please apply for brand customization authorization via official channels.
|
||||
* *
|
||||
* More information: https://qmodel.qiantong.tech/business.html
|
||||
* *
|
||||
* ============================================================================
|
||||
* *
|
||||
* 版权所有 © 2026 江苏千桐科技有限公司
|
||||
* qModel 模型平台(开源版)
|
||||
* *
|
||||
* 许可协议:
|
||||
* 本项目基于 Apache License 2.0 开源协议发布,
|
||||
* 允许在遵守协议的前提下进行商用、修改和分发。
|
||||
* *
|
||||
* 特别说明:
|
||||
* 所有衍生版本不得修改或移除系统默认的 LOGO 和版权信息;
|
||||
* 如需定制品牌,请通过官方渠道申请品牌定制授权。
|
||||
* *
|
||||
* 更多信息请访问:https://qmodel.qiantong.tech/business.html
|
||||
*/
|
||||
|
||||
package tech.qiantong.qmodel.pay.service;
|
||||
|
||||
import tech.qiantong.qmodel.pay.domain.*;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 接口定义了与支付网关集成的基本操作。
|
||||
* 该接口包括发起支付、退款、查询支付状态以及处理回调的方法。
|
||||
* @author anivia
|
||||
*/
|
||||
public interface PayGatewayClient {
|
||||
|
||||
/**
|
||||
* 发起支付请求。
|
||||
* @param request 包含支付请求的详细信息
|
||||
* @return 返回支付响应信息
|
||||
*/
|
||||
PaymentResponse initiatePayment(PaymentRequest request);
|
||||
|
||||
/**
|
||||
* 发起退款请求。
|
||||
* @param request 包含退款请求的详细信息
|
||||
* @return 返回退款响应信息
|
||||
*/
|
||||
RefundResponse refund(RefundRequest request);
|
||||
|
||||
/**
|
||||
* 查询支付状态。
|
||||
* @param paymentId 支付订单的唯一标识符
|
||||
* @return 返回支付状态响应信息
|
||||
*/
|
||||
PaymentStatusResponse queryStatus(String paymentId);
|
||||
|
||||
/**
|
||||
* 处理支付回调通知。
|
||||
* @param parameters 包含回调通知的所有参数
|
||||
*/
|
||||
Notification handleNotification(Map<String, String> parameters);
|
||||
}
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* Copyright © 2026 Qiantong Technology Co., Ltd.
|
||||
* qModel Model Platform(Open Source Edition)
|
||||
* *
|
||||
* License:
|
||||
* Released under the Apache License, Version 2.0.
|
||||
* You may use, modify, and distribute this software for commercial purposes
|
||||
* under the terms of the License.
|
||||
* *
|
||||
* Special Notice:
|
||||
* All derivative versions are strictly prohibited from modifying or removing
|
||||
* the default system logo and copyright information.
|
||||
* For brand customization, please apply for brand customization authorization via official channels.
|
||||
* *
|
||||
* More information: https://qmodel.qiantong.tech/business.html
|
||||
* *
|
||||
* ============================================================================
|
||||
* *
|
||||
* 版权所有 © 2026 江苏千桐科技有限公司
|
||||
* qModel 模型平台(开源版)
|
||||
* *
|
||||
* 许可协议:
|
||||
* 本项目基于 Apache License 2.0 开源协议发布,
|
||||
* 允许在遵守协议的前提下进行商用、修改和分发。
|
||||
* *
|
||||
* 特别说明:
|
||||
* 所有衍生版本不得修改或移除系统默认的 LOGO 和版权信息;
|
||||
* 如需定制品牌,请通过官方渠道申请品牌定制授权。
|
||||
* *
|
||||
* 更多信息请访问:https://qmodel.qiantong.tech/business.html
|
||||
*/
|
||||
|
||||
package tech.qiantong.qmodel.pay.service;
|
||||
|
||||
import tech.qiantong.qmodel.pay.domain.*;
|
||||
|
||||
/**
|
||||
* 定义了支付模块的核心业务操作。
|
||||
* 该接口包括发起支付、退款、查询支付状态以及处理支付回调的方法。
|
||||
* @author anivia
|
||||
*/
|
||||
public interface PaymentService {
|
||||
|
||||
/**
|
||||
* 发起支付请求。
|
||||
* @param request 包含支付请求的详细信息
|
||||
* @return 返回支付响应信息
|
||||
*/
|
||||
PaymentResponse pay(PaymentRequest request);
|
||||
|
||||
/**
|
||||
* 发起退款请求。
|
||||
* @param request 包含退款请求的详细信息
|
||||
* @return 返回退款响应信息
|
||||
*/
|
||||
RefundResponse refund(RefundRequest request);
|
||||
|
||||
/**
|
||||
* 查询支付状态。
|
||||
* @param paymentId 支付订单的唯一标识符
|
||||
* @return 返回支付状态响应信息
|
||||
*/
|
||||
PaymentStatusResponse queryStatus(String paymentId);
|
||||
}
|
||||
+215
@@ -0,0 +1,215 @@
|
||||
/*
|
||||
* Copyright © 2026 Qiantong Technology Co., Ltd.
|
||||
* qModel Model Platform(Open Source Edition)
|
||||
* *
|
||||
* License:
|
||||
* Released under the Apache License, Version 2.0.
|
||||
* You may use, modify, and distribute this software for commercial purposes
|
||||
* under the terms of the License.
|
||||
* *
|
||||
* Special Notice:
|
||||
* All derivative versions are strictly prohibited from modifying or removing
|
||||
* the default system logo and copyright information.
|
||||
* For brand customization, please apply for brand customization authorization via official channels.
|
||||
* *
|
||||
* More information: https://qmodel.qiantong.tech/business.html
|
||||
* *
|
||||
* ============================================================================
|
||||
* *
|
||||
* 版权所有 © 2026 江苏千桐科技有限公司
|
||||
* qModel 模型平台(开源版)
|
||||
* *
|
||||
* 许可协议:
|
||||
* 本项目基于 Apache License 2.0 开源协议发布,
|
||||
* 允许在遵守协议的前提下进行商用、修改和分发。
|
||||
* *
|
||||
* 特别说明:
|
||||
* 所有衍生版本不得修改或移除系统默认的 LOGO 和版权信息;
|
||||
* 如需定制品牌,请通过官方渠道申请品牌定制授权。
|
||||
* *
|
||||
* 更多信息请访问:https://qmodel.qiantong.tech/business.html
|
||||
*/
|
||||
|
||||
package tech.qiantong.qmodel.pay.service.impl;
|
||||
|
||||
import cn.hutool.core.lang.UUID;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson.TypeReference;
|
||||
import com.alipay.api.AlipayApiException;
|
||||
import com.alipay.api.AlipayClient;
|
||||
import com.alipay.api.DefaultAlipayClient;
|
||||
import com.alipay.api.request.AlipayTradePagePayRequest;
|
||||
import com.alipay.api.request.AlipayTradeRefundRequest;
|
||||
import com.alipay.api.response.AlipayTradeRefundResponse;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
import tech.qiantong.qmodel.pay.config.AliPayConfig;
|
||||
import tech.qiantong.qmodel.pay.domain.*;
|
||||
import tech.qiantong.qmodel.pay.service.PayGatewayClient;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author anivia
|
||||
*/
|
||||
@Service
|
||||
public class AlipayClientImpl implements PayGatewayClient {
|
||||
/** 支付宝网关地址 */
|
||||
@Value("${payment.alipay.gatewayUrl}")
|
||||
private String GATEWAY_URL;
|
||||
@Value("${payment.alipay.returnUrl}")
|
||||
private String RETURN_URL;
|
||||
private static final String FORMAT_JSON = "JSON";
|
||||
private static final String CHARSET_UTF8 = "UTF-8";
|
||||
private static final String SIGN_TYPE_RSA2 = "RSA2";
|
||||
|
||||
@Resource
|
||||
private AliPayConfig myAliPayConfig;
|
||||
|
||||
/**
|
||||
* 前端的使用方法
|
||||
* if (response.status === 'ALIPAY_SUCCESS') {
|
||||
* // 创建一个容器,用于放置支付宝的支付表单
|
||||
* const formContainer = document.createElement('div');
|
||||
* formContainer.innerHTML = response.paymentUrl;
|
||||
* // 将表单添加到页面并提交
|
||||
* document.body.appendChild(formContainer);
|
||||
* formContainer.querySelector('form').submit(); // 自动提交表单
|
||||
* }
|
||||
* @param payRequest 包含支付请求的详细信息
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public PaymentResponse initiatePayment(PaymentRequest payRequest) {
|
||||
AlipayClient alipayClient = new DefaultAlipayClient(GATEWAY_URL, myAliPayConfig.getAppId(),
|
||||
myAliPayConfig.getAppPrivateKey(), FORMAT_JSON, CHARSET_UTF8, myAliPayConfig.getAlipayPublicKey(), SIGN_TYPE_RSA2);
|
||||
AlipayTradePagePayRequest request = new AlipayTradePagePayRequest();
|
||||
request.setNotifyUrl(myAliPayConfig.getNotifyUrl());
|
||||
request.setReturnUrl(RETURN_URL);
|
||||
|
||||
// 设置请求参数
|
||||
double amount = payRequest.getAmount() / 100.0;
|
||||
request.setBizContent("{\"out_trade_no\":\"" + payRequest.getOrderId() + "\","
|
||||
+ "\"total_amount\":\"" + amount + "\","
|
||||
+ "\"subject\":\"" + payRequest.getDescription() + "\","
|
||||
+ "\"product_code\":\"FAST_INSTANT_TRADE_PAY\"}");
|
||||
|
||||
String form = "";
|
||||
try {
|
||||
// 调用SDK生成表单
|
||||
form = alipayClient.pageExecute(request).getBody();
|
||||
} catch (AlipayApiException e) {
|
||||
e.printStackTrace();
|
||||
return new PaymentResponse("ALIPAY_FAILURE", null, payRequest.getOrderId());
|
||||
}
|
||||
// 返回支付表单给前端
|
||||
return new PaymentResponse("ALIPAY_SUCCESS", form, payRequest.getOrderId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public RefundResponse refund(RefundRequest refunRequest) {
|
||||
// 初始化支付宝客户端
|
||||
AlipayClient alipayClient = new DefaultAlipayClient(
|
||||
GATEWAY_URL,
|
||||
myAliPayConfig.getAppId(),
|
||||
myAliPayConfig.getAppPrivateKey(),
|
||||
FORMAT_JSON,
|
||||
CHARSET_UTF8,
|
||||
myAliPayConfig.getAlipayPublicKey(),
|
||||
SIGN_TYPE_RSA2
|
||||
);
|
||||
|
||||
// 创建退款请求对象
|
||||
AlipayTradeRefundRequest request = new AlipayTradeRefundRequest();
|
||||
|
||||
// 构建退款请求的业务参数
|
||||
JSONObject bizContent = new JSONObject();
|
||||
// 订单号,对应支付宝交易号
|
||||
bizContent.put("trade_no", refunRequest.getOrderId());
|
||||
// 退款金额
|
||||
double amount = refunRequest.getAmount() / 100.0;
|
||||
bizContent.put("refund_amount", amount);
|
||||
// 退款请求号,可用于部分退款时的唯一标识
|
||||
bizContent.put("out_request_no", UUID.fastUUID().toString());
|
||||
|
||||
// 可选参数:如果需要返回详细的退款信息,可以添加此部分
|
||||
JSONArray queryOptions = new JSONArray();
|
||||
queryOptions.add("refund_detail_item_list");
|
||||
bizContent.put("query_options", queryOptions);
|
||||
|
||||
// 设置业务参数到请求对象中
|
||||
request.setBizContent(bizContent.toString());
|
||||
|
||||
try {
|
||||
// 执行退款请求,调用支付宝API
|
||||
AlipayTradeRefundResponse response = alipayClient.execute(request);
|
||||
|
||||
// 根据API返回结果判断退款是否成功
|
||||
if (response.isSuccess()) {
|
||||
System.out.println("退款成功");
|
||||
return new RefundResponse("ALIPAY_REFUND_SUCCESS", refunRequest.getOrderId());
|
||||
} else {
|
||||
System.out.println("退款失败");
|
||||
return new RefundResponse("ALIPAY_REFUND_FAILURE", refunRequest.getOrderId());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// 处理可能的异常情况
|
||||
e.printStackTrace();
|
||||
return new RefundResponse("ALIPAY_REFUND_ERROR", refunRequest.getOrderId());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public PaymentStatusResponse queryStatus(String paymentId) {
|
||||
// 调用支付宝API查询支付状态
|
||||
return new PaymentStatusResponse("ALIPAY_SUCCESS", paymentId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Notification handleNotification(Map<String, String> parameters) {
|
||||
// 解析 fund_bill_list 字段,将其转换为 FundBill 对象的列表
|
||||
String fundBillListJson = parameters.get("fund_bill_list");
|
||||
List<AlipayNotification.FundBill> fundBillList = parseFundBillList(fundBillListJson);
|
||||
return new AlipayNotification(
|
||||
parameters.get("gmt_create"),
|
||||
parameters.get("charset"),
|
||||
parameters.get("gmt_payment"),
|
||||
parameters.get("notify_time"),
|
||||
parameters.get("subject"),
|
||||
parameters.get("sign"),
|
||||
parameters.get("buyer_id"),
|
||||
parameters.get("invoice_amount"),
|
||||
parameters.get("version"),
|
||||
parameters.get("notify_id"),
|
||||
fundBillList,
|
||||
parameters.get("notify_type"),
|
||||
parameters.get("out_trade_no"),
|
||||
parameters.get("total_amount"),
|
||||
parameters.get("trade_status"),
|
||||
parameters.get("trade_no"),
|
||||
parameters.get("auth_app_id"),
|
||||
parameters.get("receipt_amount"),
|
||||
parameters.get("point_amount"),
|
||||
parameters.get("buyer_pay_amount"),
|
||||
parameters.get("app_id"),
|
||||
parameters.get("sign_type"),
|
||||
parameters.get("seller_id")
|
||||
);
|
||||
}
|
||||
|
||||
// 使用 Fastjson 解析 JSON 字符串为 FundBill 列表
|
||||
private List<AlipayNotification.FundBill> parseFundBillList(String fundBillListJson) {
|
||||
try {
|
||||
return JSON.parseObject(fundBillListJson, new TypeReference<List<AlipayNotification.FundBill>>() {});
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return Collections.emptyList();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+89
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
* Copyright © 2026 Qiantong Technology Co., Ltd.
|
||||
* qModel Model Platform(Open Source Edition)
|
||||
* *
|
||||
* License:
|
||||
* Released under the Apache License, Version 2.0.
|
||||
* You may use, modify, and distribute this software for commercial purposes
|
||||
* under the terms of the License.
|
||||
* *
|
||||
* Special Notice:
|
||||
* All derivative versions are strictly prohibited from modifying or removing
|
||||
* the default system logo and copyright information.
|
||||
* For brand customization, please apply for brand customization authorization via official channels.
|
||||
* *
|
||||
* More information: https://qmodel.qiantong.tech/business.html
|
||||
* *
|
||||
* ============================================================================
|
||||
* *
|
||||
* 版权所有 © 2026 江苏千桐科技有限公司
|
||||
* qModel 模型平台(开源版)
|
||||
* *
|
||||
* 许可协议:
|
||||
* 本项目基于 Apache License 2.0 开源协议发布,
|
||||
* 允许在遵守协议的前提下进行商用、修改和分发。
|
||||
* *
|
||||
* 特别说明:
|
||||
* 所有衍生版本不得修改或移除系统默认的 LOGO 和版权信息;
|
||||
* 如需定制品牌,请通过官方渠道申请品牌定制授权。
|
||||
* *
|
||||
* 更多信息请访问:https://qmodel.qiantong.tech/business.html
|
||||
*/
|
||||
|
||||
package tech.qiantong.qmodel.pay.service.impl;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.stereotype.Service;
|
||||
import tech.qiantong.qmodel.pay.domain.*;
|
||||
import tech.qiantong.qmodel.pay.service.PayGatewayClient;
|
||||
import tech.qiantong.qmodel.pay.service.PaymentService;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@Service
|
||||
public class PaymentServiceImpl implements PaymentService {
|
||||
|
||||
@Resource
|
||||
@Qualifier("alipayClientImpl") // 指定要注入的Bean名称
|
||||
private PayGatewayClient alipayClient;
|
||||
|
||||
@Resource
|
||||
@Qualifier("weChatPayClientImpl") // 指定要注入的Bean名称
|
||||
private PayGatewayClient wechatPayClient;
|
||||
|
||||
@Override
|
||||
public PaymentResponse pay(PaymentRequest request) {
|
||||
// 根据支付类型选择相应的支付网关客户端
|
||||
if (request.getPaymentType() == PaymentType.ALIPAY) {
|
||||
return alipayClient.initiatePayment(request);
|
||||
} else if (request.getPaymentType() == PaymentType.WECHAT) {
|
||||
return wechatPayClient.initiatePayment(request);
|
||||
} else {
|
||||
throw new UnsupportedOperationException("不支持的支付类型: " + request.getPaymentType());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public RefundResponse refund(RefundRequest request) {
|
||||
// 根据支付类型选择相应的退款操作
|
||||
if (request.getPaymentType() == PaymentType.ALIPAY) {
|
||||
return alipayClient.refund(request);
|
||||
} else if (request.getPaymentType() == PaymentType.WECHAT) {
|
||||
return wechatPayClient.refund(request);
|
||||
} else {
|
||||
throw new UnsupportedOperationException("不支持的支付类型: " + request.getPaymentType());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public PaymentStatusResponse queryStatus(String paymentId) {
|
||||
// 假设支付ID可以推断出支付类型,实际情况可能需要进一步处理
|
||||
if (paymentId.startsWith("ALIPAY")) {
|
||||
return alipayClient.queryStatus(paymentId);
|
||||
} else if (paymentId.startsWith("WECHAT")) {
|
||||
return wechatPayClient.queryStatus(paymentId);
|
||||
} else {
|
||||
throw new UnsupportedOperationException("不支持的支付ID类型: " + paymentId);
|
||||
}
|
||||
}
|
||||
}
|
||||
+68
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* Copyright © 2026 Qiantong Technology Co., Ltd.
|
||||
* qModel Model Platform(Open Source Edition)
|
||||
* *
|
||||
* License:
|
||||
* Released under the Apache License, Version 2.0.
|
||||
* You may use, modify, and distribute this software for commercial purposes
|
||||
* under the terms of the License.
|
||||
* *
|
||||
* Special Notice:
|
||||
* All derivative versions are strictly prohibited from modifying or removing
|
||||
* the default system logo and copyright information.
|
||||
* For brand customization, please apply for brand customization authorization via official channels.
|
||||
* *
|
||||
* More information: https://qmodel.qiantong.tech/business.html
|
||||
* *
|
||||
* ============================================================================
|
||||
* *
|
||||
* 版权所有 © 2026 江苏千桐科技有限公司
|
||||
* qModel 模型平台(开源版)
|
||||
* *
|
||||
* 许可协议:
|
||||
* 本项目基于 Apache License 2.0 开源协议发布,
|
||||
* 允许在遵守协议的前提下进行商用、修改和分发。
|
||||
* *
|
||||
* 特别说明:
|
||||
* 所有衍生版本不得修改或移除系统默认的 LOGO 和版权信息;
|
||||
* 如需定制品牌,请通过官方渠道申请品牌定制授权。
|
||||
* *
|
||||
* 更多信息请访问:https://qmodel.qiantong.tech/business.html
|
||||
*/
|
||||
|
||||
package tech.qiantong.qmodel.pay.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import tech.qiantong.qmodel.pay.domain.*;
|
||||
import tech.qiantong.qmodel.pay.service.PayGatewayClient;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Service
|
||||
public class WeChatPayClientImpl implements PayGatewayClient {
|
||||
|
||||
@Override
|
||||
public PaymentResponse initiatePayment(PaymentRequest request) {
|
||||
// 调用微信支付API实现支付逻辑
|
||||
return new PaymentResponse("WECHAT_SUCCESS", "https://wechat.com/pay", request.getOrderId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public RefundResponse refund(RefundRequest request) {
|
||||
// 调用微信支付API实现退款逻辑
|
||||
return new RefundResponse("WECHAT_REFUND_SUCCESS", request.getOrderId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public PaymentStatusResponse queryStatus(String paymentId) {
|
||||
// 调用微信支付API查询支付状态
|
||||
return new PaymentStatusResponse("WECHAT_SUCCESS", paymentId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Notification handleNotification(Map<String, String> parameters) {
|
||||
// 处理微信支付回调
|
||||
// 在此实现签名验证等逻辑
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
* Copyright © 2026 Qiantong Technology Co., Ltd.
|
||||
* qModel Model Platform(Open Source Edition)
|
||||
* *
|
||||
* License:
|
||||
* Released under the Apache License, Version 2.0.
|
||||
* You may use, modify, and distribute this software for commercial purposes
|
||||
* under the terms of the License.
|
||||
* *
|
||||
* Special Notice:
|
||||
* All derivative versions are strictly prohibited from modifying or removing
|
||||
* the default system logo and copyright information.
|
||||
* For brand customization, please apply for brand customization authorization via official channels.
|
||||
* *
|
||||
* More information: https://qmodel.qiantong.tech/business.html
|
||||
* *
|
||||
* ============================================================================
|
||||
* *
|
||||
* 版权所有 © 2026 江苏千桐科技有限公司
|
||||
* qModel 模型平台(开源版)
|
||||
* *
|
||||
* 许可协议:
|
||||
* 本项目基于 Apache License 2.0 开源协议发布,
|
||||
* 允许在遵守协议的前提下进行商用、修改和分发。
|
||||
* *
|
||||
* 特别说明:
|
||||
* 所有衍生版本不得修改或移除系统默认的 LOGO 和版权信息;
|
||||
* 如需定制品牌,请通过官方渠道申请品牌定制授权。
|
||||
* *
|
||||
* 更多信息请访问:https://qmodel.qiantong.tech/business.html
|
||||
*/
|
||||
|
||||
package tech.qiantong.qmodel.pay.utils;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 签名验证
|
||||
* @author anivia
|
||||
*/
|
||||
public class SignatureUtil {
|
||||
|
||||
/**
|
||||
* 生成签名字符串。
|
||||
* @param parameters 需要签名的参数集合
|
||||
* @param secret 签名密钥
|
||||
* @return 生成的签名字符串
|
||||
*/
|
||||
public static String generateSignature(Map<String, String> parameters, String secret) {
|
||||
// 实现签名生成逻辑
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证签名的有效性。
|
||||
* @param parameters 需要验证的参数集合
|
||||
* @param signature 传入的签名字符串
|
||||
* @param secret 签名密钥
|
||||
* @return 如果签名有效返回true,否则返回false
|
||||
*/
|
||||
public static boolean verifySignature(Map<String, String> parameters, String signature, String secret) {
|
||||
// 实现签名验证逻辑
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
# Copyright © 2026 Qiantong Technology Co., Ltd.
|
||||
# qModel Model Platform(Open Source Edition)
|
||||
# *
|
||||
# License:
|
||||
# Released under the Apache License, Version 2.0.
|
||||
# You may use, modify, and distribute this software for commercial purposes
|
||||
# under the terms of the License.
|
||||
# *
|
||||
# Special Notice:
|
||||
# All derivative versions are strictly prohibited from modifying or removing
|
||||
# the default system logo and copyright information.
|
||||
# For brand customization, please apply for brand customization authorization via official channels.
|
||||
# *
|
||||
# More information: https://qmodel.qiantong.tech/business.html
|
||||
# *
|
||||
# ============================================================================
|
||||
# *
|
||||
# 版权所有 © 2026 江苏千桐科技有限公司
|
||||
# qModel 模型平台(开源版)
|
||||
# *
|
||||
# 许可协议:
|
||||
# 本项目基于 Apache License 2.0 开源协议发布,
|
||||
# 允许在遵守协议的前提下进行商用、修改和分发。
|
||||
# *
|
||||
# 特别说明:
|
||||
# 所有衍生版本不得修改或移除系统默认的 LOGO 和版权信息;
|
||||
# 如需定制品牌,请通过官方渠道申请品牌定制授权。
|
||||
# *
|
||||
# 更多信息请访问:https://qmodel.qiantong.tech/business.html
|
||||
|
||||
payment:
|
||||
alipay:
|
||||
# 应用ID
|
||||
appId: 9021000140626549
|
||||
# 应用私钥
|
||||
appPrivateKey: MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCeLIpuahJarHGG54t4sI/nLyIJuRWhRJkqZpngFtZiqyEq1rk9pEgGVZ9/9dWHAEvz6mdwixwxeFIFYLquDtjiu8NXgfWcvx1PTcCu1QELB7DHhWxRuwvJkf5DbLgEpPgy8plIjz+w4Hzmlo6fFKYOufKJpbUb1ocO7Jw9JI6KskCeiSxxiYzvRRhyDeZivtKKqMjwLIepvj/bpOtRGFXEhIO74LN9/50vYYUDqN7dQKKgFJwDwMaS1QiOpOB3oCoD6t0yxUOh4yXD5khExyLW697+/0fCWvvxfpCj5vyqFF95eJNSx7btm1O5NCXHwayd+bFxLwE4wj2oi86tZeV/AgMBAAECggEANxc4V+Cl5+Lr35rB3xVP6atm5ZALUpH77uKxcXVC0jbcZHlJJ4kSdPJZjU3oQw79ZUUdJfutpCVOHAVmv7z4GXBgRxhCnYeLA9YG6F3T8S2KitOTuJu3LUumDYHOTf/PWp9YeAc8nbRyjDWgExQ0CikFqp+Ght2fSLlsaXdUFkYVZ7ikeLdnGgKAuTd2XLpo3HL8lTMZid94VIrwCrGH03T8A9Rooh1K1Qdkdu5px2LDJsOQd9Vi8phx7Am4Pk54O+Emn/DlePtj7WJIjupFWtJy2lBq4vQY1tc3jXw4cVjMmxgrTDoh4V9h00Cn7QjtAzy1WZZIG+fmX/gUI8dzUQKBgQDswXy0XLl4bn6oYdC38n6UuR4aPS5/JscAD2I8MCVmdgWW6usdyX6BpqBI0GHDzoKOrPJupc24EOIBiMQ99Nn3C84Z/6g1bfEA/IHISEibm0RDxzKzE2cA3PGREA1Q+JoudNbhaNr/QcIkXigGnAriBCZIVXuyTFskQVOh47+xEwKBgQCrB+P60FVui7+FWmoujGpCLs9JMuUayBXjF5zqarSYLN0BOAug+1dDkbO81gBrRYMI39XPTMqsQw+TY1PEiacDufyRqSYDCKrqm5VU+TXIbSlCNHcVnw+plFwHLHKrm8AnJlvGRrnu99n05P1qoXFHUB9Dn5ikSsSb7ZiJEZDzZQKBgQCiKfFZtL1RERXuDXmh1RYAlj9ZJ5jmfNAHaYIWyb+ES8iOU4ARmgbtlQzqctjT/moMgcdYJHcg4Wd8N4p7CXAWN97GjgdP+Wr/CvV2EpSxCIuchR9j6yE9RRitDLqiQHWS5nKcWG7QMeFheaCezljh8IesOekM+iHfVmOLWmzdQwKBgCLXhasn2++cSpT5GV6IPnFjJdlMo/2zuzm7Kr1apZXGtfM0nrHZ4ioiuZIDqqwvygT5zI3hn/w94SNufbcxL7QDpJ9r7RF7J46JyX85EarWCiyxkXz3HXK3hZP0ixvIq/mNx+55pBE5rs5EBBg/8VrMyMG29pqpnKoDWiq6SGQ9AoGBAKI674BDAZxHHMmoSLzqKNpvlfXyI77YePxCwSrZxGQkX5kG5yytCqHc6nzvD8TADz4xYuuYLpB6P0EjCDU8cl5ubTwWwPCCXIUbzcCqI31M98tY7aa6HQyQX1Tse0qh950xj0oOpcZ1jMVqN1V5+nM+r9hBpzpZfNhHAchj6HvP
|
||||
# 支付宝公钥
|
||||
alipayPublicKey: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAjPasNwRfyJjMLYYz4v0vgxSbiWQGHdDElP3culKbXwt0Nlk5gLCJ40QPBqW1Nwf7LnnsOKGvgjNrKdLdY5zfMD8U3RCbybYYJzOjneHcpEzJsDMuAWiPf7VmSs8jF3ApyQZbnHYwMiXhS/N6VM91VvA41M0F9KhcpH+iJkotli6TCbZWBtEzn3zIaULmrEDa608IP4UJBznxIye/gADv5yJQSdh4xX/BhgpN1IYyuE230Mg6qVRrYr6b/peQOlxykFX4RBl5555ZmKaDv3qqHLDy1oGb/3ieW6lUxa4jrKJ3HFSqjHFvyRkTqwV3TUKBX35rvjDdQh6jEAihz6AAnQIDAQAB
|
||||
# 回调接口
|
||||
notifyUrl: http://ssh.mingzhu.online:18080/payment/alipay/notify
|
||||
# 重定向回来路径
|
||||
returnUrl: http://localhost/admin/example/pay
|
||||
# 沙箱环境支付网地址 正式环境:openapi.alipay.com
|
||||
gatewayHost: openapi.alipaydev.com
|
||||
# 沙箱环境支付网地址 正式环境:https://openapi.alipay.com/gateway.do
|
||||
gatewayUrl: https://openapi-sandbox.dl.alipaydev.com/gateway.do
|
||||
wechat:
|
||||
# 应用ID
|
||||
appId: XXXXXX
|
||||
# 应用私钥
|
||||
appPrivateKey: XXXXXX
|
||||
# 支付宝公钥
|
||||
alipayPublicKey: XXXXXX
|
||||
# 回调接口
|
||||
notifyUrl: http://bxbunc.natappfree.cc/alipay/notify
|
||||
@@ -0,0 +1,55 @@
|
||||
# Copyright © 2026 Qiantong Technology Co., Ltd.
|
||||
# qModel Model Platform(Open Source Edition)
|
||||
# *
|
||||
# License:
|
||||
# Released under the Apache License, Version 2.0.
|
||||
# You may use, modify, and distribute this software for commercial purposes
|
||||
# under the terms of the License.
|
||||
# *
|
||||
# Special Notice:
|
||||
# All derivative versions are strictly prohibited from modifying or removing
|
||||
# the default system logo and copyright information.
|
||||
# For brand customization, please apply for brand customization authorization via official channels.
|
||||
# *
|
||||
# More information: https://qmodel.qiantong.tech/business.html
|
||||
# *
|
||||
# ============================================================================
|
||||
# *
|
||||
# 版权所有 © 2026 江苏千桐科技有限公司
|
||||
# qModel 模型平台(开源版)
|
||||
# *
|
||||
# 许可协议:
|
||||
# 本项目基于 Apache License 2.0 开源协议发布,
|
||||
# 允许在遵守协议的前提下进行商用、修改和分发。
|
||||
# *
|
||||
# 特别说明:
|
||||
# 所有衍生版本不得修改或移除系统默认的 LOGO 和版权信息;
|
||||
# 如需定制品牌,请通过官方渠道申请品牌定制授权。
|
||||
# *
|
||||
# 更多信息请访问:https://qmodel.qiantong.tech/business.html
|
||||
|
||||
payment:
|
||||
alipay:
|
||||
# 应用ID
|
||||
appId: 9021000140626549
|
||||
# 应用私钥
|
||||
appPrivateKey: MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCeLIpuahJarHGG54t4sI/nLyIJuRWhRJkqZpngFtZiqyEq1rk9pEgGVZ9/9dWHAEvz6mdwixwxeFIFYLquDtjiu8NXgfWcvx1PTcCu1QELB7DHhWxRuwvJkf5DbLgEpPgy8plIjz+w4Hzmlo6fFKYOufKJpbUb1ocO7Jw9JI6KskCeiSxxiYzvRRhyDeZivtKKqMjwLIepvj/bpOtRGFXEhIO74LN9/50vYYUDqN7dQKKgFJwDwMaS1QiOpOB3oCoD6t0yxUOh4yXD5khExyLW697+/0fCWvvxfpCj5vyqFF95eJNSx7btm1O5NCXHwayd+bFxLwE4wj2oi86tZeV/AgMBAAECggEANxc4V+Cl5+Lr35rB3xVP6atm5ZALUpH77uKxcXVC0jbcZHlJJ4kSdPJZjU3oQw79ZUUdJfutpCVOHAVmv7z4GXBgRxhCnYeLA9YG6F3T8S2KitOTuJu3LUumDYHOTf/PWp9YeAc8nbRyjDWgExQ0CikFqp+Ght2fSLlsaXdUFkYVZ7ikeLdnGgKAuTd2XLpo3HL8lTMZid94VIrwCrGH03T8A9Rooh1K1Qdkdu5px2LDJsOQd9Vi8phx7Am4Pk54O+Emn/DlePtj7WJIjupFWtJy2lBq4vQY1tc3jXw4cVjMmxgrTDoh4V9h00Cn7QjtAzy1WZZIG+fmX/gUI8dzUQKBgQDswXy0XLl4bn6oYdC38n6UuR4aPS5/JscAD2I8MCVmdgWW6usdyX6BpqBI0GHDzoKOrPJupc24EOIBiMQ99Nn3C84Z/6g1bfEA/IHISEibm0RDxzKzE2cA3PGREA1Q+JoudNbhaNr/QcIkXigGnAriBCZIVXuyTFskQVOh47+xEwKBgQCrB+P60FVui7+FWmoujGpCLs9JMuUayBXjF5zqarSYLN0BOAug+1dDkbO81gBrRYMI39XPTMqsQw+TY1PEiacDufyRqSYDCKrqm5VU+TXIbSlCNHcVnw+plFwHLHKrm8AnJlvGRrnu99n05P1qoXFHUB9Dn5ikSsSb7ZiJEZDzZQKBgQCiKfFZtL1RERXuDXmh1RYAlj9ZJ5jmfNAHaYIWyb+ES8iOU4ARmgbtlQzqctjT/moMgcdYJHcg4Wd8N4p7CXAWN97GjgdP+Wr/CvV2EpSxCIuchR9j6yE9RRitDLqiQHWS5nKcWG7QMeFheaCezljh8IesOekM+iHfVmOLWmzdQwKBgCLXhasn2++cSpT5GV6IPnFjJdlMo/2zuzm7Kr1apZXGtfM0nrHZ4ioiuZIDqqwvygT5zI3hn/w94SNufbcxL7QDpJ9r7RF7J46JyX85EarWCiyxkXz3HXK3hZP0ixvIq/mNx+55pBE5rs5EBBg/8VrMyMG29pqpnKoDWiq6SGQ9AoGBAKI674BDAZxHHMmoSLzqKNpvlfXyI77YePxCwSrZxGQkX5kG5yytCqHc6nzvD8TADz4xYuuYLpB6P0EjCDU8cl5ubTwWwPCCXIUbzcCqI31M98tY7aa6HQyQX1Tse0qh950xj0oOpcZ1jMVqN1V5+nM+r9hBpzpZfNhHAchj6HvP
|
||||
# 支付宝公钥
|
||||
alipayPublicKey: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAjPasNwRfyJjMLYYz4v0vgxSbiWQGHdDElP3culKbXwt0Nlk5gLCJ40QPBqW1Nwf7LnnsOKGvgjNrKdLdY5zfMD8U3RCbybYYJzOjneHcpEzJsDMuAWiPf7VmSs8jF3ApyQZbnHYwMiXhS/N6VM91VvA41M0F9KhcpH+iJkotli6TCbZWBtEzn3zIaULmrEDa608IP4UJBznxIye/gADv5yJQSdh4xX/BhgpN1IYyuE230Mg6qVRrYr6b/peQOlxykFX4RBl5555ZmKaDv3qqHLDy1oGb/3ieW6lUxa4jrKJ3HFSqjHFvyRkTqwV3TUKBX35rvjDdQh6jEAihz6AAnQIDAQAB
|
||||
# 回调接口
|
||||
notifyUrl: http://ssh.mingzhu.online:18080/payment/alipay/notify
|
||||
# 重定向回来路径
|
||||
returnUrl: http://localhost/admin/example/pay
|
||||
# 沙箱环境支付网地址 正式环境:openapi.alipay.com
|
||||
gatewayHost: openapi.alipaydev.com
|
||||
# 沙箱环境支付网地址 正式环境:https://openapi.alipay.com/gateway.do
|
||||
gatewayUrl: https://openapi-sandbox.dl.alipaydev.com/gateway.do
|
||||
wechat:
|
||||
# 应用ID
|
||||
appId: XXXXXX
|
||||
# 应用私钥
|
||||
appPrivateKey: XXXXXX
|
||||
# 支付宝公钥
|
||||
alipayPublicKey: XXXXXX
|
||||
# 回调接口
|
||||
notifyUrl: http://bxbunc.natappfree.cc/alipay/notify
|
||||
@@ -0,0 +1,55 @@
|
||||
# Copyright © 2026 Qiantong Technology Co., Ltd.
|
||||
# qModel Model Platform(Open Source Edition)
|
||||
# *
|
||||
# License:
|
||||
# Released under the Apache License, Version 2.0.
|
||||
# You may use, modify, and distribute this software for commercial purposes
|
||||
# under the terms of the License.
|
||||
# *
|
||||
# Special Notice:
|
||||
# All derivative versions are strictly prohibited from modifying or removing
|
||||
# the default system logo and copyright information.
|
||||
# For brand customization, please apply for brand customization authorization via official channels.
|
||||
# *
|
||||
# More information: https://qmodel.qiantong.tech/business.html
|
||||
# *
|
||||
# ============================================================================
|
||||
# *
|
||||
# 版权所有 © 2026 江苏千桐科技有限公司
|
||||
# qModel 模型平台(开源版)
|
||||
# *
|
||||
# 许可协议:
|
||||
# 本项目基于 Apache License 2.0 开源协议发布,
|
||||
# 允许在遵守协议的前提下进行商用、修改和分发。
|
||||
# *
|
||||
# 特别说明:
|
||||
# 所有衍生版本不得修改或移除系统默认的 LOGO 和版权信息;
|
||||
# 如需定制品牌,请通过官方渠道申请品牌定制授权。
|
||||
# *
|
||||
# 更多信息请访问:https://qmodel.qiantong.tech/business.html
|
||||
|
||||
payment:
|
||||
alipay:
|
||||
# 应用ID
|
||||
appId: 9021000140626549
|
||||
# 应用私钥
|
||||
appPrivateKey: MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCeLIpuahJarHGG54t4sI/nLyIJuRWhRJkqZpngFtZiqyEq1rk9pEgGVZ9/9dWHAEvz6mdwixwxeFIFYLquDtjiu8NXgfWcvx1PTcCu1QELB7DHhWxRuwvJkf5DbLgEpPgy8plIjz+w4Hzmlo6fFKYOufKJpbUb1ocO7Jw9JI6KskCeiSxxiYzvRRhyDeZivtKKqMjwLIepvj/bpOtRGFXEhIO74LN9/50vYYUDqN7dQKKgFJwDwMaS1QiOpOB3oCoD6t0yxUOh4yXD5khExyLW697+/0fCWvvxfpCj5vyqFF95eJNSx7btm1O5NCXHwayd+bFxLwE4wj2oi86tZeV/AgMBAAECggEANxc4V+Cl5+Lr35rB3xVP6atm5ZALUpH77uKxcXVC0jbcZHlJJ4kSdPJZjU3oQw79ZUUdJfutpCVOHAVmv7z4GXBgRxhCnYeLA9YG6F3T8S2KitOTuJu3LUumDYHOTf/PWp9YeAc8nbRyjDWgExQ0CikFqp+Ght2fSLlsaXdUFkYVZ7ikeLdnGgKAuTd2XLpo3HL8lTMZid94VIrwCrGH03T8A9Rooh1K1Qdkdu5px2LDJsOQd9Vi8phx7Am4Pk54O+Emn/DlePtj7WJIjupFWtJy2lBq4vQY1tc3jXw4cVjMmxgrTDoh4V9h00Cn7QjtAzy1WZZIG+fmX/gUI8dzUQKBgQDswXy0XLl4bn6oYdC38n6UuR4aPS5/JscAD2I8MCVmdgWW6usdyX6BpqBI0GHDzoKOrPJupc24EOIBiMQ99Nn3C84Z/6g1bfEA/IHISEibm0RDxzKzE2cA3PGREA1Q+JoudNbhaNr/QcIkXigGnAriBCZIVXuyTFskQVOh47+xEwKBgQCrB+P60FVui7+FWmoujGpCLs9JMuUayBXjF5zqarSYLN0BOAug+1dDkbO81gBrRYMI39XPTMqsQw+TY1PEiacDufyRqSYDCKrqm5VU+TXIbSlCNHcVnw+plFwHLHKrm8AnJlvGRrnu99n05P1qoXFHUB9Dn5ikSsSb7ZiJEZDzZQKBgQCiKfFZtL1RERXuDXmh1RYAlj9ZJ5jmfNAHaYIWyb+ES8iOU4ARmgbtlQzqctjT/moMgcdYJHcg4Wd8N4p7CXAWN97GjgdP+Wr/CvV2EpSxCIuchR9j6yE9RRitDLqiQHWS5nKcWG7QMeFheaCezljh8IesOekM+iHfVmOLWmzdQwKBgCLXhasn2++cSpT5GV6IPnFjJdlMo/2zuzm7Kr1apZXGtfM0nrHZ4ioiuZIDqqwvygT5zI3hn/w94SNufbcxL7QDpJ9r7RF7J46JyX85EarWCiyxkXz3HXK3hZP0ixvIq/mNx+55pBE5rs5EBBg/8VrMyMG29pqpnKoDWiq6SGQ9AoGBAKI674BDAZxHHMmoSLzqKNpvlfXyI77YePxCwSrZxGQkX5kG5yytCqHc6nzvD8TADz4xYuuYLpB6P0EjCDU8cl5ubTwWwPCCXIUbzcCqI31M98tY7aa6HQyQX1Tse0qh950xj0oOpcZ1jMVqN1V5+nM+r9hBpzpZfNhHAchj6HvP
|
||||
# 支付宝公钥
|
||||
alipayPublicKey: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAjPasNwRfyJjMLYYz4v0vgxSbiWQGHdDElP3culKbXwt0Nlk5gLCJ40QPBqW1Nwf7LnnsOKGvgjNrKdLdY5zfMD8U3RCbybYYJzOjneHcpEzJsDMuAWiPf7VmSs8jF3ApyQZbnHYwMiXhS/N6VM91VvA41M0F9KhcpH+iJkotli6TCbZWBtEzn3zIaULmrEDa608IP4UJBznxIye/gADv5yJQSdh4xX/BhgpN1IYyuE230Mg6qVRrYr6b/peQOlxykFX4RBl5555ZmKaDv3qqHLDy1oGb/3ieW6lUxa4jrKJ3HFSqjHFvyRkTqwV3TUKBX35rvjDdQh6jEAihz6AAnQIDAQAB
|
||||
# 回调接口
|
||||
notifyUrl: http://anivia.mingzhu.online:8080/payment/alipay/notify
|
||||
# 重定向回来路径
|
||||
returnUrl: http://anivia.mingzhu.online/admin/example/pay
|
||||
# 沙箱环境支付网地址 正式环境:openapi.alipay.com
|
||||
gatewayHost: openapi.alipaydev.com
|
||||
# 沙箱环境支付网地址 正式环境:https://openapi.alipay.com/gateway.do
|
||||
gatewayUrl: https://openapi-sandbox.dl.alipaydev.com/gateway.do
|
||||
wechat:
|
||||
# 应用ID
|
||||
appId: XXXXXX
|
||||
# 应用私钥
|
||||
appPrivateKey: XXXXXX
|
||||
# 支付宝公钥
|
||||
alipayPublicKey: XXXXXX
|
||||
# 回调接口
|
||||
notifyUrl: http://bxbunc.natappfree.cc/alipay/notify
|
||||
Reference in New Issue
Block a user