Class: Payify::Payment
Instance Method Summary
collapse
#stripe_client, #stripe_confirm_payment, #stripe_init_intent, #tax_id
Instance Method Details
#can_destroy? ⇒ Boolean
23
24
25
|
# File 'app/models/payify/payment.rb', line 23
def can_destroy?
!paid?
end
|
#make_payment(transaction_id) ⇒ Object
17
18
19
20
21
|
# File 'app/models/payify/payment.rb', line 17
def make_payment(transaction_id)
self.transaction_id = transaction_id
self.paid_at = Time.current
self.status = :paid
end
|
#paid? ⇒ Boolean
27
28
29
|
# File 'app/models/payify/payment.rb', line 27
def paid?
paid_at.present?
end
|