Skip to content

Commit

Permalink
Merge branch 'master' of github.com:pay-rails/pay
Browse files Browse the repository at this point in the history
  • Loading branch information
excid3 committed Apr 18, 2023
2 parents 7b2f8a3 + 59728b6 commit 29fc5d7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/2_configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,15 @@ Pay.setup do |config|
config.enabled_processors = [:stripe, :braintree, :paddle]
# All emails can be configured independently as to whether to be sent or not. The values can be set to true, false or a custom lambda to set up more involved logic. The Pay defaults are show below and can be modified as needed.
config.emails.payment_action_required = true
config.emails.payment_failed = true
config.emails.receipt = true
config.emails.refund = true
# This example for subscription_renewing only applies to Stripe, therefor we supply the second argument of price
config.emails.subscription_renewing = ->(pay_subscription, price) {
(price&.type == "recurring") && (price.recurring&.interval == "year")
}
config.emails.subscription_trial_will_end = true
config.emails.subscription_trial_ended = true

# Customize who receives emails. Useful when adding additional recipients other than the Pay::Customer. This defaults to the pay customer's email address.
# config.mail_to = ->(mailer, params) { "#{params[:pay_customer].customer_name} <#{params[:pay_customer].email}>" }
Expand Down

0 comments on commit 29fc5d7

Please sign in to comment.