项目中使用IJPay
1、添加依赖包构建项目
ijpay.version
版本为Maven仓库中最新版本
unionpay
银联支付SDK官方目前没有上传Maven仓库中需要单独引用,目前最新版本为 bcprov-jdk15on-1.54.jar
- 完整的
pom.xml
请参考 Gitee:IJPay-Demo Github:IJPay-Demo
<dependency>
<groupId>com.github.javen205</groupId>
<artifactId>IJPay</artifactId>
<version>${ijpay.version}</version>
</dependency>
<dependency>
<groupId>com.google.zxing</groupId>
<artifactId>core</artifactId>
<version>3.2.1</version>
</dependency>
<dependency>
<groupId>com.google.zxing</groupId>
<artifactId>javase</artifactId>
<version>3.2.1</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.6</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>com.alipay.sdk</groupId>
<artifactId>alipay-sdk-java</artifactId>
<version>3.0.52.ALL</version>
</dependency>
<dependency>
<groupId>com.unionpay</groupId>
<artifactId>unionpay-sdk-java</artifactId>
<version>1.54</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/bcprov-jdk15on-1.54.jar</systemPath>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.10</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.25</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.25</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.4</version>
</dependency>
2、初始化SDK并调用接口
请参考IJPay-Demo 入门中的 4~6 小节