【发布时间】:2020-08-08 21:36:56
【问题描述】:
我无法从 bolt responseHandler 调用我的 Update 方法:请帮助我解决这个问题。
角度 9:
错误:core.js:1673 错误类型错误:this.updatePaymentInfo 不是 Object.responseHandler 处的函数
updatePaymentInfo() 在同一个 ts 文件中声明。
请找到以下代码:
var RequestData={
key: paymentRequest.key,
txnid: paymentRequest.txnId,
hash: paymentRequest.hash,
amount: paymentRequest.amount,
firstname: paymentRequest.firstName,
email: paymentRequest.email,
phone: paymentRequest.phone,
productinfo: paymentRequest.productInfo,
udf1: paymentRequest.udf1,
surl: paymentRequest.sUrl,
furl: paymentRequest.fUrl
}
var Handlers={
responseHandler: function(BOLT) {
if (BOLT.response.txnStatus != "CANCEL") {
this.updatePaymentInfo(BOLT.response);
}
else {
alert(BOLT.response);
}
return BOLT.response;
},
catchException: function(BOLT) {
alert(BOLT.message);
}
}
launchBOLT(paymentRequest) {
bolt.launch(RequestData,Handlers);
}
【问题讨论】:
标签: angular scope closures payumoney