Skip to content

Commit

Permalink
feat: 支付(5)
Browse files Browse the repository at this point in the history
  • Loading branch information
phy19870227 committed May 23, 2021
1 parent 06b16b6 commit d020e5a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public class AlipayChannelHandler extends BasePayChannelHandler<Map<String, Stri

private static final Logger logger = LoggerFactory.getLogger(AlipayChannelHandler.class);

protected AlipayChannelHandler(StarTigerPayProperties starTigerPayProperties,
public AlipayChannelHandler(StarTigerPayProperties starTigerPayProperties,
IPayStorage payStorage) {
super(starTigerPayProperties, payStorage);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
*/
public class WxpayChannelHandler extends BasePayChannelHandler<String> {

protected WxpayChannelHandler(StarTigerPayProperties starTigerPayProperties,
public WxpayChannelHandler(StarTigerPayProperties starTigerPayProperties,
IPayStorage payStorage) {
super(starTigerPayProperties, payStorage);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
import org.springframework.context.annotation.Import;
import com.snake19870227.stiger.admin.dao.base.SysCfgMapper;
import com.snake19870227.stiger.pay.channel.IPayStorage;
import com.snake19870227.stiger.pay.channel.PayChannelHandler;
import com.snake19870227.stiger.pay.channel.alipay.AlipayChannelHandler;
import com.snake19870227.stiger.pay.config.StarTigerPaySampleConfig;
import com.snake19870227.stiger.pay.dao.base.PayNotifyMapper;
import com.snake19870227.stiger.pay.dao.base.PayRefundMapper;
Expand Down Expand Up @@ -39,6 +41,12 @@ public IPayStorage payStorage(SysCfgMapper sysCfgMapper,
return new DatabasePayStorageImpl(sysCfgMapper, payTradeMapper, payRefundMapper, payNotifyMapper);
}

@Bean
public AlipayChannelHandler alipayChannelHandler(IPayStorage payStorage,
StarTigerPayProperties starTigerPayProperties) {
return new AlipayChannelHandler(starTigerPayProperties, payStorage);
}

@Bean
public PayController payController(IPayStorage payStorage) {
return new PayController(payStorage);
Expand Down
5 changes: 4 additions & 1 deletion star-tiger-samples/star-tiger-sample-pay/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,13 @@
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<dependency>
<groupId>com.github.snake19870227</groupId>
<artifactId>star-tiger-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>com.github.snake19870227</groupId>
<artifactId>star-tiger-framework-pay-server-spring-boot-starter</artifactId>
<version>0.7.0</version>
</dependency>
</dependencies>

Expand Down

0 comments on commit d020e5a

Please sign in to comment.