提交 64dd28ef 编写于 作者: D devil

小程序支付0成功错误修复

上级 a32249f4
...@@ -171,7 +171,7 @@ class OrderService ...@@ -171,7 +171,7 @@ class OrderService
// 是否直接跳转 // 是否直接跳转
if($success_count > 0 && $success_count == count($order_data)) if($success_count > 0 && $success_count == count($order_data))
{ {
return DataReturn('支付成功', 0, ['data'=>MyUrl('index/order/respond', ['appoint_status'=>0])]); return DataReturn('支付成功', 0, ['data'=>MyUrl('index/order/respond', ['appoint_status'=>0]), 'is_success'=>1]);
} }
// 支付入口文件检查 // 支付入口文件检查
......
...@@ -37,11 +37,13 @@ return array ( ...@@ -37,11 +37,13 @@ return array (
0 => 'app\\plugins\\ordergoodsform\\Hook', 0 => 'app\\plugins\\ordergoodsform\\Hook',
1 => 'app\\plugins\\membershiplevelvip\\Hook', 1 => 'app\\plugins\\membershiplevelvip\\Hook',
2 => 'app\\plugins\\multilingual\\Hook', 2 => 'app\\plugins\\multilingual\\Hook',
3 => 'app\\plugins\\coupon\\Hook',
), ),
'plugins_js' => 'plugins_js' =>
array ( array (
0 => 'app\\plugins\\ordergoodsform\\Hook', 0 => 'app\\plugins\\ordergoodsform\\Hook',
1 => 'app\\plugins\\multilingual\\Hook', 1 => 'app\\plugins\\multilingual\\Hook',
2 => 'app\\plugins\\coupon\\Hook',
), ),
'plugins_view_goods_detail_base_inventory_top' => 'plugins_view_goods_detail_base_inventory_top' =>
array ( array (
...@@ -67,6 +69,7 @@ return array ( ...@@ -67,6 +69,7 @@ return array (
array ( array (
0 => 'app\\plugins\\membershiplevelvip\\Hook', 0 => 'app\\plugins\\membershiplevelvip\\Hook',
1 => 'app\\plugins\\blog\\Hook', 1 => 'app\\plugins\\blog\\Hook',
2 => 'app\\plugins\\coupon\\Hook',
), ),
'plugins_service_goods_handle_end' => 'plugins_service_goods_handle_end' =>
array ( array (
...@@ -79,6 +82,7 @@ return array ( ...@@ -79,6 +82,7 @@ return array (
'plugins_service_buy_group_goods_handle' => 'plugins_service_buy_group_goods_handle' =>
array ( array (
0 => 'app\\plugins\\membershiplevelvip\\Hook', 0 => 'app\\plugins\\membershiplevelvip\\Hook',
1 => 'app\\plugins\\coupon\\Hook',
), ),
'plugins_service_user_login_success_record' => 'plugins_service_user_login_success_record' =>
array ( array (
...@@ -119,11 +123,13 @@ return array ( ...@@ -119,11 +123,13 @@ return array (
'plugins_service_users_center_left_menu_handle' => 'plugins_service_users_center_left_menu_handle' =>
array ( array (
0 => 'app\\plugins\\membershiplevelvip\\Hook', 0 => 'app\\plugins\\membershiplevelvip\\Hook',
1 => 'app\\plugins\\coupon\\Hook',
), ),
'plugins_service_header_navigation_top_right_handle' => 'plugins_service_header_navigation_top_right_handle' =>
array ( array (
0 => 'app\\plugins\\membershiplevelvip\\Hook', 0 => 'app\\plugins\\membershiplevelvip\\Hook',
1 => 'app\\plugins\\multilingual\\Hook', 1 => 'app\\plugins\\multilingual\\Hook',
2 => 'app\\plugins\\coupon\\Hook',
), ),
'plugins_common_page_bottom' => 'plugins_common_page_bottom' =>
array ( array (
...@@ -145,5 +151,29 @@ return array ( ...@@ -145,5 +151,29 @@ return array (
array ( array (
0 => 'app\\plugins\\multilingual\\Hook', 0 => 'app\\plugins\\multilingual\\Hook',
), ),
'plugins_view_goods_detail_panel_bottom' =>
array (
0 => 'app\\plugins\\coupon\\Hook',
),
'plugins_view_buy_group_goods_inside_bottom' =>
array (
0 => 'app\\plugins\\coupon\\Hook',
),
'plugins_view_buy_form_inside' =>
array (
0 => 'app\\plugins\\coupon\\Hook',
),
'plugins_service_buy_order_insert_success' =>
array (
0 => 'app\\plugins\\coupon\\Hook',
),
'plugins_service_order_status_change_history_success_handle' =>
array (
0 => 'app\\plugins\\coupon\\Hook',
),
'plugins_service_user_register_end' =>
array (
0 => 'app\\plugins\\coupon\\Hook',
),
); );
?> ?>
\ No newline at end of file
...@@ -233,9 +233,7 @@ Page({ ...@@ -233,9 +233,7 @@ Page({
// 支付方法 // 支付方法
pay_handle(order_ids) { pay_handle(order_ids) {
var self = this; var self = this;
// 加载loding
my.showLoading({ content: "请求中..." }); my.showLoading({ content: "请求中..." });
my.request({ my.request({
url: app.get_request_url("pay", "order"), url: app.get_request_url("pay", "order"),
method: "POST", method: "POST",
...@@ -248,6 +246,11 @@ Page({ ...@@ -248,6 +246,11 @@ Page({
success: res => { success: res => {
my.hideLoading(); my.hideLoading();
if (res.data.code == 0) { if (res.data.code == 0) {
// 是否直接支付成功
if((res.data.data.is_success || 0) == 1) {
self.order_item_pay_success_handle(order_ids);
app.showToast('支付成功', 'success');
} else {
// 支付方式类型 // 支付方式类型
switch (res.data.data.is_payment_type) { switch (res.data.data.is_payment_type) {
// 正常线上支付 // 正常线上支付
...@@ -300,6 +303,7 @@ Page({ ...@@ -300,6 +303,7 @@ Page({
default : default :
app.showToast('支付类型有误'); app.showToast('支付类型有误');
} }
}
} else { } else {
app.showToast(res.data.msg); app.showToast(res.data.msg);
} }
......
...@@ -229,9 +229,7 @@ Page({ ...@@ -229,9 +229,7 @@ Page({
// 支付方法 // 支付方法
pay_handle(order_ids) { pay_handle(order_ids) {
var self = this; var self = this;
// 加载loding
swan.showLoading({ title: "请求中..." }); swan.showLoading({ title: "请求中..." });
swan.request({ swan.request({
url: app.get_request_url("pay", "order"), url: app.get_request_url("pay", "order"),
method: "POST", method: "POST",
...@@ -243,6 +241,11 @@ Page({ ...@@ -243,6 +241,11 @@ Page({
success: res => { success: res => {
swan.hideLoading(); swan.hideLoading();
if (res.data.code == 0) { if (res.data.code == 0) {
// 是否直接支付成功
if((res.data.data.is_success || 0) == 1) {
self.order_item_pay_success_handle(order_ids);
app.showToast('支付成功', 'success');
} else {
// 支付方式类型 // 支付方式类型
switch (res.data.data.is_payment_type) { switch (res.data.data.is_payment_type) {
// 正常线上支付 // 正常线上支付
...@@ -288,6 +291,7 @@ Page({ ...@@ -288,6 +291,7 @@ Page({
default: default:
app.showToast('支付类型有误'); app.showToast('支付类型有误');
} }
}
} else { } else {
app.showToast(res.data.msg); app.showToast(res.data.msg);
} }
......
...@@ -232,9 +232,7 @@ Page({ ...@@ -232,9 +232,7 @@ Page({
// 支付方法 // 支付方法
pay_handle(order_ids) { pay_handle(order_ids) {
var self = this; var self = this;
// 加载loding
qq.showLoading({title: "请求中..." }); qq.showLoading({title: "请求中..." });
qq.request({ qq.request({
url: app.get_request_url("pay", "order"), url: app.get_request_url("pay", "order"),
method: "POST", method: "POST",
...@@ -246,6 +244,11 @@ Page({ ...@@ -246,6 +244,11 @@ Page({
success: res => { success: res => {
qq.hideLoading(); qq.hideLoading();
if (res.data.code == 0) { if (res.data.code == 0) {
// 是否直接支付成功
if((res.data.data.is_success || 0) == 1) {
self.order_item_pay_success_handle(order_ids);
app.showToast('支付成功', 'success');
} else {
// 支付方式类型 // 支付方式类型
switch (res.data.data.is_payment_type) { switch (res.data.data.is_payment_type) {
// 正常线上支付 // 正常线上支付
...@@ -308,6 +311,7 @@ Page({ ...@@ -308,6 +311,7 @@ Page({
default : default :
app.showToast('支付类型有误'); app.showToast('支付类型有误');
} }
}
} else { } else {
app.showToast(res.data.msg); app.showToast(res.data.msg);
} }
......
...@@ -241,8 +241,7 @@ Page({ ...@@ -241,8 +241,7 @@ Page({
// 支付方法 // 支付方法
pay_handle(order_ids) { pay_handle(order_ids) {
var self = this; // 加载loding var self = this;
tt.showLoading({ tt.showLoading({
title: "请求中..." title: "请求中..."
}); });
...@@ -256,8 +255,13 @@ Page({ ...@@ -256,8 +255,13 @@ Page({
dataType: "json", dataType: "json",
success: res => { success: res => {
tt.hideLoading(); tt.hideLoading();
if (res.data.code == 0) { if (res.data.code == 0) {
// 是否直接支付成功
if((res.data.data.is_success || 0) == 1)
{
self.order_item_pay_success_handle(order_ids);
app.showToast('支付成功', 'success');
} else {
// 支付方式类型 // 支付方式类型
switch (res.data.data.is_payment_type) { switch (res.data.data.is_payment_type) {
// 正常线上支付 // 正常线上支付
...@@ -323,6 +327,7 @@ Page({ ...@@ -323,6 +327,7 @@ Page({
default: default:
app.showToast('支付类型有误'); app.showToast('支付类型有误');
} }
}
} else { } else {
app.showToast(res.data.msg); app.showToast(res.data.msg);
} }
......
...@@ -73,7 +73,7 @@ App({ ...@@ -73,7 +73,7 @@ App({
// 请求地址 // 请求地址
request_url: "{{request_url}}", request_url: "{{request_url}}",
// request_url: 'http://shopxo.com/', request_url: 'http://shopxo.com/',
// request_url: 'https://dev.shopxo.net/', // request_url: 'https://dev.shopxo.net/',
// 基础信息 // 基础信息
......
...@@ -232,9 +232,7 @@ Page({ ...@@ -232,9 +232,7 @@ Page({
// 支付方法 // 支付方法
pay_handle(order_ids) { pay_handle(order_ids) {
var self = this; var self = this;
// 加载loding
wx.showLoading({title: "请求中..." }); wx.showLoading({title: "请求中..." });
wx.request({ wx.request({
url: app.get_request_url("pay", "order"), url: app.get_request_url("pay", "order"),
method: "POST", method: "POST",
...@@ -246,6 +244,11 @@ Page({ ...@@ -246,6 +244,11 @@ Page({
success: res => { success: res => {
wx.hideLoading(); wx.hideLoading();
if (res.data.code == 0) { if (res.data.code == 0) {
// 是否直接支付成功
if((res.data.data.is_success || 0) == 1) {
self.order_item_pay_success_handle(order_ids);
app.showToast('支付成功', 'success');
} else {
// 支付方式类型 // 支付方式类型
switch (res.data.data.is_payment_type) { switch (res.data.data.is_payment_type) {
// 正常线上支付 // 正常线上支付
...@@ -297,6 +300,7 @@ Page({ ...@@ -297,6 +300,7 @@ Page({
default : default :
app.showToast('支付类型有误'); app.showToast('支付类型有误');
} }
}
} else { } else {
app.showToast(res.data.msg); app.showToast(res.data.msg);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册