/** * Add any Authorize.net AIM specific transaction information as * class members of WC_Order instance. Added members can include: * * auth_net_aim_merchant_defined_fields - custom fields added to the transaction in format array( name => value ) * * @since 3.0 * @see WC_Gateway_Authorize_Net_AIM::get_order() * @param int $order_id order ID being processed * @return WC_Order object with payment and transaction information attached */ protected function get_order($order_id) { // add common order members $order = parent::get_order($order_id); // custom merchant-defined transaction fields $order->auth_net_aim_merchant_defined_fields = apply_filters('wc_authorize_net_aim_merchant_defined_fields', array(), $order, $this); // set card type if ($this->is_credit_card_gateway()) { $order->payment->card_type = SV_WC_Payment_Gateway_Payment_Token::type_from_account_number($order->payment->account_number); } return $order; }