lib/pay/paddle/subscription.rb in pay-4.1.1 vs lib/pay/paddle/subscription.rb in pay-4.2.0

- old
+ new

@@ -105,16 +105,16 @@ def on_grace_period? canceled? && Time.current < ends_at || paused? && Time.current < paddle_paused_from end def paused? - paddle_paused_from.present? + pay_subscription.status == "paused" end def pause attributes = {pause: true} response = PaddlePay::Subscription::User.update(processor_id, attributes) - pay_subscription.update(paddle_paused_from: Time.zone.parse(response.dig(:next_payment, :date))) + pay_subscription.update(status: :paused, paddle_paused_from: Time.zone.parse(response.dig(:next_payment, :date))) rescue ::PaddlePay::PaddlePayError => e raise Pay::Paddle::Error, e end def resume