/** * 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; }
/** * Add any Intuit QBMS specific payment and transaction information as * class members of WC_Order instance. Added members can include: * * $order->trans_request_id - an application-supplied value that identifies the transaction * $order->intuit_qbms_test_condition - a convenience for testing error conditions while in test mode * * @since 1.0 * @see SV_WC_Payment_Gateway_Direct::get_order() * @param int $order_id order ID being processed * @return WC_Order object with payment and transaction information attached */ public function get_order($order_id) { // add common order members $order = parent::get_order($order_id); // add intuit-specific order members // 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->unique_transaction_ref; return $order; }
/** * Add any PayPal Express specific transaction information as * class members of WC_Order instance. Added members can include: * * token - PayPal Express Checkout token * paypal_express_payer_id - PayPal Express payer ID (whatever that means) * * @since 3.0.0 * @see WC_Payment_Gateway::get_order() * @param int $order_id order ID being processed * @return WC_Order object with PPE information added */ protected function get_order($order_id) { // add common order members $order = parent::get_order($order_id); // checkout token $order->paypal_express_token = $this->get_session_data('token'); // payer ID if ($this->get_session_data('payer_id')) { $order->paypal_express_payer_id = $this->get_session_data('payer_id'); } // invoice prefix $order->paypal_express_invoice_prefix = $this->get_invoice_prefix(); return $order; }
/** * Add any Authorize.Net CIM specific transaction information as * class members of WC_Order instance. Added members can include: * * + po_number - PO Number to be included with the transaction via the legacy filter below * * @since 2.0.0 * @see WC_Gateway_Authorize_Net_CIM::get_order() * @param int $order_id order ID being processed * @return WC_Order object with payment and transaction information attached */ public function get_order($order_id) { // add common order members $order = parent::get_order($order_id); // backwards compat for transaction/PO number filters introduced in v1.x // @deprecated in 2.0.0 $order->description = apply_filters('wc_authorize_net_cim_transaction_description', $order->description, $order->id, $this); // remove any weirdness in the description $order->description = SV_WC_Helper::str_to_sane_utf8($order->description); // @deprecated in 2.0.0 $po_number = apply_filters('wc_authorize_net_cim_transaction_po_number', false, $order_id, $this); if ($po_number) { $order->po_number = $po_number; } // add shipping address ID for profile transactions (using existing payment method or adding a new one) if ($order->get_user_id() && (!empty($order->payment->token) || $this->get_payment_tokens_handler()->should_tokenize())) { $shipping_address = $this->get_shipping_address($order->get_user_id()); $order->payment->shipping_address_id = $shipping_address->get_id(); } return $order; }