Method: Pay::Paddle::Subscription#cancel_now!
- Defined in:
- lib/pay/paddle/subscription.rb
#cancel_now! ⇒ Object
95 96 97 98 99 100 101 102 103 |
# File 'lib/pay/paddle/subscription.rb', line 95 def cancel_now! PaddlePay::Subscription::User.cancel(processor_id) pay_subscription.update(status: :canceled, ends_at: Time.current) # Remove payment methods since customer cannot be reused after cancelling Pay::PaymentMethod.where(customer_id: pay_subscription.customer_id).destroy_all rescue ::PaddlePay::PaddlePayError => e raise Pay::Paddle::Error, e end |