/** * Add payment and transaction information as class members of WC_Order * instance for use in credit card capture transactions. Standard information * can include: * * $order->trans_request_id - an application-supplied value that identifies the transaction * * @since 1.1 * @see SV_WC_Payment_Gateway_Direct::get_order_for_capture() * @param int $order_id order ID being processed * @return WC_Order object with payment and transaction information attached */ protected function get_order_for_capture($order) { $order = parent::get_order_for_capture($order); // this is used to identify the transaction and prevent duplicate transactions // as might occur during a network outage. Not really making use of this at // the moment since there's no real way to test. For further info: // https://developer.intuit.com/docs/030_qbms/0060_documentation/error_handling#QBMS_Error_Recovery $order->trans_request_id = $order->id . '-' . rand(); return $order; }