refactor(payment): 支付插件 - 宿主仅通过 RPC 包加载并保护订单版本

This commit is contained in:
ddCat
2026-09-02 16:15:57 +08:00
parent d6bbdbe27b
commit 38e715ea3f
45 changed files with 1584 additions and 203 deletions

View File

@@ -0,0 +1,16 @@
package main
import (
"net/http"
"os"
"time"
paymentplugins "infinite-canvas/backend/payment-plugins"
)
func main() {
provider := paymentplugins.NewAlipayProvider(&http.Client{Timeout: 25 * time.Second})
if err := paymentplugins.RunRPC(provider, os.Stdin, os.Stdout); err != nil {
os.Exit(1)
}
}

View File

@@ -0,0 +1,16 @@
package main
import (
"net/http"
"os"
"time"
paymentplugins "infinite-canvas/backend/payment-plugins"
)
func main() {
provider := paymentplugins.NewWeChatProvider(&http.Client{Timeout: 25 * time.Second}, "https://api.mch.weixin.qq.com")
if err := paymentplugins.RunRPC(provider, os.Stdin, os.Stdout); err != nil {
os.Exit(1)
}
}