In a form of payment it is very delicate, so for this type of work, does validacion missing on both sides of the page, in the part of the server with php. as on the client side with javascript, this way we can avoid that there may be manipulation of code on the client side. since everything is validated again to reach the server with php code, so we can send a sample of code, you need to know the product and form, as it will work based on that form.