richnologies / ngx-stripe

Angular 6+ wrapper for StripeJS
MIT License
219 stars 77 forks source link

Question of stripe public key management #144

Closed sebyoga closed 3 years ago

sebyoga commented 3 years ago

Hello @richnologies,

Your module works perfectly, however, I have a small question.

My client has one stripe account, but several sub-entities and therefore several sub-accounts.

Considering that the key is imported globally on the angular application, what is the way to be able to define it at the funnel of the payment (it is a choice present during the payment funnel...).

Thanks a lot for your answer,

Have a nice day, Sébastien

richnologies commented 3 years ago

Hi @sebyoga,

Thanks for the feedback.

Importing the key globally is the default way since is by far the most common scenario.

For cases like yours we have another service called StripeFactory. Check the example bellow, and please notice a few things

https://docs.ngx-stripe.dev/core-concepts/service-factory

If you have any questions, please let me know.

R

sebyoga commented 3 years ago

Hi @richnologies,

Thank you for the quick response, it is much appreciated.

After various tests, everything seems to work perfectly. Thank you very much!

Have a nice day, Sébastien