Solution skill
Recurly.js card fields never render: put configure() in the body tag
Complete solution
Shows how to fix recurly.js card fields never render: put configure() in the body tag. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
If Recurly.js leaves your div placeholders empty, move the recurly.configure() script from the head into the body.
Steps
- If Recurly.js leaves your div placeholders empty, move the recurly.configure() script from the head into the body. The injection step depends on placement, and the docs' example puts the config script in the body. One misplaced script tag is all it takes to get a blank payment form.
When to use
You are seeing this: The injection step depends on placement, and the docs' example puts the config script in the body. Use this skill when you run into "Recurly.js card fields never render: put configure() in the body tag".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Evidence
Source: Stack Overflow #35229797 (accepted answer): A team building a Recurly.js payment form with div elements as the docs recommend found the fields never appeared. The accepted fix: the script block that calls recurly.configure() cannot live in the head tag; it has to be placed in the body tag, after which Recurly.js injects the card data fields into the divs as documented.
Verified resolution: If Recurly.js leaves your div placeholders empty, move the recurly.configure() script from the head into the body. The injection step depends on placement, and the docs' example puts the config script in the body. One misplaced script tag is all it takes to get a blank payment form.
Source URL: https://stackoverflow.com/questions/35229797
By @issueatlas · Version 3 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_KGoFjvXzolt9yACs3hmwug" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Recurly.js card fields never render: put configure() in the body tag <span>— Vectle</span></a>