diff --git a/src/common/pages/Vouchers/Checkout/index.js b/src/common/pages/Vouchers/Checkout/index.js
index 96ebeaa..0657c6c 100644
--- a/src/common/pages/Vouchers/Checkout/index.js
+++ b/src/common/pages/Vouchers/Checkout/index.js
@@ -93,7 +93,7 @@ export default class CheckoutVouchers extends React.Component {
diff --git a/src/common/pages/Vouchers/Modal/index.js b/src/common/pages/Vouchers/Modal/index.js
index e29108e..6d271ad 100644
--- a/src/common/pages/Vouchers/Modal/index.js
+++ b/src/common/pages/Vouchers/Modal/index.js
@@ -18,7 +18,8 @@ export default class ModalVouchersComponent extends React.Component {
selectedOption: '',
hidden:'inline',
skuName:'',
- skuPrice:'0'
+ skuPrice:'0',
+ buttonDisbaled:true
};
this.defaultState = Object.assign({}, this.state);
this.http = props.appstate.http;
@@ -94,7 +95,8 @@ export default class ModalVouchersComponent extends React.Component {
console.log(points[0].price,'points',points[0].name);
this.setState({
skuName :points[0].name,
- skuPrice : points[0].price
+ skuPrice : points[0].price,
+ buttonDisbaled:false
})
}
}
@@ -103,7 +105,7 @@ export default class ModalVouchersComponent extends React.Component {
}}
>
{data.sku.map((item, index) => {
- return
+ return
// return
})}
@@ -111,7 +113,7 @@ export default class ModalVouchersComponent extends React.Component {
(
@@ -124,7 +126,7 @@ export default class ModalVouchersComponent extends React.Component {
history.push(LINKS.VERIFY_VOUCHERS);
}
}
- type="primary" size={"large"} block>Buy
+ type="primary" disabled={this.state.buttonDisbaled} size={"large"} block>Buy
)} />
diff --git a/src/common/pages/Vouchers/Payment/index.js b/src/common/pages/Vouchers/Payment/index.js
index a382fcd..bb07b40 100644
--- a/src/common/pages/Vouchers/Payment/index.js
+++ b/src/common/pages/Vouchers/Payment/index.js
@@ -46,7 +46,7 @@ export default class PaymentVouchers extends React.Component {
});
};
- const price = this.vouchersStore.skuPrice;
+ const price = (+this.vouchersStore.skuPrice).toFixed(0);
const qty = 1;
const total = price * qty;
@@ -128,12 +128,8 @@ export default class PaymentVouchers extends React.Component {
this.vouchersStore.buyVoucher(this.vouchersStore.skuId)
.then(res => {
this.globalUI.hideDialogLoading();
- this.props.history.push(LINKS.VOUCHERS)
+ this.props.history.push(LINKS.TRANSACTION)
openNotificationWithIcon('success')
- // this.globalUI.openSnackbar("Success Added New Store");
- // this.setState({
- // stepIndex: 0
- // })
})
.catch(err => {
this.globalUI.openSnackbar(err.message);