合并最新 master 到作品管理分支
Project CI / Backend tests (pull_request) Failing after 39s
Project CI / AI game creator shell Rust crates (pull_request) Successful in 2m44s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Failing after 3m43s
Project CI / Repository checks (pull_request) Failing after 40s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 5m52s
Project CI / Frontend tests (pull_request) Successful in 3m17s
Project CI / AI game creator shell web tests (pull_request) Successful in 3m12s
Project CI / Native shell tests (pull_request) Successful in 6m41s
Project CI / Backend tests (pull_request) Failing after 39s
Project CI / AI game creator shell Rust crates (pull_request) Successful in 2m44s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Failing after 3m43s
Project CI / Repository checks (pull_request) Failing after 40s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 5m52s
Project CI / Frontend tests (pull_request) Successful in 3m17s
Project CI / AI game creator shell web tests (pull_request) Successful in 3m12s
Project CI / Native shell tests (pull_request) Successful in 6m41s
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,
|
||||
@@ -140,6 +146,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