0

enter image description here

How to call order function from successCallback ? The code is vuejs

1 Answer 1

1

Would be easier if the code you posted would be complete but my guess is:

Use arrow functions

var successCallback = payment_id => {
    // now "this" refers to this vue component instance so:
    this.order()
}

or store reference to this and use it like a variable

var that = this
var successCallback = function (payment_id) {
    // this is *this* function
    // "that" is a vue instance
    that.order()
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.