feat(payment): 移植扫呗普通支付2.0

This commit is contained in:
yml
2026-11-16 23:40:23 +08:00
parent 1c47139bf0
commit d9e781ac68
24 changed files with 1228 additions and 62 deletions
@@ -97,7 +97,7 @@ func (r *Repository) confirmPaid(ctx context.Context, payment *model.PaymentOrde
}
updates := map[string]any{
"status": "paid",
"provider_order_id": firstNonEmpty(raw["provider_order_id"], raw["schc_order_id"], raw["leshua_order_id"], raw["pay_order_no"], raw["trade_no"], latest.ProviderOrderID),
"provider_order_id": firstNonEmpty(raw["provider_order_id"], raw["out_trade_no"], raw["schc_order_id"], raw["leshua_order_id"], raw["pay_order_no"], raw["trade_no"], latest.ProviderOrderID),
"raw_response": jsonMap(withRawSource(raw, source)),
"paid_at": paidAt,
}