mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-25 05:45:15 +00:00
add authorize link to transactions page
This commit is contained in:
@@ -16,7 +16,7 @@ module Api
|
||||
end
|
||||
|
||||
def payments
|
||||
object.payments.joins(:payment_method).completed
|
||||
object.payments.joins(:payment_method).valid
|
||||
end
|
||||
|
||||
def shop_id
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
%td.order3.show-for-large-up
|
||||
%i{"ng-class" => "{'ofn-i_012-warning': payment.state == 'invalid' || payment.state == 'void' || payment.state == 'failed'}"}
|
||||
%span{"ng-bind" => "::'spree.payment_states.' + payment.state | t | capitalize"}
|
||||
%span{"ng-if" => "payment.cvv_response_message.length > 0" }
|
||||
%a{"ng-href" => "{{payment.cvv_response_message}}", "ng-bind" => "::'spree.payment_states.authorise' | t | capitalize" }
|
||||
%td.order4.show-for-large-up
|
||||
%td.order5.text-right{"ng-class" => "{'credit' : payment.amount > 0, 'debit' : payment.amount < 0, 'paid' : payment.amount == 0}","ng-bind" => "::payment.amount | localizeCurrency"}
|
||||
%td.order6.show-for-large-up
|
||||
|
||||
@@ -3620,6 +3620,7 @@ See the %{link} to find out more about %{sitename}'s features and to start using
|
||||
processing: processing
|
||||
void: void
|
||||
invalid: invalid
|
||||
authorise: authorise
|
||||
order_mailer:
|
||||
cancel_email:
|
||||
customer_greeting: "Dear %{name},"
|
||||
|
||||
Reference in New Issue
Block a user