lib/active_merchant/billing/gateways/epsilon.rb in active_merchant-epsilon-0.5.9 vs lib/active_merchant/billing/gateways/epsilon.rb in active_merchant-epsilon-0.5.10

- old
+ new

@@ -41,15 +41,16 @@ order_number: detail[:order_number], st_code: '10000-0000-0000', mission_code: EpsilonMissionCode::PURCHASE, item_price: amount, process_code: 2, - memo1: detail[:memo1], - memo2: detail[:memo2], xml: 1, } + params[:memo1] = detail[:memo1] if detail.has_key?(:memo1) + params[:memo2] = detail[:memo2] if detail.has_key?(:memo2) + commit(PATHS[:registered_purchase], params) end def recurring(amount, credit_card, detail = {}) detail[:mission_code] ||= EpsilonMissionCode::RECURRING_2 @@ -72,15 +73,16 @@ order_number: detail[:order_number], st_code: '10000-0000-0000', mission_code: detail[:mission_code], item_price: amount, process_code: 2, - memo1: detail[:memo1], - memo2: detail[:memo2], xml: 1, } + params[:memo1] = detail[:memo1] if detail.has_key?(:memo1) + params[:memo2] = detail[:memo2] if detail.has_key?(:memo2) + commit(PATHS[:registered_recurring], params) end def cancel_recurring(user_id:, item_code:) params = { @@ -173,19 +175,20 @@ order_number: detail[:order_number], st_code: '10000-0000-0000', mission_code: detail[:mission_code], item_price: amount, process_code: 1, - memo1: detail[:memo1], - memo2: detail[:memo2], card_number: payment_method.number, expire_y: payment_method.year, expire_m: payment_method.month, card_st_code: detail[:credit_type], pay_time: detail[:payment_time], tds_check_code: detail[:three_d_secure_check_code], user_agent: "#{ActiveMerchant::Epsilon}-#{ActiveMerchant::Epsilon::VERSION}", } + + params[:memo1] = detail[:memo1] if detail.has_key?(:memo1) + params[:memo2] = detail[:memo2] if detail.has_key?(:memo2) if payment_method.class.requires_verification_value? params.merge!( security_code: payment_method.verification_value, security_check: 1, # use security code