This repository has been archived by the owner on Feb 24, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Class object "this" is null in paytm successCallback function #41
Comments
@manojbharti please check below code
|
@remorr25 Thank you... |
@remorr25 I want to call my API from inside successCallback and errorCallback but I am not able to get my ionic 5 angular 10 component reference with in this plugin function how I get that reference. I am a beginner in angular 2 and above. |
@Dipak26 paste your code here. |
Thanks, @manojbharti for the quick reply but I tried and solve the problem. I pass the component reference and use that. |
@Dipak26 Great... |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
@ArunYogi I have integrated this plugin in my ionic-5 App and it is working fine but after successful payment I need to save transaction detail into database by calling my backend API. Posting successCallback function below...
successCallback(response) {
console.log("........", response)
if (response.STATUS == "TXN_SUCCESS") {
var txn_id = response.TXNID;
var paymentmode = response.PAYMENTMODE;
console.log("txn_id => ", txn_id);
this.paytmTransaction();
} else {
alert("Transaction Failed for reason " + response.RESPMSG);
}
}
I am calling this.paytmTransaction(); function after succesfull payment but I am getting error in console ==> TypeError: Cannot read property 'paytmTransaction' of null
class object "this" is null in successCallback function, please let me know what i am missing here.
The text was updated successfully, but these errors were encountered: