|
@@ -54,12 +54,13 @@ export default class PaymentMethod extends Component {
|
|
|
connectorInfo: {}
|
|
connectorInfo: {}
|
|
|
};
|
|
};
|
|
|
this.rate = 0
|
|
this.rate = 0
|
|
|
- this.ENABLE_2C2P = PaymentDefault.DEFAULT.payType == PAYTYPE.PAY_PER_USE;
|
|
|
|
|
|
|
+ this.ENABLE_2C2P = PaymentDefault.is2c2p;
|
|
|
|
|
+ this.FirstPayPerUse = PaymentDefault.DEFAULT.payType == PAYTYPE.PAY_PER_USE;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
componentDidMount() {
|
|
componentDidMount() {
|
|
|
this.setState({
|
|
this.setState({
|
|
|
- paymentOptions: this.ENABLE_2C2P ? this.state.paymentOptionsUse : this.state.paymentOptionsWallet
|
|
|
|
|
|
|
+ paymentOptions: this.FirstPayPerUse ? this.state.paymentOptionsUse : this.state.paymentOptionsWallet
|
|
|
});
|
|
});
|
|
|
const params = this.props.route.params;
|
|
const params = this.props.route.params;
|
|
|
const info = params.info ?? {};
|
|
const info = params.info ?? {};
|
|
@@ -94,7 +95,7 @@ export default class PaymentMethod extends Component {
|
|
|
title: info.title,
|
|
title: info.title,
|
|
|
value: info.value
|
|
value: info.value
|
|
|
};
|
|
};
|
|
|
- if (this.state.cIndex == 1) {
|
|
|
|
|
|
|
+ if (info.value == PAYTYPE.CREDIT_WALLET) {
|
|
|
goBack();
|
|
goBack();
|
|
|
} else {
|
|
} else {
|
|
|
const amount = this.state.amountList[this.state.selectIndex].amount;
|
|
const amount = this.state.amountList[this.state.selectIndex].amount;
|
|
@@ -133,7 +134,7 @@ export default class PaymentMethod extends Component {
|
|
|
title: info.title,
|
|
title: info.title,
|
|
|
value: info.value
|
|
value: info.value
|
|
|
};
|
|
};
|
|
|
- if (this.state.cIndex == 1) {
|
|
|
|
|
|
|
+ if (info.value == PAYTYPE.CREDIT_WALLET) {
|
|
|
goBack();
|
|
goBack();
|
|
|
} else {
|
|
} else {
|
|
|
const amount = this.state.amountList[this.state.selectIndex].amount;
|
|
const amount = this.state.amountList[this.state.selectIndex].amount;
|
|
@@ -215,7 +216,7 @@ export default class PaymentMethod extends Component {
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
</View>
|
|
</View>
|
|
|
- { (this.state.cIndex == (this.ENABLE_2C2P ? 0 : 1)) &&
|
|
|
|
|
|
|
+ { (this.state.cIndex == (this.FirstPayPerUse ? 0 : 1)) &&
|
|
|
<View style={[styles.optionView, ui.flex1]}>
|
|
<View style={[styles.optionView, ui.flex1]}>
|
|
|
<WalletTitle>Pay Per Use</WalletTitle>
|
|
<WalletTitle>Pay Per Use</WalletTitle>
|
|
|
<Text style={styles.subTitle}>Choose Amount:</Text>
|
|
<Text style={styles.subTitle}>Choose Amount:</Text>
|