@openrails/billing-ui 0.234.0 → 0.236.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +142 -2
- package/README.md +119 -85
- package/dist/account/account-billing.d.ts +6 -5
- package/dist/account/change-card-dialog.d.ts +5 -2
- package/dist/account/payment-methods-panel.d.ts +6 -5
- package/dist/buy-button.d.ts +35 -0
- package/dist/cart.d.ts +18 -0
- package/dist/checkout.d.ts +1 -3
- package/dist/client/checkout.d.ts +28 -0
- package/dist/client/client.d.ts +98 -63
- package/dist/client/errors.d.ts +5 -4
- package/dist/client/generated/error-codes.d.ts +1 -1
- package/dist/client/generated/routes.d.ts +142 -99
- package/dist/client/generated/wire.d.ts +185 -98
- package/dist/client/index.d.ts +2 -2
- package/dist/client/types.d.ts +272 -29
- package/dist/{client-CWX6QpLa.js → client-BuvolBPT.js} +498 -326
- package/dist/client-BuvolBPT.js.map +1 -0
- package/dist/client.js +2 -2
- package/dist/components/stripe-card.d.ts +8 -2
- package/dist/components/stripe-wallets.d.ts +12 -0
- package/dist/components/ui/badge.d.ts +1 -1
- package/dist/components/ui/button.d.ts +1 -1
- package/dist/frame.d.ts +5 -5
- package/dist/hooks-2d-XjpuI.js +526 -0
- package/dist/hooks-2d-XjpuI.js.map +1 -0
- package/dist/i18n/context.d.ts +1 -1
- package/dist/i18n/messages.d.ts +1 -1
- package/dist/index.d.ts +7 -5
- package/dist/index.js +1985 -1667
- package/dist/index.js.map +1 -1
- package/dist/lib/money.d.ts +1 -0
- package/dist/lib/offer-label.d.ts +4 -0
- package/dist/locales/de.js +25 -4
- package/dist/locales/de.js.map +1 -1
- package/dist/locales/en.d.ts +25 -4
- package/dist/locales/en.js +25 -4
- package/dist/locales/en.js.map +1 -1
- package/dist/locales/es.js +25 -4
- package/dist/locales/es.js.map +1 -1
- package/dist/locales/ja.js +16 -4
- package/dist/locales/ja.js.map +1 -1
- package/dist/locales/ko.js +16 -4
- package/dist/locales/ko.js.map +1 -1
- package/dist/locales/zh.js +16 -4
- package/dist/locales/zh.js.map +1 -1
- package/dist/offers.d.ts +33 -0
- package/dist/order-checkout.d.ts +30 -0
- package/dist/react/context.d.ts +6 -5
- package/dist/react/hooks.d.ts +17 -16
- package/dist/react/index.d.ts +1 -1
- package/dist/react/provider.d.ts +24 -2
- package/dist/react.js +2 -33
- package/dist/save-payment-method.d.ts +0 -6
- package/dist/styles.css +1 -1
- package/dist/types.d.ts +16 -16
- package/docs/payment-form-contract.md +6 -6
- package/package.json +2 -2
- package/dist/client-CWX6QpLa.js.map +0 -1
- package/dist/config-DZ97SQG2.js +0 -341
- package/dist/config-DZ97SQG2.js.map +0 -1
- package/dist/provider.d.ts +0 -18
- package/dist/react.js.map +0 -1
package/dist/locales/ko.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ko.js","names":[],"sources":["../../src/locales/ko.ts"],"sourcesContent":["import type { BillingUiMessageBundle } from \"../i18n/messages\"\n\nexport const ko: BillingUiMessageBundle = {\n common: {\n cancel: \"취소\",\n close: \"닫기\",\n retry: \"다시 시도\",\n loading: \"불러오는 중...\",\n previous: \"이전\",\n next: \"다음\",\n notAvailable: \"—\",\n },\n status: {\n active: \"활성\",\n pending: \"대기 중\",\n past_due: \"연체\",\n canceled: \"해지됨\",\n cancel_scheduled: \"종료 예정\",\n unknown: \"알 수 없음\",\n awaiting_method: \"카드 업데이트 필요\",\n unverified: \"확인 중\",\n succeeded: \"결제 완료\",\n failed: \"실패\",\n refunded: \"환불됨\",\n partially_refunded: \"부분 환불\",\n expired: \"만료됨\",\n expiring_soon: \"곧 만료\",\n needs_attention: \"확인 필요\",\n
|
|
1
|
+
{"version":3,"file":"ko.js","names":[],"sources":["../../src/locales/ko.ts"],"sourcesContent":["import type { BillingUiMessageBundle } from \"../i18n/messages\"\n\nexport const ko: BillingUiMessageBundle = {\n common: {\n cancel: \"취소\",\n close: \"닫기\",\n retry: \"다시 시도\",\n loading: \"불러오는 중...\",\n previous: \"이전\",\n next: \"다음\",\n notAvailable: \"—\",\n },\n status: {\n active: \"활성\",\n pending: \"대기 중\",\n past_due: \"연체\",\n canceled: \"해지됨\",\n cancel_scheduled: \"종료 예정\",\n unknown: \"알 수 없음\",\n awaiting_method: \"카드 업데이트 필요\",\n unverified: \"확인 중\",\n succeeded: \"결제 완료\",\n failed: \"실패\",\n refunded: \"환불됨\",\n partially_refunded: \"부분 환불\",\n expired: \"만료됨\",\n expiring_soon: \"곧 만료\",\n needs_attention: \"확인 필요\",\n default: \"기본\",\n },\n interval: {\n every: {\n hour: { \"1\": \"매시간\", other: \"{count}시간마다\" },\n day: { \"1\": \"매일\", other: \"{count}일마다\" },\n week: { \"1\": \"매주\", other: \"{count}주마다\" },\n },\n per: {\n hour: { \"1\": \"/시간\", other: \"/{count}시간\" },\n day: { \"1\": \"/일\", other: \"/{count}일\" },\n week: { \"1\": \"/주\", other: \"/{count}주\" },\n },\n access: {\n hour: { other: \"{count}시간 이용\" },\n day: { other: \"{count}일 이용\" },\n week: { other: \"{count}주 이용\" },\n },\n duration: {\n hour: { other: \"{count}시간\" },\n day: { other: \"{count}일\" },\n week: { other: \"{count}주\" },\n },\n once: \"일회성\",\n permanent: \"예정된 만료일이 없는 이용권\",\n },\n offers: {\n empty: \"이용할 수 있는 상품이 없습니다\",\n once: \"{amount}\",\n rent: \"{period} 대여, {amount}\",\n recurring: \"{amount} {every}\",\n },\n subscriptions: {\n title: \"구독\",\n description: \"이용 중인 요금제와 갱신일입니다.\",\n empty: \"아직 구독이 없습니다\",\n emptyDescription: \"구독한 요금제가 여기에 표시됩니다.\",\n browsePlans: \"요금제 보기\",\n fallbackName: \"구독\",\n renews: \"{date}에 갱신\",\n endsOn: \"{date}까지 이용 가능\",\n noMorePayments: \"추가 결제 없음\",\n endedOn: \"{date}에 종료됨\",\n pastDue: \"결제에 실패했습니다. 계속 이용하려면 카드를 업데이트하세요.\",\n cancel: \"해지\",\n cancelLabel: \"{name} 해지\",\n resume: \"재개\",\n resumed: \"구독이 계속됩니다.\",\n manageAtProvider: \"관리\",\n updating: \"업데이트 중...\",\n paidWith: \"{brand} •••• {last4}\",\n wallet: \"Solana 지갑\",\n changeCard: \"카드 변경\",\n changeCardLabel: \"{name} 카드 변경\",\n },\n changeCard: {\n title: \"{name} 결제 카드\",\n description: \"이후 갱신은 선택한 카드로 청구됩니다.\",\n none: \"변경하려면 결제 수단에서 다른 카드를 추가하세요.\",\n confirm: \"이 카드 사용\",\n current: \"현재\",\n useDefault: \"기본 카드({card})\",\n done: \"결제 카드가 변경되었습니다.\",\n },\n cancel: {\n title: \"{name}을(를) 해지할까요?\",\n description: \"향후 결제가 중단됩니다. 이미 구매한 이용권은 유지됩니다.\",\n solanaDescription: \"지갑에서 온체인 해지에 서명합니다. 이미 구매한 이용권은 유지됩니다.\",\n reasonLabel: \"해지하는 이유를 알려 주세요\",\n reasonPlaceholder: \"의견은 서비스 개선에 도움이 됩니다.\",\n reasonHint: \"{count}/{max}\",\n reasonTooShort: \"{min}자 이상 입력하세요.\",\n keep: \"구독 유지\",\n confirm: \"구독 해지\",\n confirmWallet: \"지갑으로 서명\",\n working: \"해지 중...\",\n preparing: \"트랜잭션 준비 중...\",\n signing: \"지갑에서 승인하세요...\",\n confirming: \"해지를 기록하는 중...\",\n done: \"해지가 요청되었습니다.\",\n },\n paymentMethods: {\n title: \"결제 수단\",\n description: \"구독에 사용하는 저장된 카드입니다.\",\n empty: \"저장된 카드가 없습니다\",\n emptyDescription: \"저장한 카드가 여기에 표시됩니다.\",\n add: \"카드 추가\",\n addTitle: \"카드 추가\",\n addDescription:\n \"카드 정보는 결제 대행사로 바로 전송되며 이 사이트에는 전달되지 않습니다.\",\n save: \"카드 저장\",\n added: \"카드를 저장했습니다.\",\n provider: \"결제 제공업체\",\n saveNotice: \"입력한 카드는 향후 결제를 위해 계정에 저장됩니다.\",\n unavailable: \"이 제공업체에서는 안전한 카드 입력을 사용할 수 없습니다.\",\n addUnavailable: \"지금은 카드를 추가할 수 없습니다.\",\n verificationPending:\n \"카드 확인이 대기 중입니다. 다시 시도하기 전에 저장된 카드를 확인하세요.\",\n cardLabel: \"{brand} •••• {last4}\",\n fallbackBrand: \"카드\",\n expires: \"유효기간 {date}\",\n usedBy: \"{names}에서 사용 중\",\n defaultFor: \"{currencies} 기본 카드\",\n makeDefault: \"기본으로 설정\",\n defaultUpdated: \"기본 카드를 업데이트했습니다.\",\n remove: \"삭제\",\n removeLabel: \"{label} 삭제\",\n removeTitle: \"{label}을(를) 삭제할까요?\",\n removeDescription:\n \"활성 구독에 사용 중인 카드는 다른 카드로 바꾼 후 삭제할 수 있습니다.\",\n removeConfirm: \"카드 삭제\",\n removed: \"카드를 삭제했습니다.\",\n removePending: \"삭제를 처리하고 있습니다.\",\n inUse:\n \"이 카드는 활성 구독의 결제에 사용 중입니다. 먼저 해당 구독을 다른 카드로 변경하세요.\",\n },\n checkout: {\n renews: \"{period} 갱신\",\n },\n history: {\n title: \"결제 내역\",\n description: \"계정의 청구 및 환불 내역입니다.\",\n empty: \"아직 결제 내역이 없습니다\",\n emptyDescription: \"완료된 결제가 여기에 표시됩니다.\",\n date: \"날짜\",\n item: \"항목\",\n subscription: \"구독\",\n purchase: \"구매\",\n method: \"결제 수단\",\n status: \"상태\",\n amount: \"금액\",\n refund: \"환불\",\n refundedAmount: \"{amount} 환불됨\",\n page: \"{page}페이지\",\n rail: {\n card: \"카드\",\n solana: \"Solana\",\n ccbill: \"카드\",\n nmi: \"카드\",\n stripe: \"카드\",\n },\n },\n errors: {\n generic: \"문제가 발생했습니다. 다시 시도하세요.\",\n network: \"서버에 연결할 수 없습니다. 연결을 확인하고 다시 시도하세요.\",\n network_error:\n \"서버에 연결할 수 없습니다. 연결을 확인하고 다시 시도하세요.\",\n invalid_response: \"서버가 예상치 못한 응답을 보냈습니다.\",\n authentication_required: \"세션이 만료되었습니다. 다시 로그인하세요.\",\n resource_access_denied: \"접근 권한이 없습니다.\",\n resource_not_found: \"이 항목은 더 이상 존재하지 않습니다.\",\n resource_conflict: \"내용이 변경되었습니다. 새로고침 후 다시 시도하세요.\",\n rate_limit_exceeded: \"요청이 너무 많습니다. 잠시 후 다시 시도하세요.\",\n service_unavailable:\n \"결제 기능을 일시적으로 사용할 수 없습니다. 잠시 후 다시 시도하세요.\",\n internal_error: \"시스템에 문제가 발생했습니다. 다시 시도하세요.\",\n card_declined: \"카드가 거절되었습니다.\",\n payment_provider_rejected: \"결제 대행사가 요청을 거절했습니다.\",\n provider_outcome_unknown:\n \"제공업체에서 결과를 확인하지 못했습니다. 잠시 후 다시 확인하세요.\",\n payment_in_progress: \"이미 결제가 진행 중입니다.\",\n payment_method_delete_unsupported:\n \"이 카드는 여기에서 삭제할 수 없습니다. 고객 지원에 문의하세요.\",\n payment_method_delete_failed:\n \"제공업체가 이 카드를 삭제하지 못했습니다. 나중에 다시 시도하세요.\",\n customer_session_required: \"이 작업을 하려면 다시 로그인하세요.\",\n invoker_scoped_principal: \"이 계정은 결제를 관리할 수 없습니다.\",\n csrf_origin_denied: \"요청이 차단되었습니다. 페이지를 새로고침하세요.\",\n wallet_rejected: \"지갑 요청이 거절되었습니다.\",\n wallet_no_signature: \"지갑이 트랜잭션에 서명하지 않았습니다.\",\n },\n}\n"],"mappings":"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"}
|
package/dist/locales/zh.js
CHANGED
|
@@ -25,7 +25,7 @@ var e = {
|
|
|
25
25
|
expired: "已过期",
|
|
26
26
|
expiring_soon: "即将过期",
|
|
27
27
|
needs_attention: "需要处理",
|
|
28
|
-
|
|
28
|
+
default: "默认"
|
|
29
29
|
},
|
|
30
30
|
interval: {
|
|
31
31
|
every: {
|
|
@@ -61,9 +61,20 @@ var e = {
|
|
|
61
61
|
day: { other: "{count} 天访问权限" },
|
|
62
62
|
week: { other: "{count} 周访问权限" }
|
|
63
63
|
},
|
|
64
|
+
duration: {
|
|
65
|
+
hour: { other: "{count} 小时" },
|
|
66
|
+
day: { other: "{count} 天" },
|
|
67
|
+
week: { other: "{count} 周" }
|
|
68
|
+
},
|
|
64
69
|
once: "一次性",
|
|
65
70
|
permanent: "无预定到期时间的访问权限"
|
|
66
71
|
},
|
|
72
|
+
offers: {
|
|
73
|
+
empty: "没有可解锁此内容的商品",
|
|
74
|
+
once: "{amount}",
|
|
75
|
+
rent: "租用 {period},{amount}",
|
|
76
|
+
recurring: "{amount} {every}"
|
|
77
|
+
},
|
|
67
78
|
subscriptions: {
|
|
68
79
|
title: "订阅",
|
|
69
80
|
description: "你的套餐及续订时间。",
|
|
@@ -93,6 +104,7 @@ var e = {
|
|
|
93
104
|
none: "请先在付款方式中添加另一张卡片再切换。",
|
|
94
105
|
confirm: "使用这张卡",
|
|
95
106
|
current: "当前",
|
|
107
|
+
useDefault: "默认银行卡({card})",
|
|
96
108
|
done: "付款卡已更新。"
|
|
97
109
|
},
|
|
98
110
|
cancel: {
|
|
@@ -131,9 +143,9 @@ var e = {
|
|
|
131
143
|
fallbackBrand: "银行卡",
|
|
132
144
|
expires: "有效期至 {date}",
|
|
133
145
|
usedBy: "用于 {names}",
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
146
|
+
defaultFor: "{currencies} 默认卡",
|
|
147
|
+
makeDefault: "设为默认",
|
|
148
|
+
defaultUpdated: "默认银行卡已更新。",
|
|
137
149
|
remove: "移除",
|
|
138
150
|
removeLabel: "移除 {label}",
|
|
139
151
|
removeTitle: "移除 {label}?",
|
package/dist/locales/zh.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zh.js","names":[],"sources":["../../src/locales/zh.ts"],"sourcesContent":["import type { BillingUiMessageBundle } from \"../i18n/messages\"\n\nexport const zh: BillingUiMessageBundle = {\n common: {\n cancel: \"取消\",\n close: \"关闭\",\n retry: \"重试\",\n loading: \"加载中...\",\n previous: \"上一页\",\n next: \"下一页\",\n notAvailable: \"—\",\n },\n status: {\n active: \"有效\",\n pending: \"待处理\",\n past_due: \"逾期\",\n canceled: \"已取消\",\n cancel_scheduled: \"即将结束\",\n unknown: \"未知\",\n awaiting_method: \"需要更新银行卡\",\n unverified: \"核实中\",\n succeeded: \"已支付\",\n failed: \"失败\",\n refunded: \"已退款\",\n partially_refunded: \"部分退款\",\n expired: \"已过期\",\n expiring_soon: \"即将过期\",\n needs_attention: \"需要处理\",\n
|
|
1
|
+
{"version":3,"file":"zh.js","names":[],"sources":["../../src/locales/zh.ts"],"sourcesContent":["import type { BillingUiMessageBundle } from \"../i18n/messages\"\n\nexport const zh: BillingUiMessageBundle = {\n common: {\n cancel: \"取消\",\n close: \"关闭\",\n retry: \"重试\",\n loading: \"加载中...\",\n previous: \"上一页\",\n next: \"下一页\",\n notAvailable: \"—\",\n },\n status: {\n active: \"有效\",\n pending: \"待处理\",\n past_due: \"逾期\",\n canceled: \"已取消\",\n cancel_scheduled: \"即将结束\",\n unknown: \"未知\",\n awaiting_method: \"需要更新银行卡\",\n unverified: \"核实中\",\n succeeded: \"已支付\",\n failed: \"失败\",\n refunded: \"已退款\",\n partially_refunded: \"部分退款\",\n expired: \"已过期\",\n expiring_soon: \"即将过期\",\n needs_attention: \"需要处理\",\n default: \"默认\",\n },\n interval: {\n every: {\n hour: { \"1\": \"每小时\", other: \"每 {count} 小时\" },\n day: { \"1\": \"每天\", other: \"每 {count} 天\" },\n week: { \"1\": \"每周\", other: \"每 {count} 周\" },\n },\n per: {\n hour: { \"1\": \"/ 小时\", other: \"/ {count} 小时\" },\n day: { \"1\": \"/ 天\", other: \"/ {count} 天\" },\n week: { \"1\": \"/ 周\", other: \"/ {count} 周\" },\n },\n access: {\n hour: { other: \"{count} 小时访问权限\" },\n day: { other: \"{count} 天访问权限\" },\n week: { other: \"{count} 周访问权限\" },\n },\n duration: {\n hour: { other: \"{count} 小时\" },\n day: { other: \"{count} 天\" },\n week: { other: \"{count} 周\" },\n },\n once: \"一次性\",\n permanent: \"无预定到期时间的访问权限\",\n },\n offers: {\n empty: \"没有可解锁此内容的商品\",\n once: \"{amount}\",\n rent: \"租用 {period},{amount}\",\n recurring: \"{amount} {every}\",\n },\n subscriptions: {\n title: \"订阅\",\n description: \"你的套餐及续订时间。\",\n empty: \"还没有订阅\",\n emptyDescription: \"你订阅的套餐会显示在这里。\",\n browsePlans: \"浏览套餐\",\n fallbackName: \"订阅\",\n renews: \"{date} 续订\",\n endsOn: \"可使用至 {date}\",\n noMorePayments: \"不再付款\",\n endedOn: \"已于 {date} 结束\",\n pastDue: \"付款失败。请更新你的银行卡以保留访问权限。\",\n cancel: \"取消订阅\",\n cancelLabel: \"取消 {name}\",\n resume: \"恢复\",\n resumed: \"你的订阅将继续。\",\n manageAtProvider: \"管理\",\n updating: \"正在更新...\",\n paidWith: \"{brand} •••• {last4}\",\n wallet: \"Solana 钱包\",\n changeCard: \"更换卡片\",\n changeCardLabel: \"更换 {name} 的卡片\",\n },\n changeCard: {\n title: \"{name} 的付款卡\",\n description: \"之后的续费将从所选卡片扣款。\",\n none: \"请先在付款方式中添加另一张卡片再切换。\",\n confirm: \"使用这张卡\",\n current: \"当前\",\n useDefault: \"默认银行卡({card})\",\n done: \"付款卡已更新。\",\n },\n cancel: {\n title: \"取消 {name}?\",\n description: \"停止后续付款。已购买的访问权限予以保留。\",\n solanaDescription: \"你的钱包将签署链上取消交易。已购买的访问权限予以保留。\",\n reasonLabel: \"为什么要取消?\",\n reasonPlaceholder: \"你的反馈能帮助我们改进。\",\n reasonHint: \"{count}/{max}\",\n reasonTooShort: \"请至少输入 {min} 个字符。\",\n keep: \"保留订阅\",\n confirm: \"取消订阅\",\n confirmWallet: \"用钱包签名\",\n working: \"正在取消...\",\n preparing: \"正在准备交易...\",\n signing: \"请在钱包中确认...\",\n confirming: \"正在记录取消...\",\n done: \"已提交取消请求。\",\n },\n paymentMethods: {\n title: \"付款方式\",\n description: \"用于订阅的已保存银行卡。\",\n empty: \"没有已保存的银行卡\",\n emptyDescription: \"你保存的银行卡会显示在这里。\",\n add: \"添加银行卡\",\n addTitle: \"添加银行卡\",\n addDescription: \"卡片信息直接发送给支付处理商,本网站不会接触这些信息。\",\n save: \"保存银行卡\",\n added: \"银行卡已保存。\",\n provider: \"支付服务商\",\n saveNotice: \"您输入的卡将保存到您的账户,用于以后的付款。\",\n unavailable: \"此服务商不支持安全的银行卡输入。\",\n addUnavailable: \"暂时无法添加银行卡。\",\n verificationPending: \"银行卡验证待处理。请先查看已保存的银行卡,再重试。\",\n cardLabel: \"{brand} •••• {last4}\",\n fallbackBrand: \"银行卡\",\n expires: \"有效期至 {date}\",\n usedBy: \"用于 {names}\",\n defaultFor: \"{currencies} 默认卡\",\n makeDefault: \"设为默认\",\n defaultUpdated: \"默认银行卡已更新。\",\n remove: \"移除\",\n removeLabel: \"移除 {label}\",\n removeTitle: \"移除 {label}?\",\n removeDescription: \"正在为有效订阅付款的银行卡需要先替换才能移除。\",\n removeConfirm: \"移除银行卡\",\n removed: \"银行卡已移除。\",\n removePending: \"正在处理移除。\",\n inUse: \"这张卡正在为有效订阅付款。请先将该订阅切换到其他银行卡。\",\n },\n checkout: {\n renews: \"{period}续订\",\n },\n history: {\n title: \"付款记录\",\n description: \"你账户的扣款和退款。\",\n empty: \"还没有付款记录\",\n emptyDescription: \"已完成的付款会显示在这里。\",\n date: \"日期\",\n item: \"项目\",\n subscription: \"订阅\",\n purchase: \"购买\",\n method: \"方式\",\n status: \"状态\",\n amount: \"金额\",\n refund: \"退款\",\n refundedAmount: \"已退款 {amount}\",\n page: \"第 {page} 页\",\n rail: {\n card: \"银行卡\",\n solana: \"Solana\",\n ccbill: \"银行卡\",\n nmi: \"银行卡\",\n stripe: \"银行卡\",\n },\n },\n errors: {\n generic: \"出了点问题,请重试。\",\n network: \"无法连接服务器。请检查网络后重试。\",\n network_error: \"无法连接服务器。请检查网络后重试。\",\n invalid_response: \"服务器返回了意外的响应。\",\n authentication_required: \"会话已过期,请重新登录。\",\n resource_access_denied: \"你无权访问此内容。\",\n resource_not_found: \"该项目已不存在。\",\n resource_conflict: \"内容已发生变化。请刷新后重试。\",\n rate_limit_exceeded: \"请求过多,请稍后再试。\",\n service_unavailable: \"计费服务暂时不可用,请稍后再试。\",\n internal_error: \"我们这边出了问题,请重试。\",\n card_declined: \"银行卡被拒绝。\",\n payment_provider_rejected: \"支付服务商拒绝了该请求。\",\n provider_outcome_unknown: \"无法向服务商确认结果,请稍后再查看。\",\n payment_in_progress: \"已有一笔付款正在处理中。\",\n payment_method_delete_unsupported: \"此银行卡无法在这里移除,请联系客服。\",\n payment_method_delete_failed: \"服务商未能移除此银行卡,请稍后再试。\",\n customer_session_required: \"请重新登录后再执行此操作。\",\n invoker_scoped_principal: \"此账户无法管理计费。\",\n csrf_origin_denied: \"请求被拦截。请刷新页面。\",\n wallet_rejected: \"钱包请求被拒绝。\",\n wallet_no_signature: \"钱包未签署该交易。\",\n },\n}\n"],"mappings":"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"}
|
package/dist/offers.d.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { CheckoutAppearance } from './appearance';
|
|
2
|
+
import { Product } from './client/types';
|
|
3
|
+
import { PayResult } from './types';
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
export interface OffersProps {
|
|
6
|
+
/**
|
|
7
|
+
* What to sell: these product keys, such as a course, its bundle and the
|
|
8
|
+
* membership that also unlocks it, looked up in OpenRails' public catalog.
|
|
9
|
+
* The host's server names them (the Go Client's ListOffers finds the
|
|
10
|
+
* products granting an entitlement).
|
|
11
|
+
*/
|
|
12
|
+
keys?: string[];
|
|
13
|
+
/**
|
|
14
|
+
* The products to offer instead, from the host's own server (the Go
|
|
15
|
+
* Client's ListOffers): nothing is fetched.
|
|
16
|
+
*/
|
|
17
|
+
products?: Product[];
|
|
18
|
+
/**
|
|
19
|
+
* The checkout succeeded. A hint: the host's own gate decides access, so
|
|
20
|
+
* send the buyer back to the content it guards.
|
|
21
|
+
*/
|
|
22
|
+
onPaid: (result: PayResult) => void;
|
|
23
|
+
/**
|
|
24
|
+
* Buying needs a signed-in customer: called instead of the checkout when
|
|
25
|
+
* `signedIn` is false or OpenRails answers 401.
|
|
26
|
+
*/
|
|
27
|
+
onSignInRequired: () => void;
|
|
28
|
+
/** false when the host knows the visitor is signed out. */
|
|
29
|
+
signedIn?: boolean;
|
|
30
|
+
appearance?: CheckoutAppearance;
|
|
31
|
+
className?: string;
|
|
32
|
+
}
|
|
33
|
+
export declare function Offers({ products, ...props }: OffersProps): React.JSX.Element;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { CheckoutAppearance } from './appearance';
|
|
2
|
+
import { BillingClient } from './client/client';
|
|
3
|
+
import { Order } from './client/types';
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
export interface OrderCheckoutProps {
|
|
6
|
+
orderId: string;
|
|
7
|
+
/** The client to pay through; default: the provider's. */
|
|
8
|
+
client?: BillingClient;
|
|
9
|
+
/** Where a redirect PSP will return to; card PSPs need none. */
|
|
10
|
+
returnUrl?: string;
|
|
11
|
+
/** Offer the customer's saved cards (GET /me/payment-methods). Default true. */
|
|
12
|
+
savedPaymentMethods?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Offer a PSP whose card entry is server. Default true; orders take
|
|
15
|
+
* tokens only, so such a PSP is offered for saved cards alone.
|
|
16
|
+
*/
|
|
17
|
+
serverCardEntry?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Offer Apple Pay and Google Pay through a Stripe PSP's Express Checkout
|
|
20
|
+
* Element. The page's host must be a payment-method domain registered on
|
|
21
|
+
* that Stripe account. Default false.
|
|
22
|
+
*/
|
|
23
|
+
wallets?: boolean;
|
|
24
|
+
/** Once the order is complete, or processing on an asynchronous rail. */
|
|
25
|
+
onSettled?: (order: Order) => void;
|
|
26
|
+
appearance?: CheckoutAppearance;
|
|
27
|
+
className?: string;
|
|
28
|
+
}
|
|
29
|
+
/** Pays one order. Requires `BillingProvider`. */
|
|
30
|
+
export declare function OrderCheckout({ orderId, client: given, returnUrl, savedPaymentMethods, serverCardEntry, wallets, onSettled, appearance, className, }: OrderCheckoutProps): React.JSX.Element;
|
package/dist/react/context.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BillingClient } from '../client/client';
|
|
2
|
-
import {
|
|
2
|
+
import { SubscriptionChange } from '../client/types';
|
|
3
3
|
import { ConfigStore } from './config';
|
|
4
4
|
export type BillingChange = {
|
|
5
5
|
type: "subscription.canceled" | "subscription.resumed";
|
|
@@ -7,14 +7,15 @@ export type BillingChange = {
|
|
|
7
7
|
} | {
|
|
8
8
|
type: "subscription.payment_method_changed";
|
|
9
9
|
subscriptionId: string;
|
|
10
|
-
|
|
10
|
+
/** null: the subscription follows the default card. */
|
|
11
|
+
paymentMethodId: string | null;
|
|
11
12
|
} | {
|
|
12
|
-
type: "subscription.
|
|
13
|
+
type: "subscription.changed";
|
|
13
14
|
subscriptionId: string;
|
|
14
15
|
/** `status` may still be `processing` or `requires_action`. */
|
|
15
|
-
change:
|
|
16
|
+
change: SubscriptionChange;
|
|
16
17
|
} | {
|
|
17
|
-
type: "payment_method.added" | "payment_method.removed" | "payment_method.
|
|
18
|
+
type: "payment_method.added" | "payment_method.removed" | "payment_method.default_changed";
|
|
18
19
|
paymentMethodId: string;
|
|
19
20
|
};
|
|
20
21
|
export interface BillingContextValue {
|
package/dist/react/hooks.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { SendSolanaTransaction } from '../client/client';
|
|
1
|
+
import { ProductListOptions, SendSolanaTransaction, SubscriptionChangeInput } from '../client/client';
|
|
2
2
|
import { BillingError } from '../client/errors';
|
|
3
|
-
import { NewCard, Payment, PaymentMethod, Product, Subscription,
|
|
3
|
+
import { NewCard, Payment, PaymentMethod, Product, Subscription, SubscriptionChange } from '../client/types';
|
|
4
4
|
export type ActionResult = Promise<BillingError | null>;
|
|
5
5
|
/** `signing` and `confirming` are a wallet step's stages. */
|
|
6
|
-
export type SubscriptionAction = "cancel" | "resume" | "payment_method" | "
|
|
6
|
+
export type SubscriptionAction = "cancel" | "resume" | "payment_method" | "change" | "signing" | "confirming";
|
|
7
7
|
export interface SubscriptionsOptions {
|
|
8
8
|
/** Server filter; default `all`. */
|
|
9
9
|
status?: string;
|
|
@@ -25,31 +25,32 @@ export interface SubscriptionsState {
|
|
|
25
25
|
*/
|
|
26
26
|
cancel: (subscriptionId: string, reason: string, sendTransaction?: SendSolanaTransaction) => ActionResult;
|
|
27
27
|
resume: (subscriptionId: string) => ActionResult;
|
|
28
|
-
|
|
28
|
+
/** `null` makes the subscription follow the default card. */
|
|
29
|
+
setPaymentMethod: (subscriptionId: string, paymentMethodId: string | null) => ActionResult;
|
|
29
30
|
/**
|
|
30
31
|
* Resolves to the change, whose `status` may still be `processing` or
|
|
31
32
|
* `requires_action`, or to the error. A Solana change is signed with
|
|
32
33
|
* `sendTransaction` and resolves once the chain confirms it.
|
|
33
34
|
*/
|
|
34
|
-
|
|
35
|
-
priceId: string;
|
|
35
|
+
changeSubscription: (subscriptionId: string, input: SubscriptionChangeInput & {
|
|
36
36
|
idempotencyKey: string;
|
|
37
|
-
}, sendTransaction?: SendSolanaTransaction) => Promise<
|
|
37
|
+
}, sendTransaction?: SendSolanaTransaction) => Promise<SubscriptionChange | BillingError>;
|
|
38
38
|
}
|
|
39
39
|
export declare function useSubscriptions(options?: SubscriptionsOptions): SubscriptionsState;
|
|
40
40
|
export interface ProductsState {
|
|
41
41
|
products: Product[] | null;
|
|
42
|
-
/** The cursor of the next page; null on the last. */
|
|
43
|
-
nextCursor: string | null;
|
|
44
42
|
loading: boolean;
|
|
45
43
|
error: BillingError | null;
|
|
46
44
|
refetch: () => void;
|
|
47
45
|
}
|
|
48
|
-
/** The
|
|
49
|
-
export
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
46
|
+
/** The product keys to look up: `ProductListOptions`. */
|
|
47
|
+
export type ProductsOptions = Pick<ProductListOptions, "keys">;
|
|
48
|
+
/**
|
|
49
|
+
* The products on sale named by `keys`, each with its active prices: a
|
|
50
|
+
* public catalog lookup.
|
|
51
|
+
*/
|
|
52
|
+
export declare function useProducts({ keys }: ProductsOptions): ProductsState;
|
|
53
|
+
export type PaymentMethodAction = "remove" | "default";
|
|
53
54
|
export interface PaymentMethodsState {
|
|
54
55
|
methods: PaymentMethod[] | null;
|
|
55
56
|
loading: boolean;
|
|
@@ -59,8 +60,8 @@ export interface PaymentMethodsState {
|
|
|
59
60
|
adding: boolean;
|
|
60
61
|
add: (card: NewCard) => ActionResult;
|
|
61
62
|
remove: (paymentMethodId: string) => ActionResult;
|
|
62
|
-
/** Makes the card the
|
|
63
|
-
|
|
63
|
+
/** Makes the card the default for the currency. */
|
|
64
|
+
setDefault: (paymentMethodId: string, currency: string) => ActionResult;
|
|
64
65
|
}
|
|
65
66
|
export declare function usePaymentMethods(): PaymentMethodsState;
|
|
66
67
|
export interface PaymentsOptions {
|
package/dist/react/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { BillingProvider, type BillingProviderProps } from './provider';
|
|
2
2
|
export { useBillingClient, useBillingRefresh, useOptionalBillingContext, type BillingChange, type BillingContextValue, } from './context';
|
|
3
3
|
export { useConfig, useCurrencyScales, type ConfigState, type ConfigStore, } from './config';
|
|
4
|
-
export { usePaymentMethods, usePayments, useProducts, useSubscriptions, type ActionResult, type PaymentMethodAction, type PaymentMethodsState, type PaymentsOptions, type PaymentsState, type ProductsState, type SubscriptionAction, type SubscriptionsOptions, type SubscriptionsState, } from './hooks';
|
|
4
|
+
export { usePaymentMethods, usePayments, useProducts, useSubscriptions, type ActionResult, type PaymentMethodAction, type PaymentMethodsState, type PaymentsOptions, type PaymentsState, type ProductsOptions, type ProductsState, type SubscriptionAction, type SubscriptionsOptions, type SubscriptionsState, } from './hooks';
|
package/dist/react/provider.d.ts
CHANGED
|
@@ -1,10 +1,32 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { CheckoutAppearance } from '../appearance';
|
|
2
3
|
import { BillingClient } from '../client/client';
|
|
4
|
+
import { BillingUiMessageBundle, BillingUiTranslate } from '../i18n/messages';
|
|
5
|
+
import { Navigate } from '../scope-context';
|
|
3
6
|
import { BillingChange } from './context';
|
|
4
7
|
export interface BillingProviderProps {
|
|
5
|
-
|
|
8
|
+
/**
|
|
9
|
+
* The customer's client: hooks and the account panels read it, and a
|
|
10
|
+
* checkout saves a new card to the customer first. Leave it out where no
|
|
11
|
+
* customer is signed in, such as the shared payment page.
|
|
12
|
+
*/
|
|
13
|
+
client?: BillingClient;
|
|
6
14
|
/** Fires after each successful mutation: the host's cache-invalidation hook. */
|
|
7
15
|
onChange?: (change: BillingChange) => void;
|
|
16
|
+
appearance?: CheckoutAppearance;
|
|
17
|
+
/** Locale bundle(s) layered over English; later entries win. */
|
|
18
|
+
messages?: BillingUiMessageBundle | readonly BillingUiMessageBundle[];
|
|
19
|
+
/** Host translation hook, consulted before the bundles. */
|
|
20
|
+
t?: BillingUiTranslate;
|
|
21
|
+
/** BCP 47 tag for dates, money and plurals; defaults to the browser's. */
|
|
22
|
+
locale?: string;
|
|
23
|
+
/** Host router for in-app links (e.g. the plans page). */
|
|
24
|
+
navigate?: Navigate;
|
|
8
25
|
children?: ReactNode;
|
|
9
26
|
}
|
|
10
|
-
|
|
27
|
+
/**
|
|
28
|
+
* The one billing-ui provider: the client, and the appearance and words of
|
|
29
|
+
* the styled components. Renders no DOM; surfaces create their own styling
|
|
30
|
+
* roots, and no stylesheet loads until a styled component is imported.
|
|
31
|
+
*/
|
|
32
|
+
export declare function BillingProvider({ client, onChange, appearance, messages, t, locale, navigate, children, }: BillingProviderProps): import("react").JSX.Element;
|
package/dist/react.js
CHANGED
|
@@ -1,33 +1,2 @@
|
|
|
1
|
-
import { a as e, c as t, d as n,
|
|
2
|
-
|
|
3
|
-
import { jsx as g } from "react/jsx-runtime";
|
|
4
|
-
//#region src/react/provider.tsx
|
|
5
|
-
function _({ client: e, onChange: n, children: r }) {
|
|
6
|
-
let [i, a] = h(0), o = m(n);
|
|
7
|
-
f(() => {
|
|
8
|
-
o.current = n;
|
|
9
|
-
});
|
|
10
|
-
let s = d((e) => {
|
|
11
|
-
a((e) => e + 1), o.current?.(e);
|
|
12
|
-
}, []), c = d(() => a((e) => e + 1), []), l = p(() => u(e), [e]), _ = p(() => ({
|
|
13
|
-
client: e,
|
|
14
|
-
version: i,
|
|
15
|
-
notify: s,
|
|
16
|
-
refresh: c,
|
|
17
|
-
config: l
|
|
18
|
-
}), [
|
|
19
|
-
e,
|
|
20
|
-
i,
|
|
21
|
-
s,
|
|
22
|
-
c,
|
|
23
|
-
l
|
|
24
|
-
]);
|
|
25
|
-
return /* @__PURE__ */ g(t.Provider, {
|
|
26
|
-
value: _,
|
|
27
|
-
children: r
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
//#endregion
|
|
31
|
-
export { _ as BillingProvider, a as useBillingClient, n as useBillingRefresh, o as useConfig, c as useCurrencyScales, r as useOptionalBillingContext, i as usePaymentMethods, e as usePayments, s as useProducts, l as useSubscriptions };
|
|
32
|
-
|
|
33
|
-
//# sourceMappingURL=react.js.map
|
|
1
|
+
import { a as e, c as t, d as n, i as r, n as i, o as a, r as o, s, t as c, u as l } from "./hooks-2d-XjpuI.js";
|
|
2
|
+
export { e as BillingProvider, t as useBillingClient, l as useBillingRefresh, a as useConfig, s as useCurrencyScales, n as useOptionalBillingContext, c as usePaymentMethods, i as usePayments, o as useProducts, r as useSubscriptions };
|
|
@@ -5,12 +5,6 @@ export interface SavePaymentMethodProps {
|
|
|
5
5
|
/** The PSP to save the card with, from OpenRails's payment config. */
|
|
6
6
|
psp: PspConfig;
|
|
7
7
|
onSaved: (paymentMethodId: string) => void;
|
|
8
|
-
/**
|
|
9
|
-
* Where the provider returns after an off-page verification (3-D Secure),
|
|
10
|
-
* given the setup id to confirm with `client.confirmCardSetup`. Default:
|
|
11
|
-
* the current page with `?setup_id=`.
|
|
12
|
-
*/
|
|
13
|
-
returnURL?: (setupId: string) => string;
|
|
14
8
|
/** Billing country to preselect; default: the browser locale's region. */
|
|
15
9
|
defaultCountry?: string;
|
|
16
10
|
submitLabel?: string;
|