2
0
mirror of https://github.com/ctrlcvs/xiaoyao-cvs-plugin.git synced 2024-12-23 03:20:52 +08:00

更正#原神充值 由于mhy的充值版本修改了,目前无法支持微信

This commit is contained in:
ctrlcvs 2023-05-28 23:53:57 +08:00
parent dbf31e44de
commit 9ab7a3f5dd
2 changed files with 5 additions and 3 deletions

View File

@ -162,7 +162,7 @@ export default class mysTopLogin {
this.e.reply(this.sendMsgPay) this.e.reply(this.sendMsgPay)
return true; return true;
} }
let iswx = msg[0].includes('微信') ? 'weixin' : 'alipay' let iswx = msg[0].includes('微信') ? 'wechatpay' : 'alipay'
if (msg[1].length != 1) { if (msg[1].length != 1) {
this.e.reply(this.sendMsgPay) this.e.reply(this.sendMsgPay)
return true; return true;
@ -178,7 +178,7 @@ export default class mysTopLogin {
return true return true
} }
let ckData = await utils.getCookieMap(this.e.cookie) let ckData = await utils.getCookieMap(this.e.cookie)
let device_id = utils.randomString(4) let device_id = utils.randomString(16)
let region = utils.getServer(this.e.uid) let region = utils.getServer(this.e.uid)
let order = { let order = {
"account": ckData?.get('ltuid') || ckData?.get('account_id'), "account": ckData?.get('ltuid') || ckData?.get('account_id'),
@ -202,7 +202,9 @@ export default class mysTopLogin {
order["pay_type"] = iswx order["pay_type"] = iswx
order["pay_vendor"] = iswx order["pay_vendor"] = iswx
} }
console.log(order)
let res = await this.user.getData('createOrder', { order, headers: { "x-rpc-device_id": device_id } }) let res = await this.user.getData('createOrder', { order, headers: { "x-rpc-device_id": device_id } })
console.log(res)
if (!res) return false; if (!res) return false;
if (res?.code != 200 && res?.retcode != 0) { if (res?.code != 200 && res?.retcode != 0) {
this.e.reply('生成充值订单失败:' + res.message) this.e.reply('生成充值订单失败:' + res.message)

View File

@ -302,7 +302,7 @@ export default class miHoYoApi {
createOrder:{ createOrder:{
url:`${mys.hk4_sdk}/hk4e_cn/mdk/atropos/api/createOrder`, url:`${mys.hk4_sdk}/hk4e_cn/mdk/atropos/api/createOrder`,
body: { body: {
// "special_info": "topup_center", "special_info": "topup_center",
"order": data.order, "order": data.order,
"sign": this.gen_sign(data.order) "sign": this.gen_sign(data.order)
}, },