# Drop-in: dwolla-business-vcr renders with "undefined"

**URL:** <https://discuss.dwolla.com/t/drop-in-dwolla-business-vcr-renders-with-undefined/6907>\
**Category:** Customers\
**Created:** [March 29, 2021, 3:02pm UTC](https://discuss.dwolla.com/t/drop-in-dwolla-business-vcr-renders-with-undefined/6907 "2021-03-29T15:02:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bedwards](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/bedwards/32/2951_2.png) [@bedwards](https://discuss.dwolla.com/u/bedwards)\
**Post date:** [March 29, 2021, 3:02pm UTC](https://discuss.dwolla.com/t/drop-in-dwolla-business-vcr-renders-with-undefined/6907/1 "2021-03-29T15:02:13Z")

</div>

I am working locally with drop-in components for business registration, specifically the `<dwolla-business-vcr>` component.

I have a problem, it initially renders with an “undefined” error message:  
 ![image](https://global.discourse-cdn.com/dwolla/original/2X/8/8112a65d97590a8e82415a4ec08b47a6e59bd96d.png)

There is no indication, that I can see, as to why there is the “undefined” error message or what it relates to. The configuration is as follows:

> ```
> <script type="text/javascript">
> dwolla.configure({
> environment: "sandbox",
> tokenUrl: "/dwolla/token",
> success: (res) => console.log(JSON.stringify(res)),
> error: (err) => alert(err)
> });
> </script>
> 
> ```

and

> ```
> <dwolla-business-vcr
> terms=”http://dev.whatever.com:9090/terms”
> privacy=”http://dev.whatever.com:9090/privacy”>
> </dwolla-business-vcr>
> 
> ```

Even with the “undefined” message, the component seems to function mostly normal, until you get to the end of the multi-step process and the submission fails with a 401. But I guess I’m looking to solve the “undefined” problem first…

TLDR: Why does the `<dwolla-business-vcr>` drop-in component render with “undefined” at the top?

---

<div class="post-metadata">

**Author:** ![ReactDev55](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/reactdev55/32/3002_2.png) [@ReactDev55](https://discuss.dwolla.com/u/ReactDev55)\
**Post date:** [May 8, 2021, 12:16am UTC](https://discuss.dwolla.com/t/drop-in-dwolla-business-vcr-renders-with-undefined/6907/2 "2021-05-08T00:16:25Z")

</div>

I have the same problem, did you find a solution?

---

<div class="post-metadata">

**Author:** ![ReactDev55](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/reactdev55/32/3002_2.png) [@ReactDev55](https://discuss.dwolla.com/u/ReactDev55)\
**Post date:** [May 11, 2021, 1:09am UTC](https://discuss.dwolla.com/t/drop-in-dwolla-business-vcr-renders-with-undefined/6907/3 "2021-05-11T01:09:05Z")

</div>

If you’re using React, copy the [useScript hook](https://usehooks.com/useScript/) and then configure and load `<dwolla-business-vcr />` when the script is `"ready"`.

```auto
export default function DwollaForm({ dwollaConfig }: IProps): ReactElement {
  const status = useScript("https://cdn.dwolla.com/v2/dwolla-web.js");

  if (status === "ready") {
    window.dwolla.configure(dwollaConfig);
  }

  return (
    <>
      {status === "ready" && (
        <dwolla-business-vcr
          terms="www.yourterms.com"
          privacy="www.yourprivacy.com"
        />
      )}
    </>
  );
}

```

---

<div class="post-metadata">

**Author:** ![kmoreira](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/kmoreira/32/2718_2.png) [@kmoreira](https://discuss.dwolla.com/u/kmoreira)\
**Post date:** [May 12, 2021, 9:17pm UTC](https://discuss.dwolla.com/t/drop-in-dwolla-business-vcr-renders-with-undefined/6907/4 "2021-05-12T21:17:56Z")

</div>

Hi guys

I just tried to recreate this error, and I was able to do it by:

1. not passing in my key and secret
2. creating an environment mismatch

Can you try passing in your key and secret in relation to the environment you’re trying to work in (prod, or sandbox)?

Let me know if this helps
