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

Fixed issue 24 where publishable-key could not be loaded from control… #27

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MileanCo
Copy link

…ler settings

Fixes simply by adding a short $timeout that waits for the {{ }} variables to finish resolving.

@MileanCo
Copy link
Author

Any update here @tobyn ??

@tobyn
Copy link
Owner

tobyn commented Oct 25, 2017

I'm not likely to add a random $timeout to this library for no good reason. Give me a concise test case (or a decent explanation as to why this is a problem with the library rather than your app), and I'll be happy to merge your PR.

@MileanCo
Copy link
Author

MileanCo commented Oct 27, 2017

I agree with you, but this is the only fix right now for using a publishable_key from $scope (instead of embedding it in the HTML code). The reason we have this in $scope is because we want different Stripe Keys in DEBUG (test) and PRODUCTION (live) environments.

The issue is documented here #21
My theory is that with a very short timeout (50ms - can probably get away with even less, like 15ms or something), the angular $scope has time to register the {{publishable_key}} with the real value.

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

Successfully merging this pull request may close these issues.

2 participants