pay debug
parent
47e43ad861
commit
3ec94ee379
|
|
@ -172,26 +172,6 @@ class WeixinMini
|
|||
return DataReturn($msg, -1);
|
||||
}
|
||||
|
||||
/**
|
||||
* 数组转xml
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2019-01-07
|
||||
* @desc description
|
||||
* @param [array] $data [数组]
|
||||
*/
|
||||
private function ArrayToXml($data)
|
||||
{
|
||||
$xml = '<xml>';
|
||||
foreach($data as $k=>$v)
|
||||
{
|
||||
$xml .= '<'.$k.'>'.$v.'</'.$k.'>';
|
||||
}
|
||||
$xml .= '</xml>';
|
||||
return $xml;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取支付参数
|
||||
* @author Devil
|
||||
|
|
@ -232,7 +212,10 @@ class WeixinMini
|
|||
*/
|
||||
public function Respond($params = [])
|
||||
{
|
||||
|
||||
$result = empty($GLOBALS['HTTP_RAW_POST_DATA']) ? '' : $this->Xml_Array($GLOBALS['HTTP_RAW_POST_DATA']);
|
||||
|
||||
if(isset($result['sign']) && $result['sign'] == $this->GetParamSing($result)) return $result;
|
||||
return '';
|
||||
return DataReturn('test', -100);
|
||||
}
|
||||
|
||||
|
|
@ -256,6 +239,26 @@ class WeixinMini
|
|||
return strtoupper(md5($sign.'key='.$this->config['key']));
|
||||
}
|
||||
|
||||
/**
|
||||
* 数组转xml
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2019-01-07
|
||||
* @desc description
|
||||
* @param [array] $data [数组]
|
||||
*/
|
||||
private function ArrayToXml($data)
|
||||
{
|
||||
$xml = '<xml>';
|
||||
foreach($data as $k=>$v)
|
||||
{
|
||||
$xml .= '<'.$k.'>'.$v.'</'.$k.'>';
|
||||
}
|
||||
$xml .= '</xml>';
|
||||
return $xml;
|
||||
}
|
||||
|
||||
/**
|
||||
* xml转数组
|
||||
* @author Devil
|
||||
|
|
|
|||
|
|
@ -240,27 +240,21 @@ Page({
|
|||
package: res.data.data.data.package,
|
||||
signType: res.data.data.data.signType,
|
||||
paySign: res.data.data.data.paySign,
|
||||
success: res => {
|
||||
console.log(res);
|
||||
success: function(res) {
|
||||
// 数据设置
|
||||
// if (res.resultCode == 9000) {
|
||||
// var temp_data_list = this.data.data_list;
|
||||
// temp_data_list[index]['status'] = 2;
|
||||
// temp_data_list[index]['status_name'] = '待发货';
|
||||
// this.setData({ data_list: temp_data_list });
|
||||
// }
|
||||
var temp_data_list = this.data.data_list;
|
||||
temp_data_list[index]['status'] = 2;
|
||||
temp_data_list[index]['status_name'] = '待发货';
|
||||
this.setData({ data_list: temp_data_list });
|
||||
|
||||
// // 跳转支付页面
|
||||
// wx.navigateTo({
|
||||
// url:
|
||||
// "/pages/paytips/paytips?code=" +
|
||||
// res.resultCode +
|
||||
// "&total_price=" +
|
||||
// this.data.data_list[index]['total_price']
|
||||
// });
|
||||
// 跳转支付页面
|
||||
wx.navigateTo({
|
||||
url: "/pages/paytips/paytips?code=9000&total_price=" +
|
||||
this.data.data_list[index]['total_price']
|
||||
});
|
||||
},
|
||||
fail: res => {
|
||||
app.showToast("唤起支付模块失败");
|
||||
fail: function (res) {
|
||||
app.showToast('支付失败');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<!-- 导航 -->
|
||||
<view class="nav">
|
||||
<block wx:for="{{nav_status_list}}">
|
||||
<block wx:for="{{nav_status_list}}" wx:key="key">
|
||||
<view wx:if="{{nav_status_index == index}}" class="item fl tc cr-main" data-index="{{index}}" bindtap="nav_event">{{item.name}}</view>
|
||||
<view wx:else class="item fl tc" data-index="{{index}}" bindtap="nav_event">{{item.name}}</view>
|
||||
</block>
|
||||
|
|
@ -58,7 +58,7 @@
|
|||
<!-- 支付方式 popup -->
|
||||
<component-popup prop-show="{{is_show_payment_popup}}" prop-position="bottom" bindonclose="payment_popup_event_close">
|
||||
<view wx:if="{{payment_list.length > 0}}" class="payment-list oh bg-white">
|
||||
<view class="item tc fl" wx:for="{{payment_list}}">
|
||||
<view class="item tc fl" wx:for="{{payment_list}}" wx:key="key">
|
||||
<view class="item-content br" data-value="{{item.id}}" bindtap="popup_payment_event">
|
||||
<image wx:if="{{(item.logo || null) != null}}" class="icon" src="{{item.logo}}" mode="widthFix" />
|
||||
<text>{{item.name}}
|
||||
|
|
|
|||
Loading…
Reference in New Issue