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

@@ -268,6 +268,42 @@ impl SpacetimeClient {
.await
}
pub async fn mark_profile_recharge_order_paid(
&self,
order_id: String,
paid_at_micros: i64,
provider_transaction_id: Option<String>,
) -> Result<
(
RuntimeProfileRechargeCenterRecord,
RuntimeProfileRechargeOrderRecord,
),
SpacetimeClientError,
> {
let procedure_input = module_runtime::build_runtime_profile_recharge_order_paid_input(
order_id,
paid_at_micros,
provider_transaction_id,
)
.map_err(SpacetimeClientError::validation_failed)?
.into();
self.call_after_connect(move |connection, sender| {
connection
.procedures()
.mark_profile_recharge_order_paid_and_return_then(
procedure_input,
move |_, result| {
let mapped = result
.map_err(SpacetimeClientError::from_sdk_error)
.and_then(map_runtime_profile_recharge_order_procedure_result);
send_once(&sender, mapped);
},
);
})
.await
}
pub async fn submit_profile_feedback(
&self,
user_id: String,