Merge pull request #6808 from andrewpbrett/authorize-payment-links

Allow a customer to perform further action for a Stripe payment if needed (#4181)
This commit is contained in:
Andy Brett
2021-02-17 10:17:51 -08:00
committed by GitHub
8 changed files with 111 additions and 3 deletions

View File

@@ -16,7 +16,7 @@ module Api
end
def payments
object.payments.joins(:payment_method).completed
object.payments.joins(:payment_method).where('state IN (?)', %w(completed pending))
end
def shop_id

View File

@@ -1,6 +1,6 @@
module Api
class PaymentSerializer < ActiveModel::Serializer
attributes :amount, :updated_at, :payment_method, :state
attributes :amount, :updated_at, :payment_method, :state, :cvv_response_message
def payment_method
object.payment_method.try(:name)