The open source coding agent.
TypeScript
go: upi pay
Frank9fafa5756282
diff --git a/packages/console/app/src/component/icon.tsx b/packages/console/app/src/component/icon.tsxindex e39da4a0efd..fc50b489b99 100644--- a/packages/console/app/src/component/icon.tsx+++ b/packages/console/app/src/component/icon.tsx@@ -76,6 +76,14 @@ export function IconAlipay(props: JSX.SvgSVGAttributes<SVGSVGElement>) {)}+export function IconWechat(props: JSX.SvgSVGAttributes<SVGSVGElement>) {+ return (+ <svg {...props} viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg">+ <path d="M9.27099 14.6689C8.9532 14.8312 8.56403 14.7122 8.39132 14.4L8.3477 14.3054L6.53019 10.3069C6.52269 10.2588 6.52269 10.2097 6.53019 10.1615C6.53017 10.0735 6.56564 9.98916 6.62857 9.9276C6.6915 9.86603 6.7766 9.83243 6.86462 9.83438C6.93567 9.83269 7.00508 9.85582 7.06091 9.89981L9.24191 11.4265C9.40329 11.5346 9.59293 11.5928 9.78716 11.5937C9.90424 11.5945 10.0203 11.5723 10.1289 11.5283L20.176 7.02816C18.091 4.72544 15.1103 3.43931 12.0045 3.5022C6.4793 3.5022 2.00098 7.23172 2.00098 11.87C2.06681 14.4052 3.35646 16.7515 5.4615 18.1658C5.6878 18.3326 5.78402 18.6241 5.70141 18.8928L5.25067 20.594C5.22336 20.6714 5.20625 20.7521 5.19978 20.8339C5.19777 20.9232 5.23236 21.0094 5.29552 21.0726C5.35868 21.1358 5.44491 21.1703 5.5342 21.1684C5.60098 21.1645 5.66583 21.1445 5.72322 21.1102L7.90423 19.8452C8.06383 19.7467 8.2474 19.6939 8.43494 19.6925C8.53352 19.6923 8.63157 19.707 8.72574 19.7361C9.78781 20.0363 10.8863 20.188 11.99 20.1869C17.5152 20.1869 22.001 16.4574 22.001 11.8554C22.0108 10.4834 21.6301 9.13687 20.903 7.97326L9.35096 14.6253L9.27099 14.6689Z" />+ </svg>+ )+}+export function IconChevron(props: JSX.SvgSVGAttributes<SVGSVGElement>) {return (<svg {...props} width="8" height="6" viewBox="0 0 8 6" fill="none" xmlns="http://www.w3.org/2000/svg">diff --git a/packages/console/app/src/i18n/ar.ts b/packages/console/app/src/i18n/ar.tsindex 74a08dfa251..b59315aef11 100644--- a/packages/console/app/src/i18n/ar.ts+++ b/packages/console/app/src/i18n/ar.ts@@ -541,6 +541,7 @@ export const dict = {"workspace.billing.addAction": "إضافة","workspace.billing.addBalance": "إضافة رصيد","workspace.billing.alipay": "Alipay",+ "workspace.billing.wechat": "WeChat Pay","workspace.billing.linkedToStripe": "مرتبط بـ Stripe","workspace.billing.manage": "إدارة","workspace.billing.enable": "تمكين الفوترة",diff --git a/packages/console/app/src/i18n/br.ts b/packages/console/app/src/i18n/br.tsindex b0ef0983d68..a18f3e4011e 100644--- a/packages/console/app/src/i18n/br.ts+++ b/packages/console/app/src/i18n/br.ts@@ -550,6 +550,7 @@ export const dict = {"workspace.billing.addAction": "Adicionar","workspace.billing.addBalance": "Adicionar Saldo","workspace.billing.alipay": "Alipay",+ "workspace.billing.wechat": "WeChat Pay","workspace.billing.linkedToStripe": "Vinculado ao Stripe","workspace.billing.manage": "Gerenciar","workspace.billing.enable": "Ativar Faturamento",diff --git a/packages/console/app/src/i18n/da.ts b/packages/console/app/src/i18n/da.tsindex 45784969ffb..ca3231648cd 100644--- a/packages/console/app/src/i18n/da.ts+++ b/packages/console/app/src/i18n/da.ts@@ -546,6 +546,7 @@ export const dict = {"workspace.billing.addAction": "Tilføj","workspace.billing.addBalance": "Tilføj saldo","workspace.billing.alipay": "Alipay",+ "workspace.billing.wechat": "WeChat Pay","workspace.billing.linkedToStripe": "Forbundet til Stripe","workspace.billing.manage": "Administrer","workspace.billing.enable": "Aktiver fakturering",diff --git a/packages/console/app/src/i18n/de.ts b/packages/console/app/src/i18n/de.tsindex d14ec8de5b9..d7ed88e361a 100644--- a/packages/console/app/src/i18n/de.ts+++ b/packages/console/app/src/i18n/de.ts@@ -549,6 +549,7 @@ export const dict = {"workspace.billing.addAction": "Hinzufügen","workspace.billing.addBalance": "Guthaben aufladen","workspace.billing.alipay": "Alipay",+ "workspace.billing.wechat": "WeChat Pay","workspace.billing.linkedToStripe": "Mit Stripe verbunden","workspace.billing.manage": "Verwalten","workspace.billing.enable": "Abrechnung aktivieren",diff --git a/packages/console/app/src/i18n/en.ts b/packages/console/app/src/i18n/en.tsindex 1e522d6e012..8b410bb6108 100644--- a/packages/console/app/src/i18n/en.ts+++ b/packages/console/app/src/i18n/en.ts@@ -541,6 +541,7 @@ export const dict = {"workspace.billing.addAction": "Add","workspace.billing.addBalance": "Add Balance","workspace.billing.alipay": "Alipay",+ "workspace.billing.wechat": "WeChat Pay","workspace.billing.linkedToStripe": "Linked to Stripe","workspace.billing.manage": "Manage","workspace.billing.enable": "Enable Billing",diff --git a/packages/console/app/src/i18n/es.ts b/packages/console/app/src/i18n/es.tsindex 7992e98a33b..bb466568e11 100644--- a/packages/console/app/src/i18n/es.ts+++ b/packages/console/app/src/i18n/es.ts@@ -550,6 +550,7 @@ export const dict = {"workspace.billing.addAction": "Añadir","workspace.billing.addBalance": "Añadir Saldo","workspace.billing.alipay": "Alipay",+ "workspace.billing.wechat": "WeChat Pay","workspace.billing.linkedToStripe": "Vinculado con Stripe","workspace.billing.manage": "Gestionar","workspace.billing.enable": "Habilitar Facturación",diff --git a/packages/console/app/src/i18n/fr.ts b/packages/console/app/src/i18n/fr.tsindex e5c2b622fc1..8ac20c47c2b 100644--- a/packages/console/app/src/i18n/fr.ts+++ b/packages/console/app/src/i18n/fr.ts@@ -552,6 +552,7 @@ export const dict = {"workspace.billing.addAction": "Ajouter","workspace.billing.addBalance": "Ajouter un solde","workspace.billing.alipay": "Alipay",+ "workspace.billing.wechat": "WeChat Pay","workspace.billing.linkedToStripe": "Lié à Stripe","workspace.billing.manage": "Gérer","workspace.billing.enable": "Activer la facturation",diff --git a/packages/console/app/src/i18n/it.ts b/packages/console/app/src/i18n/it.tsindex baede025d49..bd8e17a5f37 100644--- a/packages/console/app/src/i18n/it.ts+++ b/packages/console/app/src/i18n/it.ts@@ -548,6 +548,7 @@ export const dict = {"workspace.billing.addAction": "Aggiungi","workspace.billing.addBalance": "Aggiungi Saldo","workspace.billing.alipay": "Alipay",+ "workspace.billing.wechat": "WeChat Pay","workspace.billing.linkedToStripe": "Collegato a Stripe","workspace.billing.manage": "Gestisci","workspace.billing.enable": "Abilita Fatturazione",diff --git a/packages/console/app/src/i18n/ja.ts b/packages/console/app/src/i18n/ja.tsindex 304233c04e3..e1979041cdd 100644--- a/packages/console/app/src/i18n/ja.ts+++ b/packages/console/app/src/i18n/ja.ts@@ -547,6 +547,7 @@ export const dict = {"workspace.billing.addAction": "追加","workspace.billing.addBalance": "残高を追加","workspace.billing.alipay": "Alipay",+ "workspace.billing.wechat": "WeChat Pay","workspace.billing.linkedToStripe": "Stripeと連携済み","workspace.billing.manage": "管理","workspace.billing.enable": "課金を有効にする",diff --git a/packages/console/app/src/i18n/ko.ts b/packages/console/app/src/i18n/ko.tsindex 3ba155341c1..bf90e9c4e8b 100644--- a/packages/console/app/src/i18n/ko.ts+++ b/packages/console/app/src/i18n/ko.ts@@ -541,6 +541,7 @@ export const dict = {"workspace.billing.addAction": "추가","workspace.billing.addBalance": "잔액 추가","workspace.billing.alipay": "Alipay",+ "workspace.billing.wechat": "WeChat Pay","workspace.billing.linkedToStripe": "Stripe에 연결됨","workspace.billing.manage": "관리","workspace.billing.enable": "결제 활성화",diff --git a/packages/console/app/src/i18n/no.ts b/packages/console/app/src/i18n/no.tsindex 45904ab7b68..0aef49f0d85 100644--- a/packages/console/app/src/i18n/no.ts+++ b/packages/console/app/src/i18n/no.ts@@ -547,6 +547,7 @@ export const dict = {"workspace.billing.addAction": "Legg til","workspace.billing.addBalance": "Legg til saldo","workspace.billing.alipay": "Alipay",+ "workspace.billing.wechat": "WeChat Pay","workspace.billing.linkedToStripe": "Koblet til Stripe","workspace.billing.manage": "Administrer","workspace.billing.enable": "Aktiver fakturering",diff --git a/packages/console/app/src/i18n/pl.ts b/packages/console/app/src/i18n/pl.tsindex 78ad69aeea7..19aa503df5b 100644--- a/packages/console/app/src/i18n/pl.ts+++ b/packages/console/app/src/i18n/pl.ts@@ -548,6 +548,7 @@ export const dict = {"workspace.billing.addAction": "Dodaj","workspace.billing.addBalance": "Doładuj saldo","workspace.billing.alipay": "Alipay",+ "workspace.billing.wechat": "WeChat Pay","workspace.billing.linkedToStripe": "Połączono ze Stripe","workspace.billing.manage": "Zarządzaj","workspace.billing.enable": "Włącz rozliczenia",diff --git a/packages/console/app/src/i18n/ru.ts b/packages/console/app/src/i18n/ru.tsindex b63b5d1b1e4..e5dee8303ad 100644--- a/packages/console/app/src/i18n/ru.ts+++ b/packages/console/app/src/i18n/ru.ts@@ -554,6 +554,7 @@ export const dict = {"workspace.billing.addAction": "Пополнить","workspace.billing.addBalance": "Пополнить баланс","workspace.billing.alipay": "Alipay",+ "workspace.billing.wechat": "WeChat Pay","workspace.billing.linkedToStripe": "Привязано к Stripe","workspace.billing.manage": "Управление","workspace.billing.enable": "Включить оплату",diff --git a/packages/console/app/src/i18n/th.ts b/packages/console/app/src/i18n/th.tsindex b6e29ba0226..c765a181337 100644--- a/packages/console/app/src/i18n/th.ts+++ b/packages/console/app/src/i18n/th.ts@@ -543,6 +543,7 @@ export const dict = {"workspace.billing.addAction": "เพิ่ม","workspace.billing.addBalance": "เพิ่มยอดคงเหลือ","workspace.billing.alipay": "Alipay",+ "workspace.billing.wechat": "WeChat Pay","workspace.billing.linkedToStripe": "เชื่อมโยงกับ Stripe","workspace.billing.manage": "จัดการ","workspace.billing.enable": "เปิดใช้งานการเรียกเก็บเงิน",diff --git a/packages/console/app/src/i18n/tr.ts b/packages/console/app/src/i18n/tr.tsindex e2e5c4985c1..561153755b6 100644--- a/packages/console/app/src/i18n/tr.ts+++ b/packages/console/app/src/i18n/tr.ts@@ -550,6 +550,7 @@ export const dict = {"workspace.billing.addAction": "Ekle","workspace.billing.addBalance": "Bakiye Ekle","workspace.billing.alipay": "Alipay",+ "workspace.billing.wechat": "WeChat Pay","workspace.billing.linkedToStripe": "Stripe'a bağlı","workspace.billing.manage": "Yönet","workspace.billing.enable": "Faturalandırmayı Etkinleştir",diff --git a/packages/console/app/src/i18n/zh.ts b/packages/console/app/src/i18n/zh.tsindex f75d5531974..1a5fb0ff20e 100644--- a/packages/console/app/src/i18n/zh.ts+++ b/packages/console/app/src/i18n/zh.ts@@ -524,6 +524,7 @@ export const dict = {"workspace.billing.addAction": "充值","workspace.billing.addBalance": "充值余额","workspace.billing.alipay": "支付宝",+ "workspace.billing.wechat": "微信支付","workspace.billing.linkedToStripe": "已关联 Stripe","workspace.billing.manage": "管理","workspace.billing.enable": "启用计费",diff --git a/packages/console/app/src/i18n/zht.ts b/packages/console/app/src/i18n/zht.tsindex 3919a9d7394..44f3ebee005 100644--- a/packages/console/app/src/i18n/zht.ts+++ b/packages/console/app/src/i18n/zht.ts@@ -524,6 +524,7 @@ export const dict = {"workspace.billing.addAction": "儲值","workspace.billing.addBalance": "儲值餘額","workspace.billing.alipay": "支付寶",+ "workspace.billing.wechat": "微信支付","workspace.billing.linkedToStripe": "已連結 Stripe","workspace.billing.manage": "管理","workspace.billing.enable": "啟用帳務",diff --git a/packages/console/app/src/routes/workspace/[id]/billing/billing-section.tsx b/packages/console/app/src/routes/workspace/[id]/billing/billing-section.tsxindex d966f38d3de..50e30585bda 100644--- a/packages/console/app/src/routes/workspace/[id]/billing/billing-section.tsx+++ b/packages/console/app/src/routes/workspace/[id]/billing/billing-section.tsx@@ -3,7 +3,7 @@ import { createMemo, Match, Show, Switch, createEffect } from "solid-js"import { createStore } from "solid-js/store"import { Billing } from "@opencode-ai/console-core/billing.js"import { withActor } from "~/context/auth.withActor"-import { IconAlipay, IconCreditCard, IconStripe } from "~/component/icon"+import { IconAlipay, IconCreditCard, IconStripe, IconWechat } from "~/component/icon"import styles from "./billing-section.module.css"import { createCheckoutUrl, formatBalance, queryBillingInfo } from "../../common"import { useI18n } from "~/context/i18n"@@ -208,6 +208,9 @@ export function BillingSection() {<Match when={billingInfo()?.paymentMethodType === "alipay"}><IconAlipay style={{ width: "24px", height: "24px" }} /></Match>+ <Match when={billingInfo()?.paymentMethodType === "wechat_pay"}>+ <IconWechat style={{ width: "24px", height: "24px" }} />+ </Match></Switch></div><div data-slot="card-details">@@ -224,6 +227,9 @@ export function BillingSection() {<Match when={billingInfo()?.paymentMethodType === "alipay"}><span data-slot="type">{i18n.t("workspace.billing.alipay")}</span></Match>+ <Match when={billingInfo()?.paymentMethodType === "wechat_pay"}>+ <span data-slot="type">{i18n.t("workspace.billing.wechat")}</span>+ </Match></Switch></div><buttondiff --git a/packages/console/core/src/billing.ts b/packages/console/core/src/billing.tsindex cbb3f2d74e5..ee41652ef23 100644--- a/packages/console/core/src/billing.ts+++ b/packages/console/core/src/billing.ts@@ -213,12 +213,10 @@ export namespace Billing {enabled: true,},payment_method_options: {- alipay: {},card: {setup_future_usage: "on_session",},},- payment_method_types: ["card", "alipay"],//payment_method_data: {// allow_redisplay: "always",//},@@ -269,7 +267,6 @@ export namespace Billing {customer_email: email!,}),currency: "usd",- payment_method_types: ["card", "alipay"],tax_id_collection: {enabled: true,},