Merge remote-tracking branch 'origin/master' into feat/pricing-plan
Project CI / Backend tests (pull_request) Failing after 1m51s
Project CI / AI game creator shell Rust crates (pull_request) Successful in 3m10s
Project CI / Frontend tests (pull_request) Failing after 1m31s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 4m59s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 5m50s
Project CI / AI game creator shell web tests (pull_request) Successful in 2m38s
Project CI / Repository checks (pull_request) Failing after 4m27s
Project CI / Native shell tests (pull_request) Successful in 7m43s
Project CI / Backend tests (pull_request) Failing after 1m51s
Project CI / AI game creator shell Rust crates (pull_request) Successful in 3m10s
Project CI / Frontend tests (pull_request) Failing after 1m31s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 4m59s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 5m50s
Project CI / AI game creator shell web tests (pull_request) Successful in 2m38s
Project CI / Repository checks (pull_request) Failing after 4m27s
Project CI / Native shell tests (pull_request) Successful in 7m43s
# Conflicts: # docs/project-memory/shared-memory/decision-log.md # server-rs/crates/module-runtime/src/lib.rs
This commit is contained in:
@@ -9,6 +9,8 @@ const APP_TITLE_BY_SELECTION_STAGE: Record<SelectionStage, string> = {
|
||||
'creation-home': APP_HOME_TITLE,
|
||||
project: '项目 - 陶泥儿',
|
||||
profile: '我的 - 陶泥儿',
|
||||
'profile-payment': '支付服务 - 陶泥儿',
|
||||
'payment-checkout': '扫码支付 - 陶泥儿',
|
||||
'image-editor': '美术编辑器 - 陶泥儿',
|
||||
games: '游戏 - 陶泥儿',
|
||||
'game-detail': '游戏详情 - 陶泥儿',
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
import type { PaymentOrderCreateResponse } from '../../../packages/shared/src/contracts/payment';
|
||||
import { requestJson } from '../apiClient';
|
||||
|
||||
export function getPublicPaymentCheckout(checkoutToken: string) {
|
||||
return requestJson<PaymentOrderCreateResponse>(
|
||||
`/api/payment/checkout/${encodeURIComponent(checkoutToken)}`,
|
||||
{ method: 'GET' },
|
||||
'读取支付订单失败',
|
||||
{ skipAuth: true, skipRefresh: true },
|
||||
);
|
||||
}
|
||||
@@ -1,3 +1,9 @@
|
||||
import type {
|
||||
PaymentApiKey,
|
||||
PaymentApp,
|
||||
PaymentAppCreateResponse,
|
||||
PaymentAppListResponse,
|
||||
} from '../../../packages/shared/src/contracts/payment';
|
||||
import type {
|
||||
ConfirmWechatProfileRechargeOrderResponse,
|
||||
CreateProfileRechargeOrderResponse,
|
||||
@@ -142,6 +148,63 @@ export function revokePlatformProfileExternalApiKey(
|
||||
);
|
||||
}
|
||||
|
||||
export function listPlatformProfilePaymentApps(
|
||||
options: PlatformProfileRequestOptions = {},
|
||||
) {
|
||||
return requestPlatformProfileJson<PaymentAppListResponse>(
|
||||
'/payment/apps',
|
||||
{ method: 'GET' },
|
||||
'读取支付服务失败',
|
||||
options,
|
||||
);
|
||||
}
|
||||
|
||||
export function createPlatformProfilePaymentApp(
|
||||
name: string,
|
||||
callbackUrl: string | null,
|
||||
options: PlatformProfileRequestOptions = {},
|
||||
) {
|
||||
return requestPlatformProfileJson<PaymentAppCreateResponse>(
|
||||
'/payment/apps',
|
||||
{
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ name, callbackUrl }),
|
||||
},
|
||||
'创建支付应用失败',
|
||||
options,
|
||||
);
|
||||
}
|
||||
|
||||
export function updatePlatformProfilePaymentApp(
|
||||
appId: string,
|
||||
enabled: boolean,
|
||||
options: PlatformProfileRequestOptions = {},
|
||||
) {
|
||||
return requestPlatformProfileJson<PaymentApp>(
|
||||
`/payment/apps/${encodeURIComponent(appId)}`,
|
||||
{
|
||||
method: 'PATCH',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ enabled }),
|
||||
},
|
||||
'更新支付应用失败',
|
||||
options,
|
||||
);
|
||||
}
|
||||
|
||||
export function revokePlatformProfilePaymentApiKey(
|
||||
keyId: string,
|
||||
options: PlatformProfileRequestOptions = {},
|
||||
) {
|
||||
return requestPlatformProfileJson<PaymentApiKey>(
|
||||
`/payment/keys/${encodeURIComponent(keyId)}`,
|
||||
{ method: 'DELETE' },
|
||||
'撤销支付 API Key 失败',
|
||||
options,
|
||||
);
|
||||
}
|
||||
|
||||
export function getPlatformProfileRechargeCenter(
|
||||
options: PlatformProfileRequestOptions = {},
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user