alipay Local jar installation

Install a local jar, alipay here for an example

1, sdk download from Fubao Guan branch network

Official website scan code Login: https: //openhome.alipay.com

Into the sandbox environment: https: //openhome.alipay.com/platform/appDaily.htm tab = info?

[Image dump the chain fails, the source station may have security chain mechanism, it is recommended to save the picture down uploaded directly (img-1rKsMdOX-1585373303538) (assets / 1584934923085.png)]

Download personally pay sdk

[Image dump the chain fails, the source station may have security chain mechanism, it is recommended to save the picture down uploaded directly (img-y4NOOOfp-1585373303548) (assets / 1584934974328.png)]

Download PC sites pay sdk

[Image dump the chain fails, the source station may have security chain mechanism, it is recommended to save the picture down uploaded directly (img-kunlUE7W-1585373303548) (assets / 1584935085271.png)]

2, identify the required jar package groupId and artifactId

First, look for a dependency from maven remote repository according to artifactId. Record groupId and artifactId. If you can not find maven in Baidu search. (Recommended Baidu to find)

Support Fubao Guan jar package obtained from the website to download the demo.

Given directly dependent here:

<!--下面三个依赖:支付宝相关依赖-->
        <dependency>
            <groupId>com.alipay.sdk</groupId>
            <artifactId>alipay-sdk-java</artifactId>
            <version>3.3.0</version>
        </dependency>
        <dependency>
            <groupId>com.alipay</groupId>
            <artifactId>alipay-trade-sdk</artifactId>
            <version>20161215</version>
        </dependency>

3, the local repository mounted reliance

Installation command:

mvn install:install-file -DgroupId=com.alipay.sdk -DartifactId=alipay-sdk-java -Dversion=3.3.0 -Dpackaging=jar -Dfile=alipay-sdk-java-3.3.0.jar
mvn install:install-file -DgroupId=com.alipay -DartifactId=alipay-trade-sdk -Dversion=20161215 -Dpackaging=jar -Dfile=alipay-trade-sdk-20161215.jar

3.1, a manner, in the installation cmd.

Switching to the parent directory of a jar is located, and then run the install command.

[Image dump the chain fails, the source station may have security chain mechanism, it is recommended to save the picture down uploaded directly (img-cUy7V9K3-1585373303555) (assets / 1584538851922.png)]

[Image dump the chain fails, the source station may have security chain mechanism, it is recommended to save the picture down uploaded directly (img-RRv8dLKj-1585373303558) (assets / 1584538873029.png)]

3.2, two way, idea mounted directly

[Image dump the chain fails, the source station may have security chain mechanism, it is recommended to save the picture down uploaded directly (img-OqwiByxA-1585373303561) (assets / 1585018139548.png)]

And then update the project, you can update it to the project below.

[Image dump the chain fails, the source station may have security chain mechanism, it is recommended to save the picture down uploaded directly (img-jnUTDmc8-1585373303564) (assets / 1585018325621.png)]

4, the installation is successful, the local repository display

[Image dump the chain fails, the source station may have security chain mechanism, it is recommended to save the picture down uploaded directly (img-sDAMykrj-1585373303567) (assets / 1585018444785.png)]

[Image dump the chain fails, the source station may have security chain mechanism, it is recommended to save the picture down uploaded directly (img-1OnRAb8F-1585373303569) (assets / 1585018481721.png)]

Published 29 original articles · won praise 0 · Views 2243

Guess you like

Origin blog.csdn.net/rootDream/article/details/105159871