• 大小: 6.47MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-11-18
  • 语言: Java
  • 标签: java  alipay  沙箱  

资源简介

1.申请沙箱测试环境,获得账号 2.配置沙箱公钥,获取支付宝公钥 3.对本地环境做内网穿透,推荐使用natapp 4.在代码中配置参数,发布服务即可直接运行

资源截图

代码片段和文件信息

package com.alipay.config;

public class AlipayConfig {
// 商户appid
public static String APPID = “2016091500514460“;
// 私钥 pkcs8格式的
public static String RSA_PRIVATE_KEY = “MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCd0eubIbGTuPMiGzHWLa52jEudm+hmpVXvHxpis+G2GbFaTKhJsrGIfynWMflly4tYdU/u0NX+3Nc80XxyoY1ALRiMp5zDS72jJDSlgFTJPdU4gO0vpUJAUSr/Klx19b0tRblmziu8sKXFL7KFyhK5OY20/DUepqRjbM9SuZEndJ4B+8FtJHuMRkAfXWX2TtCuQ43/bfD6Sd9pgawihWAVtYgTK7zYjC4bI51yInOZM5tfiasSiKML0wmH2HAqsmNovHlfCs2ikw+mb3O8puFkmO3eFQwtnQxRuNvy8djw2Da11yc53F0bWfGN2WHGSF4k5hIPUfic7fBz69ayiGsFAgMBAAECggEALbaLXzEARcCxtDRaWCZ9PVtf37Q0Od80KAJDW0mtXFjO1VAVAtverqHe1Ws+SS0PHL1GPO+CvMLtGXG4cV+4EVm+nadDMhJzSJkJItMsO+pMI4S8rytYKFcadDSp+YUHmeBzVoLriklEivxI4pXonHw+Pqk7Hbi5Lw9qchTMJbgeO3rDzMWRCYIgfjTVGC6p/fyhxanGvQjhubrL5auc4uo7SDSugD8NvfxokBI9MOr0FCv/+EqbAf0HPqSiRSy3/DPHTx5VJ8Z8d5T3KDfrratgrK4oCzLdUSkjqiQgLDHSkmhc0G4SFzveRYaPlP8i4bkopxpKBP1UPe73C/o+VQKBgQDOp63DWf6M20TVn3qI7Wf7XPaDTwMT/5Fc35Sh5XOy/2j5NMLk33FSgBto6/E/DdT8qK7c6VXZn7k8oy6JOIjKeb+LxdHt+T33xnhiP5lQzxICdH47dlf/QOIzEBCOwwLHW2YYaT7HTy5kS3wLtjWfvwHF9boKfec6XSkixAwEGwKBgQDDgRODthrj3/Xwix2Moe2BoTWGnoOy01IMZTXvfXFxxQhG7g2yiZ/M7rxvUMqTPT6lMwDjHSXZlWuuxT5XSOqd5bn6W4Cx8XxqGLiGYWf5gj3c1WWAar1FARukRTUc6qJhjeQB5fqCKH5+7ptbDvifnKgow4c4PDDyDnbKtbT/XwKBgQDMU/C0KeRNI3RxAAlpH8tjNuyqslHp0RTKTmqolLWMM4t4c9mL8P4cQ3xWhot2+9cuph6XYMK4tXuy3+ngVZyzDiP9MHA8KudBeOSIyDdwNf2pncM+SeoCAQZm1Kh6b4js0osk8dLXwIuvMQ+KiPOGapZ3RFpZi1k4VOqabFsxJwKBgQCNRjLR1MAttuNEBWM/AqxcJiBFvTox+R6rMl/9Rcq6icTnbJKdV3IQZtvoHJumNnWUbvzPIXr+dkkwK/xWmqxfmWgBECo5a+WZzW9aO/0kggcuE06bs4Y93QUaeaBd2veoQx5meMfDUnvGQaol7PWgcVXazyBhdK1x3R3ecdvvRQKBgHWvZ1VyaeHjacfZ9nFPoE8riJRDgxkyRpXTOHv3JT7ivs3/nbpGHONHViB5IrLcYjyRIjzSMOxQe0Hgu+QqAFmIsCEN9PxW7BLekV1baBGcinPmWsfaCRrtLyjdh6625VuhTYfT6msg4a0PAonGXLQgUScDqJZvBgRrT0/Xr4lG“;
// 服务器异步通知页面路径 需http://或者https://格式的完整路径,不能加?id=123这类自定义参数,必须外网可以正常访问
public static String notify_url = “http://f8s7ks.natappfree.cc/alipay.trade.wap.pay-java-utf-8/notify_url.jsp“;
// 页面跳转同步通知页面路径 需http://或者https://格式的完整路径,不能加?id=123这类自定义参数,必须外网可以正常访问 商户可以自定义同步跳转地址
public static String return_url = “http://f8s7ks.natappfree.cc/alipay.trade.wap.pay-java-utf-8/return_url.jsp“;
// 请求网关地址  
public static String URL = “https://openapi.alipaydev.com/gateway.do“;
// 编码
public static String CHARSET = “UTF-8“;
// 返回格式
public static String FORMAT = “json“;
// 支付宝公钥
public static String ALIPAY_PUBLIC_KEY = “MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyM9w1suMTHPYxNQLC0PZm1yM6rC75vggDJF6whzyMcPKwoWeAVCWWnAvQb5mtwkIWIUL9oKzSMAcssIrdGI5jZrwU1KfBbbDyJdkQ1nCOFR8yBZQdbyzRm+DgEOit/lvnGlQbcR/YwHSh22eMET2c7T5V24Y9zODMezPeNuE/rc172GOCCO7HpucUQogd73l3/ljNxEtKi2OS6GWtB5TaTJX3LiBbnoysPfezHfjMhv85HW5AxX6ONMB6G5DUpT/GmtUA+TH1TInmYSaDmtA+LZRn/TQ0JGd5nkMub14mMtQ+ctpbbTMOjcUMvry9mm/BpY0ANGFfTnijX2kPyajjwIDAQAB+DgEOit/lvnGlQbcR/YwHSh22eMET2c7T5V24Y9zODMezPeNuE/rc172GOCCO7HpucUQogd73l3/ljNxEtKi2OS6GWtB5TaTJX3LiBbnoysPfezHfjMhv85HW5AxX6ONMB6G5DUpT/GmtUA+TH1TInmYSaDmtA+LZRn/TQ0JGd5

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       1122  2018-05-11 11:37  alipay.trade.wap.pay-java-utf-8\.classpath

