You are trying to mix concerns. The handler code should need to know or care about the stripe object’s dependencies. The handler should simply ask WireBox to inject stripe and that’s it-- let stripe handle its own dependencies.
You may noticed I omitted the “model:” part too as that is the default injection DSL namespace.
So, the easiest thing to do in my opinion is add this to your stripe.cfc:
This will tell WireBox that any time it creates a Stripe instance, to inject the setting. There is no limit to the depth of the potential dependency tree.
Note, “variables.testKey” won’t be available in your init, but it will be available in your onDIComplete() method. If you insist on using constructor injection, then add this to your Stripe’s init() method:
WireBox will automatically pass the testKey into you rinit for you.