当我使用@philly25/react-native-paytm中的代码时,我在控制台中没有定义
请帮助
componentDidMount() {
Paytm.addListener(Paytm.Events.PAYTM_RESPONSE, this.onPayTmResponse());
}
componentWillUnmount() {
Paytm.removeListener(Paytm.Events.PAYTM_RESPONSE, this.onPayTmResponse());
}
onPayTmResponse = (resp) => {
console.log("hi " + resp); // here getting undefined
}发布于 2021-07-07 18:56:39
我认为代码应该如下所示:
componentDidMount() {
Paytm.addListener(Paytm.Events.PAYTM_RESPONSE, this.onPayTmResponse);
}
componentWillUnmount() {
Paytm.removeListener(Paytm.Events.PAYTM_RESPONSE, this.onPayTmResponse);
}
onPayTmResponse = (resp) => {
console.log("hi " + resp); // here getting undefined
}有关更多信息,请查看官方软件包文档。
发布于 2021-07-29 08:25:00
这不是Paytm官方代码,请使用Paytm github链接上的插件。欲了解更多信息,请访问Paytm开发者门户
https://stackoverflow.com/questions/68284624
复制相似问题