Start a new topic

Checkout popup callback

Hi, 
I am using this code but won't able to get response.

Chargebee.getInstance();
Chargebee.registerAgain();Chargebee.getInstance().setCheckoutCallbacks(function() {
  // you can define a custom callbacks based on cart object
return {
loaded: function() {
console.log("checkout opened");
},
close: function() {
console.log("checkout closed");
},
success: function(hostedPageId) {
},
step: function(value) {
// value -> which step in checkout
console.log(value);
}
}
}); Can't see any console ccan you guide me why?
OR is there any other way to get response from script like I am doing work https://www.chargebee.com/checkout-portal-docs/drop-in-integration.html#generating-the-script

1 Comment

Hey Yasir,


Thanks for reaching out to us.


We would suggest that you use the function, setCheckoutCallbacks(function(cart) in place of the setCheckoutCallbacks(function(), to make this code work. Do refer here to know more about this. This should help in creating the console, if not, then do let us know.


Hope this helps!



Login or Signup to post a comment