Commit 6f2772b3 authored by pengguangpu's avatar pengguangpu

手机端自测支付流程;

parent 53fff867
...@@ -45,7 +45,6 @@ Page({ ...@@ -45,7 +45,6 @@ Page({
this.data.signKey = localAccountInfo.data.store.miyaPayPlatformSignKey; this.data.signKey = localAccountInfo.data.store.miyaPayPlatformSignKey;
this.data.baseUrl = localAccountInfo.data.store.miyaPayPlatformUrl; this.data.baseUrl = localAccountInfo.data.store.miyaPayPlatformUrl;
this.data.apiVersion = localAccountInfo.data.store.miyaPayApiVersion; this.data.apiVersion = localAccountInfo.data.store.miyaPayApiVersion;
console.log('1112')
if (getApp().globalData.useTestPayInfo == true) { if (getApp().globalData.useTestPayInfo == true) {
//just for test //just for test
this.data.signKey = "nbz9ww27sx4ou6dkr61mf63tth3s6e2d"; this.data.signKey = "nbz9ww27sx4ou6dkr61mf63tth3s6e2d";
...@@ -106,7 +105,7 @@ Page({ ...@@ -106,7 +105,7 @@ Page({
version: "1.5", version: "1.5",
orderNo: orderNo, orderNo: orderNo,
token: payCode, token: payCode,
payPrice:miyapay.yuan2Fen(this.data.payPriceYuan), payPrice:miyapay.yuan2Fen(this.data.payPriceYuan) + "",
signKey: this.data.signKey, signKey: this.data.signKey,
callback: (res) => { callback: (res) => {
wx.hideLoading({ wx.hideLoading({
...@@ -134,7 +133,7 @@ Page({ ...@@ -134,7 +133,7 @@ Page({
duration: 2000 duration: 2000
}) })
wx.redirectTo({ wx.redirectTo({
url: '/pages/pay_result/pay_result?payPriceYuan='+this.data.payPriceYuan+"&description=支付成功", url: '/pages/pay_result/pay_result?payPriceYuan='+this.data.payPriceYuan+"&description=支付成功"+"&type=0&isSuccess=true"
}) })
}, },
...@@ -142,7 +141,6 @@ Page({ ...@@ -142,7 +141,6 @@ Page({
* 支付失败 * 支付失败
*/ */
payFail(msg) { payFail(msg) {
if (this.data.show) { if (this.data.show) {
this.setData({ this.setData({
scanPayError: msg scanPayError: msg
...@@ -154,7 +152,9 @@ Page({ ...@@ -154,7 +152,9 @@ Page({
duration: 2000 duration: 2000
}) })
} }
wx.redirectTo({
url: '/pages/pay_result/pay_result?payPriceYuan='+this.data.payPriceYuan+"&description=支付失败"+"&type=0&isSuccess=false&failedReason="+msg
})
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment