diff --git a/docs/README.md b/docs/README.md index 79fefac2..ef874629 100644 --- a/docs/README.md +++ b/docs/README.md @@ -101,7 +101,7 @@ Example using JavaScript to generate a PayButton: disabled: false, wsBaseUrl: 'http://localhost:5000', apiBaseUrl: 'http://localhost:3000' - disableAltpayment: true, + altpayment: 'XEC', contributionOffset: 10, autoClose: true }; @@ -988,11 +988,11 @@ apiBaseUrl = "https://paybutton.org" -## disable-altpayment +## altpayment -> **The ‘disableAltpayment’ parameter disables altpayment logic.** +> **The `altpayment` parameter controls SideShift altpayment behavior.** -?> This parameter is optional. Default value is false. Possible values are true or false. +?> This parameter is optional. When omitted or set to `true`, users see an opt-in "Don't have any XEC/BCH?" link to swap other coins via SideShift. Set to `XEC` or `BCH` to hide that link. Set to `BTC` to automatically open the SideShift flow with BTC pre-selected. Unrecognized coin tickers behave the same as `true`. **Example:** @@ -1000,19 +1000,19 @@ apiBaseUrl = "https://paybutton.org" #### ** HTML ** ```html -disable-altpayment="true" +altpayment="BTC" ``` #### ** JavaScript ** ```javascript -disableAltpayment: 'true' +altpayment: 'BTC' ``` #### ** React ** ```react -disableAltpayment = "true" +altpayment = "BTC" ``` diff --git a/docs/_sidebar.md b/docs/_sidebar.md index 940e9fdb..52592e5c 100644 --- a/docs/_sidebar.md +++ b/docs/_sidebar.md @@ -28,7 +28,7 @@ - [disabled](/?id=disabled) - [ws-base-url](/?id=ws-base-url) - [api-base-url](/?id=api-base-url) - - [disable-altpayment](/?id=disable-altpayment) + - [altpayment](/?id=altpayment) - [contribution-offset](/?id=contribution-offset) - [auto-close](/?id=auto-close) - [disable-sound](/?id=disable-sound) diff --git a/docs/zh-cn/README.md b/docs/zh-cn/README.md index dc86beaf..a350adc7 100644 --- a/docs/zh-cn/README.md +++ b/docs/zh-cn/README.md @@ -101,7 +101,7 @@ disabled: false, wsBaseUrl: 'http://localhost:5000', apiBaseUrl: 'http://localhost:3000' - disableAltpayment: true, + altpayment: 'XEC', contributionOffset: 10 }; @@ -982,11 +982,11 @@ apiBaseUrl: 'https://paybutton.org' apiBaseUrl = "https://paybutton.org" ``` -## disable-altpayment +## altpayment -> **“disableAltpayment” 参数用于禁用备用支付逻辑。** +> **“altpayment” 参数用于控制 SideShift 备用支付行为。** -?> 该参数为可选项,默认值为 false。可选值为 true 或 false。 +?> 该参数为可选项。省略或设为 `true` 时,用户会看到“没有 XEC/BCH?”的 SideShift 兑换入口。设为 `XEC` 或 `BCH` 可隐藏该入口。设为 `BTC` 将自动打开 SideShift 流程并预选 BTC。无法识别的币种代码与 `true` 行为相同。 **Example:** @@ -994,19 +994,19 @@ apiBaseUrl = "https://paybutton.org" #### ** HTML ** ```html -disable-altpayment="true" +altpayment="BTC" ``` #### ** JavaScript ** ```javascript -disableAltpayment: 'true' +altpayment: 'BTC' ``` #### ** React ** ```react -disableAltpayment = "true" +altpayment = "BTC" ``` diff --git a/docs/zh-cn/_sidebar.md b/docs/zh-cn/_sidebar.md index 6acc45ce..b0378904 100644 --- a/docs/zh-cn/_sidebar.md +++ b/docs/zh-cn/_sidebar.md @@ -27,7 +27,7 @@ - [disabled](/zh-cn/?id=disabled) - [ws-base-url](/zh-cn/?id=ws-base-url) - [api-base-url](/zh-cn/?id=api-base-url) - - [disable-altpayment](/zh-cn/?id=disable-altpayment) + - [altpayment](/zh-cn/?id=altpayment) - [contribution-offset](/zh-cn/?id=contribution-offset) - [auto-close](/zh-cn/?id=auto-close) - [disable-sound](/zh-cn/?id=disable-sound) diff --git a/docs/zh-tw/README.md b/docs/zh-tw/README.md index 4d004665..25670449 100644 --- a/docs/zh-tw/README.md +++ b/docs/zh-tw/README.md @@ -101,7 +101,7 @@ disabled: false, wsBaseUrl: 'http://localhost:5000', apiBaseUrl: 'http://localhost:3000' - disableAltpayment: true, + altpayment: 'XEC', contributionOffset: 10 }; @@ -982,11 +982,11 @@ apiBaseUrl: 'https://paybutton.org' apiBaseUrl = "https://paybutton.org" ``` -## disable-altpayment +## altpayment -> **“disableAltpayment” 參數用於禁用備用支付邏輯。** +> **「altpayment」參數用於控制 SideShift 備用支付行為。** -?> 該參數為可選項,預設值為 false。可選值為 true 或 false。 +?> 該參數為可選項。省略或設為 `true` 時,使用者會看到「沒有 XEC/BCH?」的 SideShift 兌換入口。設為 `XEC` 或 `BCH` 可隱藏該入口。設為 `BTC` 將自動開啟 SideShift 流程並預選 BTC。無法識別的幣種代碼與 `true` 行為相同。 **Example:** @@ -994,19 +994,19 @@ apiBaseUrl = "https://paybutton.org" #### ** HTML ** ```html -disable-altpayment="true" +altpayment="BTC" ``` #### ** JavaScript ** ```javascript -disableAltpayment: 'true' +altpayment: 'BTC' ``` #### ** React ** ```react -disableAltpayment = "true" +altpayment = "BTC" ``` diff --git a/docs/zh-tw/_sidebar.md b/docs/zh-tw/_sidebar.md index 8bda09ed..8909d20f 100644 --- a/docs/zh-tw/_sidebar.md +++ b/docs/zh-tw/_sidebar.md @@ -27,7 +27,7 @@ - [disabled](/zh-tw/?id=disabled) - [ws-base-url](/zh-tw/?id=ws-base-url) - [api-base-url](/zh-tw/?id=api-base-url) - - [disable-altpayment](/zh-tw/?id=disable-altpayment) + - [altpayment](/zh-tw/?id=altpayment) - [contribution-offset](/zh-tw/?id=contribution-offset) - [auto-close](/zh-tw/?id=auto-close) - [disable-sound](/zh-tw/?id=disable-sound) diff --git a/paybutton/dev/demo/index.html b/paybutton/dev/demo/index.html index 3ee3f628..4e53f2a3 100644 --- a/paybutton/dev/demo/index.html +++ b/paybutton/dev/demo/index.html @@ -38,7 +38,7 @@ currency="BCH" text="Purchase" on-transaction="myTransactionFunction" size="xl">
+ text="Donate (other dev)" on-success="mySuccessFunction" on-transaction="myTransactionFunction" altpayment="true"> + theme='{ "palette": { "primary": "#F18F01", "secondary": "#C3F3FD", "tertiary": "#2E4057"} }' altpayment="XEC">Loading Shift...
- ) : coinPair ? ( + renderLoading('Loading Shift...') + ) : coinPair && selectedCoin ? ({' '} - 1 {selectedCoin?.name} ~={' '} - {resolveNumber(coinPair.rate).toFixed(DECIMALS[coinPair.settleCoin])} {coinPair.settleCoin}{' '} + 1 {selectedCoin.name} ~={' '} + {resolveNumber(coinPair.rate).toFixed(DECIMALS[coinPair.settleCoin] ?? 8)} {coinPair.settleCoin}{' '}
{altpaymentEditable ? (