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

@@ -176,6 +176,18 @@ impl From<module_runtime::RuntimeProfileRechargeOrderCreateInput>
}
}
impl From<module_runtime::RuntimeProfileRechargeOrderPaidInput>
for RuntimeProfileRechargeOrderPaidInput
{
fn from(input: module_runtime::RuntimeProfileRechargeOrderPaidInput) -> Self {
Self {
order_id: input.order_id,
paid_at_micros: input.paid_at_micros,
provider_transaction_id: input.provider_transaction_id,
}
}
}
impl From<module_runtime::RuntimeProfileFeedbackSubmissionInput>
for RuntimeProfileFeedbackSubmissionInput
{
@@ -2217,6 +2229,7 @@ pub(crate) fn map_runtime_profile_recharge_order_snapshot(
status: map_runtime_profile_recharge_order_status_back(snapshot.status),
payment_channel: snapshot.payment_channel,
paid_at_micros: snapshot.paid_at_micros,
provider_transaction_id: snapshot.provider_transaction_id,
created_at_micros: snapshot.created_at_micros,
points_delta: snapshot.points_delta,
membership_expires_at_micros: snapshot.membership_expires_at_micros,
@@ -5026,9 +5039,21 @@ pub(crate) fn map_runtime_profile_recharge_order_status_back(
value: crate::module_bindings::RuntimeProfileRechargeOrderStatus,
) -> module_runtime::RuntimeProfileRechargeOrderStatus {
match value {
crate::module_bindings::RuntimeProfileRechargeOrderStatus::Pending => {
module_runtime::RuntimeProfileRechargeOrderStatus::Pending
}
crate::module_bindings::RuntimeProfileRechargeOrderStatus::Paid => {
module_runtime::RuntimeProfileRechargeOrderStatus::Paid
}
crate::module_bindings::RuntimeProfileRechargeOrderStatus::Failed => {
module_runtime::RuntimeProfileRechargeOrderStatus::Failed
}
crate::module_bindings::RuntimeProfileRechargeOrderStatus::Closed => {
module_runtime::RuntimeProfileRechargeOrderStatus::Closed
}
crate::module_bindings::RuntimeProfileRechargeOrderStatus::Refunded => {
module_runtime::RuntimeProfileRechargeOrderStatus::Refunded
}
}
}