There are two things that need to be changed.
-
You need to replace “value” and “myButton” with the names you are using. Those are just placeholders that I used. It looks like you’re using the name “charge” which is what you will need to use for the value. You need to replace myButton with the name in the properties panel.
-
The createMyPayment function needs to be placed in a jsw file in the backend.
There is more information here: https://www.wix.com/corvid/reference/wix-pay.html#startPayment