Uncaught ReferenceError: [function] is not defined #10277
Replies: 1 comment
-
I have made the function global by declaring it as window.culqi = function. Additionally, I had to add a method to close the modal. This functionality that should happen automatically is also broken since the Culqi object is not global either. The final code looked like this:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to implement Culqi, Peru's payment gateway in my Vue 3 application according to its documentation (in Spanish).
I have created a very simple component for my tests:
When the button is clicked the payment gateway modal opens.
You can use the following test card to simulate a payment
The payment gateway should return a token to the culqi function, but I get the following error
I have tried placing the culqi function inside <script> tags directly in my index.html document and it works fine without problems. However, I need it inside my component to process the payment.
I get the impression that the culqi function is not available globally so it seems that it is not defined.
What can I do?
Beta Was this translation helpful? Give feedback.
All reactions