./lib/ews/transaction/request.rb in exact4r-0.9.1 vs ./lib/ews/transaction/request.rb in exact4r-0.9.2
- old
+ new
@@ -48,11 +48,11 @@
include Validator
# yeah, it's ugly, but otherwise RDoc won't pick them up
attr_accessor :errors
attr_accessor :gateway_id, :password, :transaction_type, :amount, :surcharge_amount, :cc_number, :transaction_tag, :track1, :track2, :pan, :authorization_num, :cc_expiry, :cardholder_name
- attr_accessor :cc_verification_str2, :cvd_presence_ind, :tax1_amount, :tax1_number, :tax2_amount, :tax2_number, :secure_auth_required, :secure_auth_result
+ attr_accessor :cc_verification_str2, :cvd_presence_ind, :tax1_amount, :tax1_number, :tax2_amount, :tax2_number, :secure_auth_required, :secure_auth_result, :user_name
# AVS - Address Verification,
attr_accessor :cc_verification_str1
[:avs_test_flag, :avs_street_address, :avs_unit_no, :avs_po_box, :avs_postal_code].each { |m|
class_eval <<-METHOD_EOS
@@ -61,11 +61,11 @@
end
def #{m.to_s}=(v)
@#{m.to_s} = v
calculate_verification_str1
end
- METHOD_EOS
+METHOD_EOS
}
attr_accessor :ecommerce_flag, :xid, :cavv, :cavv_algorithm, :reference_no, :customer_ref, :reference_3, :language, :client_ip, :client_email, :zip_code
# Initialize a Request with a hash of values
@@ -79,11 +79,11 @@
def transaction_type=(type_sym)
# assume we're given a symbol, so look up the code
value = @@transaction_codes[type_sym]
# if nothing found, then maybe we were given an actual code?
if(value.nil?)
- raise "invalid transaction_type supplied #{type_sym}" unless @@transaction_codes.values.include?(type_sym)
+ raise ArgumentError, "invalid transaction_type supplied #{type_sym}" unless @@transaction_codes.values.include?(type_sym)
value = type_sym
end
@transaction_type = value
end
@@ -106,10 +106,9 @@
:refund_correction => '12',
:void => '13',
:tagged_purchase => '30',
:tagged_pre_auth => '31',
:tagged_pre_auth_completion => '32',
- :tagged_void => '33',
:tagged_refund => '34',
:tagged_online_debit_refund => '35',
:recurring_seed_pre_auth => '40',
:recurring_seed_purchase => '41',
:idebit_purchase => '50',