|
发表于 2015-3-10 10:53:11
|
显示全部楼层
使用2015-03-09发布的WeX5版本,下面的参数是起步公司申请的支付宝账号
1、修改支付宝插件的支付参数
修改/Native/plugins/com.justep.cordova.plugin.alipay/plugin.xml文件
<preference name="partner" value="2088811446024912" />
<preference name="rsa_private"
value="MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAM3NsYcFbce3omzhiXY1Mr8nkxuHkpVFky9JBb+vnLzje+mjZIxbHDGIU//3c88H5F6CO6CPNMa036QJ9nhS6Ea7xmEGQ2JxY0JMM2bnQxhRtwwe1nV67boFzkjrOWD1loThzK3pgVkb6D6gLqANXcPSe3JAqrvouNUYvK/+75O1AgMBAAECgYBy3IdlZUlE+x+DB0lyGPTOrSa0abEM8LzZ2jaEKl4fKhOBbXjzwPH2TzEaniAbfzsc6DChRuvcrxxWcF0IALWzqyJdGNxZjlhwyVhKc4BJnn90AUXohvB83AFd2+cHurHkAE8sEO8ihDsSOon0YpKKkA/haQ8RKshTCO8RZIlugQJBAP2WkR3BbPzgHZxKR8u0woe0ZzIkUCa/+dMr8XELE6ZBj1w3uPTq4ePHto5W9MLwzN3p3lN+WcUkAM/BdzlbUyECQQDPwsf4SYCjV5hTNY7sj1sqcO4O8Ti7HnINHkefb90TsIrQjaBYNYxeEjj028yLxKkNkNUoLZQekt0jDast24IVAkBDvM5yplJYkf0W3HilH1m/Kh9Os4h9cVZoZBqQWaccB/MlbPUI5x0D3TsUdoHW+L+gn3H115BfKqjU1hbkyVJBAkEAryckVTMKayrG9aeahd7Z2e75E8nTrRUey+ZyNX0mYZodfXNY8eS7IPe14uCHEnJKn3Ax9DxwulHQcuPsI64CfQJBAPYgBMhCX6HXpLTKUuIID1dy1ENZyEEUZCouQsuPYwirOO6z4NIi8wSa98wgM0/2NJrVs1W2/l2fn8xVycd4Ykk=" />
<preference name="rsa_public"
value="MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCnxj/9qwVfgoUh/y2W89L6BkRAFljhNhgPdyPuBV64bfQNN1PjbCzkIM6qRdKBoLPXmKKMiFYnkd6rAoprih3/PrQEB/VsW8OoM8fxn67UDYuyBTqA23MML9q1+ilIZwBC2AQ2UBVOrFXfFl75p6/B5KsiNG9zpgmLCUYuLkxpLQIDAQAB" />
2、调用支付方法
var tradeNo = justep.UUID.createUUID();
navigator.alipay.pay({
"seller":"huangyx@justep.com", //卖家支付宝账号或对应的支付宝唯一用户号
"subject":"x51", //商品名称
"body":"x5企业版", //商品详情
"price":"0.01", //金额,单位为RMB
"tradeNo":tradeNo, //唯一订单号
"timeout":"30m", //超时设置
"notifyUrl":"wwww.justep.com"}, // 服务器通知路径
function(msgCode){alert("success" + msgCode)}, //成功后回退函数
function(msg){alert("fail" + msg)}) //失败后回退函数
3、新建本地app
选择源代码模式,使用打包服务器打包,生成app之后,可以调出支付窗口
4、注意如果修改了支付宝插件里面的支付参数,需要新建本地app,才能生效 |
|