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