pay debug
parent
47e43ad861
commit
3ec94ee379
|
|
@ -172,26 +172,6 @@ class WeixinMini
|
||||||
return DataReturn($msg, -1);
|
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
|
* @author Devil
|
||||||
|
|
@ -232,7 +212,10 @@ class WeixinMini
|
||||||
*/
|
*/
|
||||||
public function Respond($params = [])
|
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);
|
return DataReturn('test', -100);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -256,6 +239,26 @@ class WeixinMini
|
||||||
return strtoupper(md5($sign.'key='.$this->config['key']));
|
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转数组
|
* xml转数组
|
||||||
* @author Devil
|
* @author Devil
|
||||||
|
|
|
||||||
|
|
@ -240,27 +240,21 @@ Page({
|
||||||
package: res.data.data.data.package,
|
package: res.data.data.data.package,
|
||||||
signType: res.data.data.data.signType,
|
signType: res.data.data.data.signType,
|
||||||
paySign: res.data.data.data.paySign,
|
paySign: res.data.data.data.paySign,
|
||||||
success: res => {
|
success: function(res) {
|
||||||
console.log(res);
|
|
||||||
// 数据设置
|
// 数据设置
|
||||||
// if (res.resultCode == 9000) {
|
var temp_data_list = this.data.data_list;
|
||||||
// var temp_data_list = this.data.data_list;
|
temp_data_list[index]['status'] = 2;
|
||||||
// temp_data_list[index]['status'] = 2;
|
temp_data_list[index]['status_name'] = '待发货';
|
||||||
// temp_data_list[index]['status_name'] = '待发货';
|
this.setData({ data_list: temp_data_list });
|
||||||
// this.setData({ data_list: temp_data_list });
|
|
||||||
// }
|
|
||||||
|
|
||||||
// // 跳转支付页面
|
// 跳转支付页面
|
||||||
// wx.navigateTo({
|
wx.navigateTo({
|
||||||
// url:
|
url: "/pages/paytips/paytips?code=9000&total_price=" +
|
||||||
// "/pages/paytips/paytips?code=" +
|
this.data.data_list[index]['total_price']
|
||||||
// res.resultCode +
|
});
|
||||||
// "&total_price=" +
|
|
||||||
// this.data.data_list[index]['total_price']
|
|
||||||
// });
|
|
||||||
},
|
},
|
||||||
fail: res => {
|
fail: function (res) {
|
||||||
app.showToast("唤起支付模块失败");
|
app.showToast('支付失败');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<!-- 导航 -->
|
<!-- 导航 -->
|
||||||
<view class="nav">
|
<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: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>
|
<view wx:else class="item fl tc" data-index="{{index}}" bindtap="nav_event">{{item.name}}</view>
|
||||||
</block>
|
</block>
|
||||||
|
|
@ -58,7 +58,7 @@
|
||||||
<!-- 支付方式 popup -->
|
<!-- 支付方式 popup -->
|
||||||
<component-popup prop-show="{{is_show_payment_popup}}" prop-position="bottom" bindonclose="payment_popup_event_close">
|
<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 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">
|
<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" />
|
<image wx:if="{{(item.logo || null) != null}}" class="icon" src="{{item.logo}}" mode="widthFix" />
|
||||||
<text>{{item.name}}
|
<text>{{item.name}}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue