Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -889,9 +889,9 @@ apiBaseUrl: 'https://paybutton.org'
apiBaseUrl = "https://paybutton.org"
```

## enable-altpayment
## disable-altpayment

> **The ‘enableAltpayment’ parameter controls wether altpayment logic is active or not.**
> **The ‘disableAltpayment’ parameter disables altpayment logic.**

?> This parameter is optional. Default value is false. Possible values are true or false.

Expand All @@ -901,19 +901,19 @@ apiBaseUrl = "https://paybutton.org"
#### ** HTML **

```html
enable-altpayment="true"
disable-altpayment="true"
```

#### ** JavaScript **

```javascript
enableAltpayment: 'true'
disableAltpayment: 'true'
```

#### ** React **

```react
enableAltpayment = "true"
disableAltpayment = "true"
```

<!-- tabs:end -->
Expand Down
2 changes: 1 addition & 1 deletion docs/_sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
- [disabled](/?id=disabled)
- [ws-base-url](/?id=ws-base-url)
- [api-base-url](/?id=api-base-url)
- [enable-altpayment](/?id=enable-altpayment)
- [disable-altpayment](/?id=disable-altpayment)
- [contribution-offset](/?id=contribution-offset)
- [Contribute](/?id=contribute)
- [Developer Quick Start](/?id=developer-quick-start)
Expand Down
10 changes: 5 additions & 5 deletions docs/zh-cn/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -888,9 +888,9 @@ apiBaseUrl: 'https://paybutton.org'
apiBaseUrl = "https://paybutton.org"
```
<!-- tabs:end -->
## enable-altpayment
## disable-altpayment

> **“enableAltpayment” 参数控制是否启用备用支付逻辑。**
> **“disableAltpayment” 参数用于禁用备用支付逻辑。**

?> 该参数为可选项,默认值为 false。可选值为 true 或 false。

Expand All @@ -900,19 +900,19 @@ apiBaseUrl = "https://paybutton.org"
#### ** HTML **

```html
enable-altpayment="true"
disable-altpayment="true"
```

#### ** JavaScript **

```javascript
enableAltpayment: 'true'
disableAltpayment: 'true'
```

#### ** React **

```react
enableAltpayment = "true"
disableAltpayment = "true"
```
<!-- tabs:end -->

Expand Down
2 changes: 1 addition & 1 deletion docs/zh-cn/_sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
- [disabled](/zh-cn/?id=disabled)
- [ws-base-url](/zh-cn/?id=ws-base-url)
- [api-base-url](/zh-cn/?id=api-base-url)
- [enable-altpayment](/zh-cn/?id=enable-altpayment)
- [disable-altpayment](/zh-cn/?id=disable-altpayment)
- [contribution-offset](/zh-cn/?id=contribution-offset)
- [贡献](/zh-cn/?id=贡献)
- [开发人员快速入门](/zh-cn/?id=开发人员快速入门)
Expand Down
10 changes: 5 additions & 5 deletions docs/zh-tw/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -887,9 +887,9 @@ apiBaseUrl: 'https://paybutton.org'
apiBaseUrl = "https://paybutton.org"
```

## enable-altpayment
## disable-altpayment

> **“enableAltpayment” 參數控制是否啟用替代付款邏輯。**
> **“disableAltpayment” 參數用於禁用備用支付邏輯。**

?> 該參數為可選項,預設值為 false。可選值為 true 或 false。

Expand All @@ -899,19 +899,19 @@ apiBaseUrl = "https://paybutton.org"
#### ** HTML **

```html
enable-altpayment="true"
disable-altpayment="true"
```

#### ** JavaScript **

```javascript
enableAltpayment: 'true'
disableAltpayment: 'true'
```

#### ** React **

```react
enableAltpayment = "true"
disableAltpayment = "true"
```
<!-- tabs:end -->

Expand Down
2 changes: 1 addition & 1 deletion docs/zh-tw/_sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
- [disabled](/zh-tw/?id=disabled)
- [ws-base-url](/zh-tw/?id=ws-base-url)
- [api-base-url](/zh-tw/?id=api-base-url)
- [enable-altpayment](/zh-tw/?id=enable-altpayment)
- [disable-altpayment](/zh-tw/?id=disable-altpayment)
- [contribution-offset](/zh-tw/?id=contribution-offset)
- [貢獻](/zh-tw/?id=貢獻)
- [開發人員快速入門](/zh-tw/?id=開發人員快速入門)
Expand Down
4 changes: 2 additions & 2 deletions paybutton/dev/demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
currency="BCH" text="Purchase" on-transaction="myTransactionFunction"></div>

<div class="paybutton" to="ecash:qrmm7edwuj4jf7tnvygjyztyy0a0qxvl7quss2vxek" goal-amount="2500.05" currency="USD"
text="Donate (other dev)" on-success="mySuccessFunction" on-transaction="myTransactionFunction" enable-altpayment="false"></div>
text="Donate (other dev)" on-success="mySuccessFunction" on-transaction="myTransactionFunction" disable-altpayment="false"></div>

<div class="paybutton" to="ecash:qrmm7edwuj4jf7tnvygjyztyy0a0qxvl7quss2vxek" goal-amount="2500000.05"
on-close="myClose" on-open="myOpen" amount="50" currency="USD" text="Random Sats" random-satoshis="true"
Expand Down Expand Up @@ -87,7 +87,7 @@
<div id="the_widget" class="paybutton-widget" to="ecash:qrmm7edwuj4jf7tnvygjyztyy0a0qxvl7quss2vxek"
goal-amount="500000" hover-text="BLARG" amount="1000.69" success-text="WOW!" text="Purchase"
on-success="mySuccessFunction" editable="true" on-transaction="myTransactionFunction"
theme='{ "palette": { "primary": "#F18F01", "secondary": "#C3F3FD", "tertiary": "#2E4057"} }' enable-altpayment="true"></div>
theme='{ "palette": { "primary": "#F18F01", "secondary": "#C3F3FD", "tertiary": "#2E4057"} }' disable-altpayment="true"></div>
<div class="btn">
<button onclick="buttonClick()">Switch up widget!</button>
</div>
Expand Down
8 changes: 4 additions & 4 deletions paybutton/dev/demo/paybutton-generator.html
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,9 @@
<label for="random-satoshis">Random Satoshis</label>
</div>
<div class="form-input toggle">
<input type="checkbox" id="enable-altpayment" v-model="paybuttonProps.enableAltpayment" true-value="true"
<input type="checkbox" id="disable-altpayment" v-model="paybuttonProps.disableAltpayment" true-value="true"
false-value="false">
<label for="enable-altpayment">Enable Altpayment</label>
<label for="disable-altpayment">Enable Altpayment</label>
</div>
</div>
<div>
Expand Down Expand Up @@ -205,7 +205,7 @@
:disabled="paybuttonProps.disabled"
:on-success="mySuccessFuction"
:on-transaction="myTransactionFuction"
:enable-altpayment="paybuttonProps.enableAltpayment"
:disable-altpayment="paybuttonProps.disableAltpayment"
:op-return="paybuttonProps.opReturn">
</div>
</div>
Expand Down Expand Up @@ -235,7 +235,7 @@
randomSatoshis: false,
hideToasts: false,
disableEnforceFocus: false,
enableAltpayment: false,
disableAltpayment: false,
contributionOffset: undefined,
opReturn:undefined,
onSuccess: mySuccessFuction,
Expand Down
2 changes: 1 addition & 1 deletion paybutton/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ const allowedProps = [
'editable',
'wsBaseUrl',
'apiBaseUrl',
'enableAltpayment',
'disableAltpayment',
'contributionOffset'
];

Expand Down
6 changes: 3 additions & 3 deletions react/lib/components/PayButton/PayButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export interface PayButtonProps extends ButtonProps {
onClose?: (success?: boolean, paymentId?:string) => void;
wsBaseUrl?: string;
apiBaseUrl?: string;
enableAltpayment?:boolean
disableAltpayment?:boolean
contributionOffset?:number
}

Expand Down Expand Up @@ -80,7 +80,7 @@ export const PayButton = (props: PayButtonProps): React.ReactElement => {
editable,
wsBaseUrl,
apiBaseUrl,
enableAltpayment,
disableAltpayment,
contributionOffset
} = Object.assign({}, PayButton.defaultProps, props);

Expand Down Expand Up @@ -235,7 +235,7 @@ export const PayButton = (props: PayButtonProps): React.ReactElement => {
wsBaseUrl={wsBaseUrl}
apiBaseUrl={apiBaseUrl}
hoverText={hoverText}
enableAltpayment={enableAltpayment}
disableAltpayment={disableAltpayment}
contributionOffset={contributionOffset}
/>
{errorMsg && (
Expand Down
6 changes: 3 additions & 3 deletions react/lib/components/PaymentDialog/PaymentDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export interface PaymentDialogProps extends ButtonProps {
onTransaction?: (transaction: Transaction) => void;
wsBaseUrl?: string;
apiBaseUrl?: string;
enableAltpayment?: boolean;
disableAltpayment?: boolean;
contributionOffset?:number;
}

Expand Down Expand Up @@ -72,7 +72,7 @@ export const PaymentDialog = (
wsBaseUrl,
apiBaseUrl,
hoverText,
enableAltpayment,
disableAltpayment,
contributionOffset
} = Object.assign({}, PaymentDialog.defaultProps, props);

Expand Down Expand Up @@ -143,7 +143,7 @@ export const PaymentDialog = (
wsBaseUrl={wsBaseUrl}
apiBaseUrl={apiBaseUrl}
hoverText={hoverText}
enableAltpayment={enableAltpayment}
disableAltpayment={disableAltpayment}
contributionOffset={contributionOffset}
foot={success && (
<ButtonComponent
Expand Down
6 changes: 3 additions & 3 deletions react/lib/components/Widget/Widget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export interface WidgetProps {
setUseAltpayment: Function;
shiftCompleted: boolean
setShiftCompleted: Function;
enableAltpayment?: boolean;
disableAltpayment?: boolean;
contributionOffset?: number
}

Expand Down Expand Up @@ -204,7 +204,7 @@ export const Widget: React.FunctionComponent<WidgetProps> = props => {
setUseAltpayment,
shiftCompleted,
setShiftCompleted,
enableAltpayment,
disableAltpayment,
contributionOffset
} = Object.assign({}, Widget.defaultProps, props);

Expand Down Expand Up @@ -785,7 +785,7 @@ export const Widget: React.FunctionComponent<WidgetProps> = props => {
/>
</Box>
)}
{isPropsTrue(enableAltpayment) && (
{!isPropsTrue(disableAltpayment) && (
<a
className={classes.sideShiftLink}
onClick={tradeWithAltpayment}
Expand Down
6 changes: 3 additions & 3 deletions react/lib/components/Widget/WidgetContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export interface WidgetContainerProps
wsBaseUrl?: string;
apiBaseUrl?: string;
successText?: string;
enableAltpayment?: boolean
disableAltpayment?: boolean
contributionOffset?: number
}

Expand Down Expand Up @@ -104,7 +104,7 @@ export const WidgetContainer: React.FunctionComponent<WidgetContainerProps> =
apiBaseUrl,
successText,
hoverText,
enableAltpayment,
disableAltpayment,
contributionOffset,
...widgetProps
} = props;
Expand Down Expand Up @@ -279,7 +279,7 @@ export const WidgetContainer: React.FunctionComponent<WidgetContainerProps> =
setUseAltpayment={setUseAltpayment}
shiftCompleted={shiftCompleted}
setShiftCompleted={setShiftCompleted}
enableAltpayment={enableAltpayment}
disableAltpayment={disableAltpayment}
contributionOffset={contributionOffset}
/>
</React.Fragment>
Expand Down