Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple Payment Form Documentation #4

Open
tiffanywang3 opened this issue Jun 3, 2016 · 3 comments
Open

Multiple Payment Form Documentation #4

tiffanywang3 opened this issue Jun 3, 2016 · 3 comments

Comments

@tiffanywang3
Copy link

Documentation should explain the need for a unique iFrame initialization script tag for each new iFrame instance and explicitly state the options object to pass to Spreedly.init().

e.g.

<script
      id="spreedly-iframe-1"
      data-environment-key="SPREEDLY_ENV_KEY"
      data-number-id="spreedly-number-1"
      data-cvv-id="spreedly-cvv-1">
</script>
<script
      id="spreedly-iframe-2"
      data-environment-key="SPREEDLY_ENV_KEY"
      data-number-id="spreedly-number-2"
      data-cvv-id="spreedly-cvv-2">
</script>
<script>
Spreedly.init(SPREEDLY_ENV_KEY, {
    numberEl: 'spreedly-number-1',
    cvvEl: 'spreedly-cvv-1'
  });
let otherSpreedlyInstance = new SpreedlyPaymentFrame();
otherSpreedlyInstance.init(SPREEDLY_ENV_KEY, {
    numberEl: 'spreedly-number-2',
    cvvEl: 'spreedly-cvv-2'
});
</script>
@rwdaigle
Copy link
Contributor

rwdaigle commented Jun 6, 2016

Hi @tiffanywang3! Thanks for submitting this issue.

So documentation and sample apps are a sticky subject. I would say that sample apps should not be the place where docs exist for all cases (the multiple iframe case being an edge-case). Instead, you should refer to our iFrame docs for that level of detail.

Or perhaps you're saying we don't document the multi-iframe use-case anywhere (I'm having trouble finding it myself on docs.spreedly.com)?

@tiffanywang3
Copy link
Author

Hi @rwdaigle! Thanks for addressing the issue I opened. I agree, I don't think that the sample app is the best place the put documentation for multi-iframe use-case. I just personally found the existing multi-iframe docs a little lacking. Just thought it might be helpful to include a little more information for people to reference :)

@rwdaigle
Copy link
Contributor

rwdaigle commented Jun 6, 2016

I agree, @tiffanywang3, thanks!

We really need to take another pass at our iFrame docs as they're getting a bit unwieldy, as well as better address these alternative workflows.

I'll create an internal issue for our doc site, but will leave this open until it's been addressed. Thank you for the suggestion, Tiffany!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants