implement paid cancel

This commit is contained in:
Oleg Hasjanov 2021-04-22 11:49:30 +03:00
parent a1c38fb1cc
commit af8bc41556
4 changed files with 29 additions and 0 deletions

View file

@ -293,6 +293,9 @@ en:
record_deleted: 'Record deleted'
failed_to_delete_record: 'Failed to delete record'
payment_was_cancelled: 'Payment was cancelled'
failed_to_payment_cancel: 'Failed to payment cancel'
authentication_error: 'Authentication error'
sign_in_cancelled: "Sign in cancelled"
@ -601,6 +604,7 @@ en:
no_transfers_found: 'No transfers found'
parameter_value_range_error: 'Parameter value range error: %{key}'
payment_received: 'Payment received'
cancel_payment: 'Cancel Payment'
api_user_not_found: 'API user not found'
notes: Notes
active_price_for_this_operation_is: 'Active price for this operation is %{price}'

View file

@ -231,6 +231,10 @@ Rails.application.routes.draw do
end
resources :invoices, except: %i[edit update destroy] do
collection do
# get ':id/cancel_paid', to: 'invoices#cancel_paid', as: 'get_cancel_paid'
post ':id/cancel_paid', to: 'invoices#cancel_paid', as: 'cancel_paid'
end
resource :delivery, controller: 'invoices/delivery', only: %i[new create]
member do