feat: 接入微信小程序支付

This commit is contained in:
2026-05-14 00:16:17 +08:00
parent bf4423e53b
commit ae58a443a3
42 changed files with 2265 additions and 191 deletions

View File

@@ -222,12 +222,23 @@ pub struct ProfileRechargeOrderResponse {
pub amount_cents: u64,
pub status: String,
pub payment_channel: String,
pub paid_at: String,
pub paid_at: Option<String>,
pub provider_transaction_id: Option<String>,
pub created_at: String,
pub points_delta: i64,
pub membership_expires_at: Option<String>,
}
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
#[serde(rename_all = "camelCase")]
pub struct WechatMiniProgramPayParamsResponse {
pub time_stamp: String,
pub nonce_str: String,
pub package: String,
pub sign_type: String,
pub pay_sign: String,
}
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
#[serde(rename_all = "camelCase")]
pub struct ProfileRechargeCenterResponse {
@@ -253,6 +264,8 @@ pub struct CreateProfileRechargeOrderRequest {
pub struct CreateProfileRechargeOrderResponse {
pub order: ProfileRechargeOrderResponse,
pub center: ProfileRechargeCenterResponse,
#[serde(default)]
pub wechat_mini_program_pay_params: Option<WechatMiniProgramPayParamsResponse>,
}
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]