Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zuiketang
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
zuiketang
Commits
4a60fb45
Commit
4a60fb45
authored
Oct 19, 2016
by
xiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加微信支付的功能
parent
96a17893
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
4138 additions
and
2 deletions
+4138
-2
WeixinPay.php
src/common/libs/WeixinPay.php
+0
-1
WxPay.JsApiPay.php
src/common/libs/weixin/WxPay.JsApiPay.php
+210
-0
WxPay.Api.php
src/common/libs/weixin/libs/WxPay.Api.php
+581
-0
WxPay.Config.php
src/common/libs/weixin/libs/WxPay.Config.php
+59
-0
WxPay.Data.php
src/common/libs/weixin/libs/WxPay.Data.php
+2987
-0
WxPay.Exception.php
src/common/libs/weixin/libs/WxPay.Exception.php
+13
-0
WxPay.Notify.php
src/common/libs/weixin/libs/WxPay.Notify.php
+85
-0
PayController.php
src/frontend/controllers/PayController.php
+19
-1
WeixinJsPayController.php
src/frontend/controllers/WeixinJsPayController.php
+60
-0
index.php
src/frontend/views/weixin-js-pay/index.php
+124
-0
No files found.
src/common/libs/WeixinPay.php
View file @
4a60fb45
...
...
@@ -9,7 +9,6 @@
namespace
common\libs
;
use
dosamigos\qrcode\formats\Wifi
;
class
WeixinPay
{
...
...
src/common/libs/weixin/WxPay.JsApiPay.php
0 → 100755
View file @
4a60fb45
<?php
require_once
dirname
(
__FILE__
)
.
"/libs/WxPay.Api.php"
;
/**
*
* JSAPI支付实现类
* 该类实现了从微信公众平台获取code、通过code获取openid和access_token、
* 生成jsapi支付js接口所需的参数、生成获取共享收货地址所需的参数
*
* 该类是微信支付提供的样例程序,商户可根据自己的需求修改,或者使用lib中的api自行开发
*
* @author widy
*
*/
class
JsApiPay
{
/**
*
* 网页授权接口微信服务器返回的数据,返回样例如下
* {
* "access_token":"ACCESS_TOKEN",
* "expires_in":7200,
* "refresh_token":"REFRESH_TOKEN",
* "openid":"OPENID",
* "scope":"SCOPE",
* "unionid": "o6_bmasdasdsad6_2sgVt7hMZOPfL"
* }
* 其中access_token可用于获取共享收货地址
* openid是微信支付jsapi支付接口必须的参数
* @var array
*/
public
$data
=
NULL
;
/**
*
* 通过跳转获取用户的openid,跳转流程如下:
* 1、设置自己需要调回的url及其其他参数,跳转到微信服务器https://open.weixin.qq.com/connect/oauth2/authorize
* 2、微信服务处理完成之后会跳转回用户redirect_uri地址,此时会带上一些参数,如:code
*
* @return 用户的openid
*/
public
function
GetOpenid
()
{
//通过code获得openid
if
(
!
isset
(
$_GET
[
'code'
]))
{
//触发微信返回code码
$baseUrl
=
urlencode
(
'http://'
.
$_SERVER
[
'HTTP_HOST'
]
.
$_SERVER
[
'REQUEST_URI'
]
.
$_SERVER
[
'QUERY_STRING'
]);
$url
=
$this
->
__CreateOauthUrlForCode
(
$baseUrl
);
Header
(
"Location:
$url
"
);
exit
();
}
else
{
//获取code码,以获取openid
$code
=
$_GET
[
'code'
];
$openid
=
$this
->
getOpenidFromMp
(
$code
);
return
$openid
;
}
}
/**
*
* 获取jsapi支付的参数
* @param array $UnifiedOrderResult 统一支付接口返回的数据
* @throws WxPayException
*
* @return json数据,可直接填入js函数作为参数
*/
public
function
GetJsApiParameters
(
$UnifiedOrderResult
)
{
if
(
!
array_key_exists
(
"appid"
,
$UnifiedOrderResult
)
||
!
array_key_exists
(
"prepay_id"
,
$UnifiedOrderResult
)
||
$UnifiedOrderResult
[
'prepay_id'
]
==
""
)
{
throw
new
WxPayException
(
"参数错误"
);
}
$jsapi
=
new
WxPayJsApiPay
();
$jsapi
->
SetAppid
(
$UnifiedOrderResult
[
"appid"
]);
$timeStamp
=
time
();
$jsapi
->
SetTimeStamp
(
"
$timeStamp
"
);
$jsapi
->
SetNonceStr
(
WxPayApi
::
getNonceStr
());
$jsapi
->
SetPackage
(
"prepay_id="
.
$UnifiedOrderResult
[
'prepay_id'
]);
$jsapi
->
SetSignType
(
"MD5"
);
$jsapi
->
SetPaySign
(
$jsapi
->
MakeSign
());
$parameters
=
json_encode
(
$jsapi
->
GetValues
());
return
$parameters
;
}
/**
*
* 通过code从工作平台获取openid机器access_token
* @param string $code 微信跳转回来带上的code
*
* @return openid
*/
public
function
GetOpenidFromMp
(
$code
)
{
$url
=
$this
->
__CreateOauthUrlForOpenid
(
$code
);
//初始化curl
$ch
=
curl_init
();
//设置超时
curl_setopt
(
$ch
,
CURLOPT_TIMEOUT
,
$this
->
curl_timeout
);
curl_setopt
(
$ch
,
CURLOPT_URL
,
$url
);
curl_setopt
(
$ch
,
CURLOPT_SSL_VERIFYPEER
,
FALSE
);
curl_setopt
(
$ch
,
CURLOPT_SSL_VERIFYHOST
,
FALSE
);
curl_setopt
(
$ch
,
CURLOPT_HEADER
,
FALSE
);
curl_setopt
(
$ch
,
CURLOPT_RETURNTRANSFER
,
TRUE
);
if
(
WxPayConfig
::
CURL_PROXY_HOST
!=
"0.0.0.0"
&&
WxPayConfig
::
CURL_PROXY_PORT
!=
0
)
{
curl_setopt
(
$ch
,
CURLOPT_PROXY
,
WxPayConfig
::
CURL_PROXY_HOST
);
curl_setopt
(
$ch
,
CURLOPT_PROXYPORT
,
WxPayConfig
::
CURL_PROXY_PORT
);
}
//运行curl,结果以jason形式返回
$res
=
curl_exec
(
$ch
);
curl_close
(
$ch
);
//取出openid
$data
=
json_decode
(
$res
,
TRUE
);
$this
->
data
=
$data
;
$openid
=
$data
[
'openid'
];
return
$openid
;
}
/**
*
* 拼接签名字符串
* @param array $urlObj
*
* @return 返回已经拼接好的字符串
*/
private
function
ToUrlParams
(
$urlObj
)
{
$buff
=
""
;
foreach
(
$urlObj
as
$k
=>
$v
)
{
if
(
$k
!=
"sign"
)
{
$buff
.=
$k
.
"="
.
$v
.
"&"
;
}
}
$buff
=
trim
(
$buff
,
"&"
);
return
$buff
;
}
/**
*
* 获取地址js参数
*
* @return 获取共享收货地址js函数需要的参数,json格式可以直接做参数使用
*/
public
function
GetEditAddressParameters
()
{
$getData
=
$this
->
data
;
$data
=
array
();
$data
[
"appid"
]
=
WxPayConfig
::
APPID
;
$data
[
"url"
]
=
"http://"
.
$_SERVER
[
'HTTP_HOST'
]
.
$_SERVER
[
'REQUEST_URI'
];
$time
=
time
();
$data
[
"timestamp"
]
=
"
$time
"
;
$data
[
"noncestr"
]
=
"1234568"
;
$data
[
"accesstoken"
]
=
$getData
[
"access_token"
];
ksort
(
$data
);
$params
=
$this
->
ToUrlParams
(
$data
);
$addrSign
=
sha1
(
$params
);
$afterData
=
array
(
"addrSign"
=>
$addrSign
,
"signType"
=>
"sha1"
,
"scope"
=>
"jsapi_address"
,
"appId"
=>
WxPayConfig
::
APPID
,
"timeStamp"
=>
$data
[
"timestamp"
],
"nonceStr"
=>
$data
[
"noncestr"
]
);
$parameters
=
json_encode
(
$afterData
);
return
$parameters
;
}
/**
*
* 构造获取code的url连接
* @param string $redirectUrl 微信服务器回跳的url,需要url编码
*
* @return 返回构造好的url
*/
private
function
__CreateOauthUrlForCode
(
$redirectUrl
)
{
$urlObj
[
"appid"
]
=
WxPayConfig
::
APPID
;
$urlObj
[
"redirect_uri"
]
=
"
$redirectUrl
"
;
$urlObj
[
"response_type"
]
=
"code"
;
$urlObj
[
"scope"
]
=
"snsapi_base"
;
$urlObj
[
"state"
]
=
"STATE"
.
"#wechat_redirect"
;
$bizString
=
$this
->
ToUrlParams
(
$urlObj
);
return
"https://open.weixin.qq.com/connect/oauth2/authorize?"
.
$bizString
;
}
/**
*
* 构造获取open和access_toke的url地址
* @param string $code ,微信跳转带回的code
*
* @return 请求的url
*/
private
function
__CreateOauthUrlForOpenid
(
$code
)
{
$urlObj
[
"appid"
]
=
WxPayConfig
::
APPID
;
$urlObj
[
"secret"
]
=
WxPayConfig
::
APPSECRET
;
$urlObj
[
"code"
]
=
$code
;
$urlObj
[
"grant_type"
]
=
"authorization_code"
;
$bizString
=
$this
->
ToUrlParams
(
$urlObj
);
return
"https://api.weixin.qq.com/sns/oauth2/access_token?"
.
$bizString
;
}
}
\ No newline at end of file
src/common/libs/weixin/libs/WxPay.Api.php
0 → 100755
View file @
4a60fb45
This diff is collapsed.
Click to expand it.
src/common/libs/weixin/libs/WxPay.Config.php
0 → 100755
View file @
4a60fb45
<?php
/**
* 配置账号信息
*/
class
WxPayConfig
{
//=======【基本信息设置】=====================================
//
/**
* TODO: 修改这里配置为您自己申请的商户信息
* 微信公众号信息配置
*
* APPID:绑定支付的APPID(必须配置,开户邮件中可查看)
*
* MCHID:商户号(必须配置,开户邮件中可查看)
*
* KEY:商户支付密钥,参考开户邮件设置(必须配置,登录商户平台自行设置)
* 设置地址:https://pay.weixin.qq.com/index.php/account/api_cert
*
* APPSECRET:公众帐号secert(仅JSAPI支付的时候需要配置, 登录公众平台,进入开发者中心可设置),
* 获取地址:https://mp.weixin.qq.com/advanced/advanced?action=dev&t=advanced/dev&token=2005451881&lang=zh_CN
* @var string
*/
const
APPID
=
'wx5714a24a60083b2a'
;
const
MCHID
=
'1399794002'
;
const
KEY
=
'8934e7d15453e97507ef794cf7b0519d'
;
const
APPSECRET
=
'7c18222c6ec31efa65d21606a629585d'
;
//=======【证书路径设置】=====================================
/**
* TODO:设置商户证书路径
* 证书路径,注意应该填写绝对路径(仅退款、撤销订单时需要,可登录商户平台下载,
* API证书下载地址:https://pay.weixin.qq.com/index.php/account/api_cert,下载之前需要安装商户操作证书)
* @var path
*/
const
SSLCERT_PATH
=
'../cert/apiclient_cert.pem'
;
const
SSLKEY_PATH
=
'../cert/apiclient_key.pem'
;
//=======【curl代理设置】===================================
/**
* TODO:这里设置代理机器,只有需要代理的时候才设置,不需要代理,请设置为0.0.0.0和0
* 本例程通过curl使用HTTP POST方法,此处可修改代理服务器,
* 默认CURL_PROXY_HOST=0.0.0.0和CURL_PROXY_PORT=0,此时不开启代理(如有需要才设置)
* @var unknown_type
*/
const
CURL_PROXY_HOST
=
"0.0.0.0"
;
//"10.152.18.220";
const
CURL_PROXY_PORT
=
0
;
//8080;
//=======【上报信息配置】===================================
/**
* TODO:接口调用上报等级,默认紧错误上报(注意:上报超时间为【1s】,上报无论成败【永不抛出异常】,
* 不会影响接口调用流程),开启上报之后,方便微信监控请求调用的质量,建议至少
* 开启错误上报。
* 上报等级,0.关闭上报; 1.仅错误出错上报; 2.全量上报
* @var int
*/
const
REPORT_LEVENL
=
1
;
}
src/common/libs/weixin/libs/WxPay.Data.php
0 → 100755
View file @
4a60fb45
This diff is collapsed.
Click to expand it.
src/common/libs/weixin/libs/WxPay.Exception.php
0 → 100755
View file @
4a60fb45
<?php
/**
*
* 微信支付API异常类
* @author widyhu
*
*/
class
WxPayException
extends
Exception
{
public
function
errorMessage
()
{
return
$this
->
getMessage
();
}
}
src/common/libs/weixin/libs/WxPay.Notify.php
0 → 100755
View file @
4a60fb45
<?php
/**
*
* 回调基础类
* @author widyhu
*
*/
class
WxPayNotify
extends
WxPayNotifyReply
{
/**
*
* 回调入口
* @param bool $needSign 是否需要签名输出
*/
final
public
function
Handle
(
$needSign
=
true
)
{
$msg
=
"OK"
;
//当返回false的时候,表示notify中调用NotifyCallBack回调失败获取签名校验失败,此时直接回复失败
$result
=
WxpayApi
::
notify
(
array
(
$this
,
'NotifyCallBack'
),
$msg
);
if
(
$result
==
false
){
$this
->
SetReturn_code
(
"FAIL"
);
$this
->
SetReturn_msg
(
$msg
);
$this
->
ReplyNotify
(
false
);
return
;
}
else
{
//该分支在成功回调到NotifyCallBack方法,处理完成之后流程
$this
->
SetReturn_code
(
"SUCCESS"
);
$this
->
SetReturn_msg
(
"OK"
);
}
$this
->
ReplyNotify
(
$needSign
);
}
/**
*
* 回调方法入口,子类可重写该方法
* 注意:
* 1、微信回调超时时间为2s,建议用户使用异步处理流程,确认成功之后立刻回复微信服务器
* 2、微信服务器在调用失败或者接到回包为非确认包的时候,会发起重试,需确保你的回调是可以重入
* @param array $data 回调解释出的参数
* @param string $msg 如果回调处理失败,可以将错误信息输出到该方法
* @return true回调出来完成不需要继续回调,false回调处理未完成需要继续回调
*/
public
function
NotifyProcess
(
$data
,
&
$msg
)
{
//TODO 用户基础该类之后需要重写该方法,成功的时候返回true,失败返回false
return
true
;
}
/**
*
* notify回调方法,该方法中需要赋值需要输出的参数,不可重写
* @param array $data
* @return true回调出来完成不需要继续回调,false回调处理未完成需要继续回调
*/
final
public
function
NotifyCallBack
(
$data
)
{
$msg
=
"OK"
;
$result
=
$this
->
NotifyProcess
(
$data
,
$msg
);
if
(
$result
==
true
){
$this
->
SetReturn_code
(
"SUCCESS"
);
$this
->
SetReturn_msg
(
"OK"
);
}
else
{
$this
->
SetReturn_code
(
"FAIL"
);
$this
->
SetReturn_msg
(
$msg
);
}
return
$result
;
}
/**
*
* 回复通知
* @param bool $needSign 是否需要签名输出
*/
final
private
function
ReplyNotify
(
$needSign
=
true
)
{
//如果需要签名
if
(
$needSign
==
true
&&
$this
->
GetReturn_code
(
$return_code
)
==
"SUCCESS"
)
{
$this
->
SetSign
();
}
WxpayApi
::
replyNotify
(
$this
->
ToXml
());
}
}
\ No newline at end of file
src/frontend/controllers/PayController.php
View file @
4a60fb45
...
...
@@ -114,6 +114,24 @@ class PayController extends Controller
$weixinpay
=
\Yii
::
$app
->
params
[
'weixinpay'
];
$order_id
=
$data
[
'product_id'
];
$order
=
Orders
::
findOne
([
'number'
=>
$order_id
]);
if
(
$order
===
NULL
)
{
return
\Yii
::
createObject
([
'class'
=>
'yii\web\Response'
,
'format'
=>
\yii\web\Response
::
FORMAT_XML
,
'formatters'
=>
[
\yii\web\Response
::
FORMAT_XML
=>
[
'class'
=>
'yii\web\XmlResponseFormatter'
,
'rootTag'
=>
'xml'
,
//根节点
],
],
'data'
=>
[
'return_code'
=>
'FAIL'
,
'return_msg'
=>
'数据错误'
]
]);
}
//发送统一下单请求
$client
=
new
Client
(
[
...
...
@@ -132,7 +150,7 @@ class PayController extends Controller
'sign'
=>
''
,
'body'
=>
'最课堂-课程购买'
,
'out_trade_no'
=>
$order_id
,
'total_fee'
=>
1
,
'total_fee'
=>
$order
->
price
,
'spbill_create_ip'
=>
$_SERVER
[
'SERVER_ADDR'
],
'notify_url'
=>
WeixinPay
::
NOTIFY_URL
,
'trade_type'
=>
'NATIVE'
,
...
...
src/frontend/controllers/WeixinJsPayController.php
0 → 100644
View file @
4a60fb45
<?php
/**
* Created by PhpStorm.
* User: xiabin
* Date: 2016/10/19
* Time: 下午5:15
*/
namespace
frontend\controllers
;
use
common\models\Course
;
use
common\models\Orders
;
use
Yii
;
use
yii\web\Controller
;
use
yii\web\ForbiddenHttpException
;
class
WeixinJsPayController
extends
Controller
{
public
$layout
=
FALSE
;
public
$enableCsrfValidation
=
FALSE
;
public
function
actionIndex
(
$courseId
)
{
$courseBaseInfo
=
Course
::
findBaseInfoByCourseId
(
$courseId
);
if
(
$courseBaseInfo
!==
NULL
)
{
$userId
=
Yii
::
$app
->
user
->
identity
->
getId
();
$order
=
Orders
::
findByUserIdAndCourseId
(
$userId
,
$courseId
);
$price
=
$courseBaseInfo
[
'price'
];
$number
=
$this
->
generateOrderNumber
(
$userId
,
$courseId
,
$price
);
//判断订单是否存在
if
(
$order
===
NULL
)
{
$order
=
new
Orders
();
$order
->
user_id
=
$userId
;
$order
->
course_id
=
$courseId
;
$order
->
number
=
$number
;
$order
->
credit
=
$price
;
$order
->
status
=
Orders
::
UNPAID
;
$order
->
pay_order
=
'0'
;
$order
->
save
();
}
else
{
if
(
$order
->
status
!==
Orders
::
PAID
)
{
$order
->
credit
=
$price
;
$order
->
number
=
$number
;
$order
->
update
();
}
}
return
$this
->
render
(
'index'
,
[
'number'
=>
$number
,
'price'
=>
$price
]);
}
else
{
throw
new
ForbiddenHttpException
(
'非法请求'
);
}
}
private
function
generateOrderNumber
(
$userId
,
$courseId
,
$price
)
{
return
md5
(
microtime
()
.
"_
{
$userId
}
_
{
$courseId
}
_
{
$price
}
"
);
}
}
\ No newline at end of file
src/frontend/views/weixin-js-pay/index.php
0 → 100644
View file @
4a60fb45
<?php
//error_reporting(E_ERROR);
use
common\libs\WeixinPay
;
require_once
dirname
(
dirname
(
dirname
(
dirname
(
__FILE__
))))
.
"/common/libs/weixin/libs/WxPay.Api.php"
;
require_once
dirname
(
dirname
(
dirname
(
dirname
(
__FILE__
))))
.
"/common/libs/weixin/WxPay.JsApiPay.php"
;
//初始化日志
$log
=
Yii
::
getLogger
();
//打印输出数组信息
function
printf_info
(
$data
)
{
foreach
(
$data
as
$key
=>
$value
)
{
echo
"<font color='#00ff55;'>
$key
</font> :
$value
<br/>"
;
}
}
//①、获取用户openid
$tools
=
new
JsApiPay
();
$openId
=
$tools
->
GetOpenid
();
//②、统一下单
$input
=
new
WxPayUnifiedOrder
();
$input
->
SetBody
(
"最课堂-课程购买"
);
$input
->
SetOut_trade_no
(
$number
);
$input
->
SetTotal_fee
(
$price
);
$input
->
SetTime_start
(
date
(
"YmdHis"
));
$input
->
SetTime_expire
(
date
(
"YmdHis"
,
time
()
+
600
));
$input
->
SetNotify_url
(
WeixinPay
::
NOTIFY_URL
);
$input
->
SetTrade_type
(
"JSAPI"
);
$input
->
SetOpenid
(
$openId
);
$order
=
WxPayApi
::
unifiedOrder
(
$input
);
echo
'<font color="#f00"><b>统一下单支付单信息</b></font><br/>'
;
printf_info
(
$order
);
$jsApiParameters
=
$tools
->
GetJsApiParameters
(
$order
);
//获取共享收货地址js函数参数
$editAddress
=
$tools
->
GetEditAddressParameters
();
//③、在支持成功回调通知中处理成功之后的事宜,见 notify.php
/**
* 注意:
* 1、当你的回调地址不可访问的时候,回调通知会失败,可以通过查询订单来确认支付是否成功
* 2、jsapi支付时需要填入用户openid,WxPay.JsApiPay.php中有获取openid流程 (文档可以参考微信公众平台“网页授权接口”,
* 参考http://mp.weixin.qq.com/wiki/17/c0f37d5704f0b64713d5d2c37b468d75.html)
*/
?>
<html>
<head>
<meta
http-equiv=
"content-type"
content=
"text/html;charset=utf-8"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
/>
<title>
微信支付样例-支付
</title>
<script
type=
"text/javascript"
>
//调用微信JS api 支付
function
jsApiCall
()
{
WeixinJSBridge
.
invoke
(
'getBrandWCPayRequest'
,
<?php
echo
$jsApiParameters
;
?>
,
function
(
res
)
{
WeixinJSBridge
.
log
(
res
.
err_msg
);
alert
(
res
.
err_code
+
res
.
err_desc
+
res
.
err_msg
);
}
);
}
function
callpay
()
{
if
(
typeof
WeixinJSBridge
==
"undefined"
)
{
if
(
document
.
addEventListener
)
{
document
.
addEventListener
(
'WeixinJSBridgeReady'
,
jsApiCall
,
false
);
}
else
if
(
document
.
attachEvent
)
{
document
.
attachEvent
(
'WeixinJSBridgeReady'
,
jsApiCall
);
document
.
attachEvent
(
'onWeixinJSBridgeReady'
,
jsApiCall
);
}
}
else
{
jsApiCall
();
}
}
</script>
<script
type=
"text/javascript"
>
//获取共享地址
function
editAddress
()
{
WeixinJSBridge
.
invoke
(
'editAddress'
,
<?php
echo
$editAddress
;
?>
,
function
(
res
)
{
var
value1
=
res
.
proviceFirstStageName
;
var
value2
=
res
.
addressCitySecondStageName
;
var
value3
=
res
.
addressCountiesThirdStageName
;
var
value4
=
res
.
addressDetailInfo
;
var
tel
=
res
.
telNumber
;
alert
(
value1
+
value2
+
value3
+
value4
+
":"
+
tel
);
}
);
}
window
.
onload
=
function
()
{
if
(
typeof
WeixinJSBridge
==
"undefined"
)
{
if
(
document
.
addEventListener
)
{
document
.
addEventListener
(
'WeixinJSBridgeReady'
,
editAddress
,
false
);
}
else
if
(
document
.
attachEvent
)
{
document
.
attachEvent
(
'WeixinJSBridgeReady'
,
editAddress
);
document
.
attachEvent
(
'onWeixinJSBridgeReady'
,
editAddress
);
}
}
else
{
editAddress
();
}
};
</script>
</head>
<body>
<br/>
<font
color=
"#9ACD32"
><b>
该笔订单支付金额为
<span
style=
"color:#f00;font-size:50px"
>
<?=
$price
?>
</span
</b
></font><br/><br/>
<div
align=
"center"
>
<button
style=
"width:210px; height:50px; border-radius: 15px;background-color:#FE6714; border:0px #FE6714 solid; cursor: pointer; color:white; font-size:16px;"
type=
"button"
onclick=
"callpay()"
>
立即支付
</button>
</div>
</body>
</html>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment