def subscription_payment_succeeded(customer_param)
      return true unless EffectiveOrders.mailer[:send_subscription_payment_succeeded]

      @customer = (customer_param.kind_of?(Effective::Customer) ? customer_param : Effective::Customer.find(customer_param))
      @subscriptions = @customer.subscriptions
      @user = @customer.user

      @subject = subject_for(@customer, :subscription_payment_succeeded, 'Thank you for your payment')

      mail(to: @customer.user.email, subject: @subject)
    end
def subscription_payment_succeeded(customer_param)
      return true unless EffectiveOrders.mailer[:send_subscription_payment_succeeded]

      @customer = (customer_param.kind_of?(Effective::Customer) ? customer_param : Effective::Customer.find(customer_param))
      @subscriptions = @customer.subscriptions
      @user = @customer.user

      @subject = subject_for(@customer, :subscription_payment_succeeded, 'Thank you for your payment')

      mail(to: @customer.user.email, subject: @subject)
    end
Sent by the invoice.payment_succeeded webhook event