Skip to content

This code needs to be refactored #3

@adonese

Description

@adonese

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);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions