Closed ashok23489 closed 4 years ago
Closing this due to no activity. However, if issue still persists, kindly write a mail to techsupport@payumoney.com
I could not able to call my Update method from the bolt responseHandler:, please help me on this issue.
Angular 6:
Error: core.js:1673 ERROR TypeError: this.updatePaymentInfo is not a function at Object.responseHandler
Please find the below code:
launchBOLT(paymentRequest) { bolt.launch( { 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 }, { responseHandler: function(BOLT) { if (BOLT.response.txnStatus != "CANCEL") { this.paymentGatewayResponse = BOLT.response; this.updatePaymentInfo(this.paymentGatewayResponse); } else { alert(BOLT.response); } return BOLT.response; }, catchException: function(BOLT) { alert(BOLT.message); } } );
}
@ashok23489 @sreeraj-ms Convert your responseHandlers to arrow functions, its the easiest solution to this problem.
I could not able to call my Update method from the bolt responseHandler:, please help me on this issue.
Angular 6:
Error: core.js:1673 ERROR TypeError: this.updatePaymentInfo is not a function at Object.responseHandler
Please find the below code:
launchBOLT(paymentRequest) { bolt.launch( { 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 }, { responseHandler: function(BOLT) { if (BOLT.response.txnStatus != "CANCEL") { this.paymentGatewayResponse = BOLT.response; this.updatePaymentInfo(this.paymentGatewayResponse); } else { alert(BOLT.response); } return BOLT.response; }, catchException: function(BOLT) { alert(BOLT.message); } } );
}