1. 程式人生 > >微信、支付寶支付SDK

微信、支付寶支付SDK

1.首先是下載SDK,其對應的SDK在mvn上下載不了,需要手動配置到倉庫

支付寶SDK下載地址 https://docs.open.alipay.com/54/103419

微信SDK下載地址 https://pay.weixin.qq.com/wiki/doc/api/native.php?chapter=11_1

2.下載jar然後新增到maven本地倉庫中,步驟如下:

一、開啟maven Projects

 二、在command line中寫入配置地址,以下圖為例

 首先點開 1.Maven Goal

然後在在command line中寫入配置地址,例如:

install:install-file -Dfile=E:\alipay-sdk-java-3.4.27.ALL.jar -DgroupId=com.acts -DartifactId=alipay-sdk-java -Dversion=3.4.27 -Dpackaging=Jar
Dfile對應jar下載儲存的資料夾
DgroupId、DartifactId、Dversion與後面的maven地址一一對應。

如下圖,則匯入成功

 

 三、在pom.xml中新增地址:

<dependency>
<groupId>com.acts</groupId>
<artifactId>alipay-sdk-java</artifactId>
<version>3.4.27</version>
</dependency>