-
Notifications
You must be signed in to change notification settings - Fork 23
В некоторых проектах (SaaS) может быть несколько подключений к CloudPayments #16
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
base: master
Are you sure you want to change the base?
Conversation
#### Local configuration: | ||
|
||
```ruby | ||
config = CloudPayments::Config.configure do |c| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Я бы предложил более нативный вариант:
config = CloudPayments::Config.new do |c|
c.bla_bla_bla ...
end
и CloudPayments::Config.new(hash)
и CloudPayments::Config.new(file_name)
ну и комбинированный вариант
config = CloudPayments::Config.new(hash_or_string) do |c|
c.bla_bla_bla ...
end
То есть если передан hash
, то используем его в качестве конфига, если передана строка, то используем ее в как имя YAML
файла в котором лежит кофиг
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
config = CloudPayments::Config.new
Не хотелось бы менять API уже существующего класса (который работает до нашего PR). Именно поэтому я добавил отдельный метод configure
иначе этот gem потеряет обратную совместимость.
этот функционал нужен |
@unloved привет ) |
опечатка для вебхуков тоже надо ридми дополнить наверное |
Я не в состоянии больше поддерживать этот гем. Прощу прощения. |
Мы добавили поддержку локальной конфигурации с похожим интерфейсом в форк: https://github.com/platmart/cloud_payments#local-configuration |
Делаем возможность указать индивидуальный конфиг для Client и Webhooks