Closed brunomrosa closed 3 years ago
Hey @theoriginalkaiju, if you check on the /create_preference
route, the /feedback
endpoint is used as return url, and works as reference for the developer, to check what params are returning by MP depending of the payment status; you can set any other url or customize the current endpoint depending of your requirements.
Regarding your second question, script.dataset.preferenceId = preference;
allows to the embedded script to access to the linked data, in this case the preference Id.
Dataset api reference: https://developer.mozilla.org/en-US/docs/Web/API/HTMLOrForeignElement/dataset
What is the purpose of the route on the nodejs server? It only returns what is send on the query params. I plan to use React on the frontend soo, can someone explain what does the line below does?
script.dataset.preferenceId = preference;