Title: HTML Code not working &#8211; Generating error
Last modified: July 21, 2022

---

# HTML Code not working – Generating error

 *  [mb299](https://wordpress.org/support/users/mb299/)
 * (@mb299)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/html-code-not-working-generating-error/)
 * Hello,
 * This is the code generated by a payment gateway which i am trying to embed on
   my website.
    <form><script src=”[https://checkout.razorpay.com/v1/payment-button.js&#8221](https://checkout.razorpay.com/v1/payment-button.js&#8221);
   data-payment_button_id=”pl_Jw2puYjZN9Yy7S” async=””> </script> </form>
 * However, the button doesn’t show up and instead it gives me an error “Payment
   Button is not added. Add Button script inside ‘form’ tag”. And when you press“
   OK” on this popup, it says “Payment Button cannot be added. Provide a valid payment
   button id”
 * I tried the above HTML code on w3sch00ls.com and it worked perfectly, Can somee
   help me resolve this please?
 * Thank you
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fhtml-code-not-working-generating-error%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [George Appiah](https://wordpress.org/support/users/gappiah/)
 * (@gappiah)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/html-code-not-working-generating-error/#post-15847736)
 * I put your code in a **Custom HTML block** on a sandbox WP 6.0.1 site (default
   theme, no plugin active)… and the payment button appeared right away, with no
   alert pop-up.
 * _Something_ on your site is causing a conflict, not WordPress.
 * ![](https://i0.wp.com/i.snipboard.io/YEsX3r.jpg?ssl=1)
 *  [George Appiah](https://wordpress.org/support/users/gappiah/)
 * (@gappiah)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/html-code-not-working-generating-error/#post-15847779)
 * > Something on your site is causing a conflict, not WordPress.
 * Indeed, and it seems to be cache-related.
 * If I add a random query parameter to the URL (thereby bypassing the cache), the
   page loads with the payment button, and there’s no alert pop-up message.
 * Try: [https://www.thetrainernetwork.in/featured-listing-plans/?gcxjDAWLH](https://www.thetrainernetwork.in/featured-listing-plans/?gcxjDAWLH)
 * ![](https://i0.wp.com/i.snipboard.io/T4LnSw.jpg?ssl=1)
 *  Thread Starter [mb299](https://wordpress.org/support/users/mb299/)
 * (@mb299)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/html-code-not-working-generating-error/#post-15847925)
 * [@gappiah](https://wordpress.org/support/users/gappiah/) Thanks George
 * I figured out that its the cache problem. I am using WP Rocket and now i have
   included this URL to “Never Cache this Page” & it worked.
 * Though there has to be a better solution than “Not Caching”
 * Regards
    Manish

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘HTML Code not working – Generating error’ is closed to new replies.

## Tags

 * [button](https://wordpress.org/support/topic-tag/button/)
 * [html](https://wordpress.org/support/topic-tag/html/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [mb299](https://wordpress.org/support/users/mb299/)
 * Last activity: [3 years, 10 months ago](https://wordpress.org/support/topic/html-code-not-working-generating-error/#post-15847925)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
