/** * Returns the merchant account transaction advanced search URL for the * given order. The QBMS merchant account center doesn't allow you to link * directly to a given transaction, but we can post a search request to * return the one we want * * @since 1.0 * @see SV_WC_Payment_Gateway::get_transaction_url() * @see WC_Intuit_QBMS::render_view_transaction_form() * @param WC_Order $order the order object * @return string transaction url */ public function get_transaction_url($order) { $merchant_center_url = 'test' == $this->get_order_meta($order->id, 'environment') ? self::TEST_MERCHANT_CENTER_URL : self::PRODUCTION_MERCHANT_CENTER_URL; $this->view_transaction_url = $merchant_center_url . '/portal/authsec/portal/qbms/Search+and+reporting/Search+for+advanced+transactions/SearchForAdvTransactions?action=1'; return parent::get_transaction_url($order); }
/** * Returns true if the gateway is properly configured to perform transactions. * Authorize.net AIM requires: API Login ID & API Transaction Key * * @since 3.0 * @see SV_WC_Payment_Gateway::is_configured() * @return boolean true if the gateway is properly configured */ protected function is_configured() { $is_configured = parent::is_configured(); // missing configuration if (!$this->get_api_login_id() || !$this->get_api_transaction_key()) { $is_configured = false; } return $is_configured; }
/** * Add original transaction ID for capturing a prior authorization * * @since 3.0.0 * @param WC_Order $order order object * @return WC_Order object with payment and transaction information attached */ protected function get_order_for_capture($order) { $order = parent::get_order_for_capture($order); // trans id $order->paypal_express_transaction_id = $this->get_order_meta($order->id, 'trans_id'); // invoice prefix $order->paypal_express_invoice_prefix = $this->get_invoice_prefix(); return $order; }
/** * Build the class. * * @since 4.3.0 * @param \SV_WC_Payment_Gateway_Direct $gateway The gateway instance */ public function __construct(SV_WC_Payment_Gateway_Direct $gateway) { $this->gateway = $gateway; $this->environment_id = $gateway->get_environment(); }