module Workarea decorate Payment::Capture::CreditCardTest, with: :cim do def test_complete_captures_on_the_credit_card_gateway # no capture defined on this gateway end private def reference @reference ||= Payment::Transaction.new( amount: 5.to_m, response: ActiveMerchant::Billing::Response.new( true, 'Message', reference_params, { authorization: authorization } ) ) end def reference_params { 'messages' => { 'result_code' => 'Ok', 'message' => { 'code' => 'I00001', 'text' => 'Successful.' } }, 'direct_response' => { 'raw' => '1,1,1,(TESTMODE) This transaction has been approved.,000000,P,0,,,77.49,CC,auth_only,,,,,,,,,,,,bcrouse@workarea.com,,,,,,,,,,,,,,F6000E62F2517691DED641D62E1B0FD8,,,,,,,,,,,,,XXXX5100,MasterCard,,,,,,,,,,,,,,,,', 'response_code' => '1', 'response_subcode' => '1', 'response_reason_code' => '1', 'message' => '(TESTMODE) This transaction has been approved.', 'approval_code' => '000000', 'avs_response' => 'P', 'transaction_id' => '0', 'invoice_number' => '', 'order_description' => '', 'amount' => '77.49', 'method' => 'CC', 'transaction_type' => 'auth_only', 'customer_id' => '', 'first_name' => '', 'last_name' => '', 'company' => '', 'address' => '', 'city' => '', 'state' => '', 'zip_code' => '', 'country' => '', 'phone' => '', 'fax' => '', 'email_address' => 'bcrouse@workarea.com', 'ship_to_first_name' => '', 'ship_to_last_name' => '', 'ship_to_company' => '', 'ship_to_address' => '', 'ship_to_city' => '', 'ship_to_state' => '', 'ship_to_zip_code' => '', 'ship_to_country' => '', 'tax' => '', 'duty' => '', 'tax_exempt' => '', 'purchase_order_number' => '', 'md5_hash' => 'F6000E62F2517691DED641D62E1B0FD8', 'card_code' => '', 'cardholder_authentication_verification_response' => '', 'account_number' => 'XXXX5100', 'card_type' => 'MasterCard', 'split_tender_id' => '', 'requested_amount' => '', 'balance_on_card' => '' } } end end end