lib/offsite_payments/integrations/two_checkout.rb
# Uses Third Party Cart parameter set to pass in lineitem details.
# You must also specify `service.invoice` when using this method.
Uses Third Party Cart parameter set to pass in lineitem details.
You must also specify `service.invoice` when using this method.
Uses Third Party Cart parameter set to pass in lineitem details . You must also specify ` service . invoice ` when using this method .
def third_party_cart(params = {})
          add_field('id_type', '1')
          (max_existing_line_item_id = form_fields.keys.map do |key|
            i = key.to_s[/^c_prod_(\d+)/, 1]
            (i && i.to_i)
          end.compact.max || 0)
          line_item_id = max_existing_line_item_id + 1
          params.each do |key, value|
            add_field("c_#{key}_#{line_item_id}", value)
          end
        end
def third_party_cart ( params = { } ) add_field ( 'id_type' , '1' ) ( max_existing_line_item_id = form_fields . keys . map do | key | i = key . to_s [ / ^c_prod_( \d +) / , 1 ] ( i && i . to_i ) end . compact . max || 0 ) line_item_id = max_existing_line_item_id + 1 params . each do | key , value | add_field ( "c_#{key}_#{line_item_id}" , value ) end end
Uses Third Party Cart parameter set to pass in lineitem details.
Uses Third Party Cart parameter set to pass in lineitem details .
params
<not_specific>