FIxing card number error

This commit is contained in:
Brice Zele 2020-05-25 16:41:02 +01:00
parent 52b1ed736c
commit 081490667b
2 changed files with 4 additions and 3 deletions

View File

@ -219,7 +219,7 @@ class WalletDepot extends Component {
});
this.props.walletCommissionAmountReset();
this.props.depositAction({
numCarte: parseInt((this.state.creditCardInput.values.number).replace(/ /g, ' ')),
numCarte: this.state.creditCardInput.values.number.replace(/\s/g, ''),
cvv: this.state.creditCardInput.values.cvc,
expiration_date: this.state.creditCardInput.values.expiry,
type: "credit",
@ -339,6 +339,7 @@ class WalletDepot extends Component {
}
render() {
console.log("STATE", this.state);
const { resultGetCommission } = this.props;
return (
<View style={[styles.container]}>

View File

@ -220,7 +220,7 @@ class WalletRetrait extends Component {
});
this.props.walletCommissionAmountReset();
this.props.depositAction({
numCarte: parseInt((this.state.creditCardInput.values.number).replace(/ /g, ' ')),
numCarte: this.state.creditCardInput.values.number.replace(/\s/g, ''),
cvv: this.state.creditCardInput.values.cvc,
expiration_date: this.state.creditCardInput.values.expiry,
type: "debit",
@ -340,8 +340,8 @@ class WalletRetrait extends Component {
}
render() {
console.log("STATE", this.state);
const { error, resultGetCommission } = this.props;
return (
<View style={[styles.container]}>