     文件       1028  2017-03-09 17:27  alipay.trade.wap.pay-java-utf-8\.project

     文件        491  2017-03-09 17:27  alipay.trade.wap.pay-java-utf-8\.settings\.jsdtscope

     文件         80  2018-05-09 17:31  alipay.trade.wap.pay-java-utf-8\.settings\com.genuitec.eclipse.migration.prefs

     文件        107  2018-05-10 17:29  alipay.trade.wap.pay-java-utf-8\.settings\org.eclipse.core.resources.prefs

     文件        357  2017-03-09 17:27  alipay.trade.wap.pay-java-utf-8\.settings\org.eclipse.jdt.core.prefs

     文件        537  2017-03-09 17:27  alipay.trade.wap.pay-java-utf-8\.settings\org.eclipse.wst.common.component

     文件        346  2018-05-09 17:31  alipay.trade.wap.pay-java-utf-8\.settings\org.eclipse.wst.common.project.facet.core.xml

     文件         49  2017-03-09 17:27  alipay.trade.wap.pay-java-utf-8\.settings\org.eclipse.wst.jsdt.ui.superType.container

     文件          6  2017-03-09 17:27  alipay.trade.wap.pay-java-utf-8\.settings\org.eclipse.wst.jsdt.ui.superType.name

     文件       4092  2018-05-11 14:59  alipay.trade.wap.pay-java-utf-8\build\classes\com\alipay\config\AlipayConfig.class

     文件       1441  2018-05-11 11:37  alipay.trade.wap.pay-java-utf-8\build\classes\com\alipay\util\logFile.class

     文件       6209  2018-05-11 15:30  alipay.trade.wap.pay-java-utf-8\build\classes\com\inspiron\alipay\AlipayClientFactory.class

     文件       2595  2018-05-12 15:49  alipay.trade.wap.pay-java-utf-8\build\classes\com\inspiron\alipay\CsPay.class

     文件       1630  2018-05-11 11:41  alipay.trade.wap.pay-java-utf-8\build\classes\com\inspiron\alipay\CsUtil.class

     文件       1354  2018-05-11 11:40  alipay.trade.wap.pay-java-utf-8\build\classes\com\inspiron\alipay\UtilDate.class

     文件         82  2017-03-14 11:44  alipay.trade.wap.pay-java-utf-8\readme.txt

     文件       4239  2018-05-11 14:59  alipay.trade.wap.pay-java-utf-8\src\com\alipay\config\AlipayConfig.java

     文件        894  2017-03-06 15:13  alipay.trade.wap.pay-java-utf-8\src\com\alipay\util\logFile.java

     文件       6953  2018-05-11 15:30  alipay.trade.wap.pay-java-utf-8\src\com\inspiron\alipay\AlipayClientFactory.java

     文件       2391  2018-05-12 15:49  alipay.trade.wap.pay-java-utf-8\src\com\inspiron\alipay\CsPay.java

     文件       1032  2018-05-11 11:41  alipay.trade.wap.pay-java-utf-8\src\com\inspiron\alipay\CsUtil.java

     文件       2071  2018-05-11 11:40  alipay.trade.wap.pay-java-utf-8\src\com\inspiron\alipay\UtilDate.java

     文件       5311  2016-11-30 16:35  alipay.trade.wap.pay-java-utf-8\WebContent\index.html

     文件         39  2017-03-09 17:27  alipay.trade.wap.pay-java-utf-8\WebContent\meta-INF\MANIFEST.MF

     文件       3893  2017-03-14 11:46  alipay.trade.wap.pay-java-utf-8\WebContent\notify_url.jsp

     文件       3343  2017-03-14 11:46  alipay.trade.wap.pay-java-utf-8\WebContent\return_url.jsp

     文件       6975  2017-03-15 16:20  alipay.trade.wap.pay-java-utf-8\WebContent\wappay\close.jsp

     文件       7414  2017-03-15 16:25  alipay.trade.wap.pay-java-utf-8\WebContent\wappay\downloadurl.jsp

     文件       8933  2018-01-05 10:46  alipay.trade.wap.pay-java-utf-8\WebContent\wappay\pay.jsp

............此处省略35个文件信息

评论

共有 条评论