3

Recurly instructions on how to build a form

Github repository that demonstrates the problem.

My form:

<form id="recurly_form">

          <div data-recurly="number"></div>
          <div data-recurly="month"></div>
          <div data-recurly="year"></div>
          <div data-recurly="cvv"></div>
          <button onClick={this.handleFormSubmit} >
            Place order
          </button>
        </form>

I make every attempt to make sure the configure call is made after everything is mounted and ready:

componentDidMount() {
    $(() => {
      window.recurly.configure({
        publicKey: "ewr1-xxxxxxxxxxxxxxxxx"
      });
    });
  }

The end result is a tall blank screen with a button: What the user sees

Markup looks like this: Recurly generated markup

Note that the month field is set to visibility:hidden. Also note that the <div data-recurly="number"></div> is empty. That is the result of me trying to style it with the styles offered in the instructions.

Please advise on what's missing.

Alex Polkhovsky
  • 3,340
  • 5
  • 29
  • 37
  • 1
    Reply from support: "Since integrating the React framework with Recurly.js is generally unsupported and out of our scope, I recommend [that] you try to mimic the GitHub examples, to see if you can successfully integrate that code with React." – Alex Polkhovsky Jul 05 '17 at 18:00
  • It would be good to have a proper React integration. I wonder if they will ever come round to it. – Ben May 04 '19 at 10:51

0 Answers0