mirror of https://gitee.com/stylefeng/roses
【7.0.4】整理支付代码
parent
1f3a58c356
commit
2b8ec525b6
|
@ -11,10 +11,4 @@
|
|||
|
||||
<artifactId>pay-api</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
|
||||
</project>
|
|
@ -48,7 +48,6 @@ public interface PayApi {
|
|||
*/
|
||||
String page(String orderName, String outTradeNo, String total, String returnUrl);
|
||||
|
||||
|
||||
/**
|
||||
* 手机支付
|
||||
*
|
||||
|
@ -63,7 +62,6 @@ public interface PayApi {
|
|||
*/
|
||||
String wap(String orderName, String outTradeNo, String total, String quitUrl, String returnUrl);
|
||||
|
||||
|
||||
/**
|
||||
* 退款
|
||||
*
|
||||
|
@ -75,5 +73,4 @@ public interface PayApi {
|
|||
*/
|
||||
TradeRefundResponse refund(String outTradeNo, String refundAmount);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -42,7 +42,6 @@ public interface PayConstants {
|
|||
*/
|
||||
String PAY_EXCEPTION_STEP_CODE = "80";
|
||||
|
||||
|
||||
/**
|
||||
* 退款成功的返回码
|
||||
*/
|
||||
|
|
|
@ -25,7 +25,10 @@
|
|||
package cn.stylefeng.roses.kernel.pay.api.pojo;
|
||||
|
||||
import cn.stylefeng.roses.kernel.pay.api.constants.PayConstants;
|
||||
import lombok.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 退款响应
|
||||
|
@ -112,7 +115,6 @@ public class TradeRefundResponse{
|
|||
return new TradeRefundResponse(PayConstants.REFUND_ERROR_CODE, msg, data);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 返回错误信息
|
||||
*
|
||||
|
@ -125,5 +127,4 @@ public class TradeRefundResponse{
|
|||
return error(msg, null);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -11,25 +11,20 @@
|
|||
|
||||
<artifactId>pay-sdk-alipay</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!--支付模块的api-->
|
||||
<dependency>
|
||||
<groupId>cn.stylefeng.roses</groupId>
|
||||
<artifactId>pay-api</artifactId>
|
||||
<version>7.0.4</version>
|
||||
<version>${roses.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!--阿里支付sdk-->
|
||||
<dependency>
|
||||
<groupId>com.alipay.sdk</groupId>
|
||||
<artifactId>alipay-easysdk</artifactId>
|
||||
<version>2.2.0</version>
|
||||
<version>${alipay.version}</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
|
|
@ -132,5 +132,4 @@ public class AlipayConfig implements ApplicationRunner {
|
|||
return config;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -33,4 +33,5 @@ package cn.stylefeng.roses.kernel.pay.alipay.constants;
|
|||
public interface AlipayConstants {
|
||||
|
||||
String ALIPAY_REFUND_SUCCESS_CODE = "10000";
|
||||
|
||||
}
|
||||
|
|
|
@ -48,7 +48,6 @@ public interface AlipayService {
|
|||
*/
|
||||
String page(String orderName, String outTradeNo, String total, String returnUrl);
|
||||
|
||||
|
||||
/**
|
||||
* 手机支付
|
||||
*
|
||||
|
@ -63,7 +62,6 @@ public interface AlipayService {
|
|||
*/
|
||||
String wap(String orderName, String outTradeNo, String total, String quitUrl, String returnUrl);
|
||||
|
||||
|
||||
/**
|
||||
* 退款
|
||||
*
|
||||
|
@ -75,5 +73,4 @@ public interface AlipayService {
|
|||
*/
|
||||
TradeRefundResponse refund(String outTradeNo, String refundAmount);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -44,7 +44,6 @@ import org.springframework.stereotype.Service;
|
|||
@Slf4j
|
||||
public class AlipayServiceImpl implements AlipayService, PayApi {
|
||||
|
||||
|
||||
@Override
|
||||
public String page(String orderName, String outTradeNo, String total, String returnUrl) {
|
||||
try {
|
||||
|
@ -88,4 +87,5 @@ public class AlipayServiceImpl implements AlipayService, PayApi {
|
|||
return TradeRefundResponse.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -11,18 +11,15 @@
|
|||
|
||||
<artifactId>pay-spring-boot-starter</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!--alipay api模块的sdk-->
|
||||
<dependency>
|
||||
<groupId>cn.stylefeng.roses</groupId>
|
||||
<artifactId>pay-sdk-alipay</artifactId>
|
||||
<version>7.0.4</version>
|
||||
<version>${roses.version}</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
|
@ -49,6 +49,5 @@ public class GunsPayAutoConfiguration {
|
|||
return new AlipayServiceImpl();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
<properties>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
<alipay.version>2.2.0</alipay.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
@ -28,7 +29,7 @@
|
|||
<dependency>
|
||||
<groupId>cn.stylefeng.roses</groupId>
|
||||
<artifactId>kernel-a-rule</artifactId>
|
||||
<version>7.0.4</version>
|
||||
<version>${roses.version}</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
|
Loading…
Reference in New Issue