core/app/models/spree/order.rb
# In case a existing credit card is provided it needs to build the payment
# attributes from scratch so we can set the amount. example payload:
#
#   {
#     "order": {
#       "existing_card": "2"
#     }
#   }
#
In case a existing credit card is provided it needs to build the payment
attributes from scratch so we can set the amount. example payload.


In case a existing credit card is provided it needs to build the payment attributes from scratch so we can set the amount . example payload .
def update_params_payment_source
      Spree::Deprecation.warn('update_params_payment_source is deprecated. Please use set_payment_parameters_amount instead.', caller)
      if @updating_params[:order] && (@updating_params[:order][:payments_attributes] || @updating_params[:order][:existing_card])
        @updating_params[:order][:payments_attributes] ||= [{}]
        @updating_params[:order][:payments_attributes].first[:amount] = total
      end
    end
def update_params_payment_source Spree :: Deprecation . warn ( 'update_params_payment_source is deprecated. Please use set_payment_parameters_amount instead.' , caller ) if @updating_params [ :order ] && ( @updating_params [ :order ] [ :payments_attributes ] || @updating_params [ :order ] [ :existing_card ] ) @updating_params [ :order ] [ :payments_attributes ] ||= [ { } ] @updating_params [ :order ] [ :payments_attributes ] . first [ :amount ] = total end end
In case a existing credit card is provided it needs to build the payment
attributes from scratch so we can set the amount.
In case a existing credit card is provided it needs to build the payment attributes from scratch so we can set the amount .