Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This code needs to be refactored #3

Open
adonese opened this issue Oct 7, 2020 · 0 comments
Open

This code needs to be refactored #3

adonese opened this issue Oct 7, 2020 · 0 comments

Comments

@adonese
Copy link
Owner

adonese commented Oct 7, 2020

Hey @ahmadadlan11, would you look at this issue please?

We want to refactor this code to become our standard internet payment service.

donates/src/App.js

Lines 37 to 64 in 0631163

class DataForm extends React.Component {
constructor(props) {
super(props);
this.state = {
value: '',
username: '',
error: false,
success: false,
message: '',
passedAmount: qs.parse(window.location.search, {ignoreQueryPrefix: true})["amount"],
id: qs.parse(window.location.search, {ignoreQueryPrefix: true})["id"],
token: qs.parse(window.location.search, {ignoreQueryPrefix: true})["token"],
pin: "", pan: "", amount: this.passedAmount, expDate: "", open: true, disabled: false, selectedMoment: this.props.value
};
// console.log("the id is: ", id)
// console.log("the id parsed is: ", id["q"])
console.log("the query param is: ", this.state.id)
// console.log("the query param is: ", this.state.id["q"])
this.handleSubmit = this.handleSubmit.bind(this);
this.handleChangePin = this.handleChangePin.bind(this);
this.handleChangeAmount = this.handleChangeAmount.bind(this);
this.handleChangeExpDate = this.handleChangeExpDate.bind(this);
this.handleChangePan = this.handleChangePan.bind(this);
this.handleClose = this.handleClose.bind(this);
this.handleChangeDonors = this.handleChangeDonors.bind(this);
this.cancel = this.cancel(this);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant