|
@@ -47,9 +47,8 @@ where
|
|
impl crate::Verify for PubReqHead {
|
|
impl crate::Verify for PubReqHead {
|
|
#[tracing::instrument(skip_all, fields(PubReqHead=?self))]
|
|
#[tracing::instrument(skip_all, fields(PubReqHead=?self))]
|
|
fn verify(&self, config: &Config) -> anyhow::Result<()> {
|
|
fn verify(&self, config: &Config) -> anyhow::Result<()> {
|
|
- if self.sign_type != "md5"
|
|
|
|
- || self.app_id != config.sd_config.app_id
|
|
|
|
- || self.method != "sd.tovc.recharge"
|
|
|
|
|
|
+ if self.sign_type != "md5" || self.app_id != config.sd_config.app_id
|
|
|
|
+ // || self.method != "sd.tovc.recharge"
|
|
{
|
|
{
|
|
return Err(anyhow::Error::msg("PubReqHead Verify Value Error"));
|
|
return Err(anyhow::Error::msg("PubReqHead Verify Value Error"));
|
|
}
|
|
}
|
|
@@ -478,13 +477,18 @@ impl crate::Verify for SearchReqBody {}
|
|
pub struct SearchRespData {
|
|
pub struct SearchRespData {
|
|
state: String,
|
|
state: String,
|
|
message: String,
|
|
message: String,
|
|
|
|
+ #[serde(skip_serializing_if = "Option::is_none")]
|
|
success_time: Option<String>,
|
|
success_time: Option<String>,
|
|
order_id: String,
|
|
order_id: String,
|
|
sp_order_id: String,
|
|
sp_order_id: String,
|
|
game_user_id: String,
|
|
game_user_id: String,
|
|
|
|
+ #[serde(skip_serializing_if = "Option::is_none")]
|
|
operator_order: Option<String>,
|
|
operator_order: Option<String>,
|
|
- card_no: Option<String>, // 卡密
|
|
|
|
- card_pwd: Option<String>, // 卡密
|
|
|
|
|
|
+ #[serde(skip_serializing_if = "Option::is_none")]
|
|
|
|
+ card_no: Option<String>, // 卡密
|
|
|
|
+ #[serde(skip_serializing_if = "Option::is_none")]
|
|
|
|
+ card_pwd: Option<String>, // 卡密
|
|
|
|
+ #[serde(skip_serializing_if = "Option::is_none")]
|
|
effective_time: Option<String>, // 卡密
|
|
effective_time: Option<String>, // 卡密
|
|
}
|
|
}
|
|
|
|
|
|
@@ -505,9 +509,9 @@ impl SearchRespBody {
|
|
}
|
|
}
|
|
};
|
|
};
|
|
if resp.rcode != "00" {
|
|
if resp.rcode != "00" {
|
|
- let rcode = if resp.rcode=="06"{
|
|
|
|
|
|
+ let rcode = if ["06", "10"].contains(&resp.rcode.as_str()) {
|
|
"0011"
|
|
"0011"
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
&resp.rcode
|
|
&resp.rcode
|
|
};
|
|
};
|
|
return Self::error(rcode, format!("{:?}", resp.rmsg));
|
|
return Self::error(rcode, format!("{:?}", resp.rmsg));
|