/** * Checks if the transaction was successful * * @link https://developer.intuit.com/docs/030_qbms/0060_documentation/error_handling#QBMS_and_Processing_Errors * * @since 1.0 * @see WC_Intuit_QBMS_API_Response::transaction_approved() * @return bool true if approved, false otherwise */ public function transaction_approved() { $approved = parent::transaction_approved(); // "No wallet-related records found in database." but we don't care, we just want the token to be gone if (10315 == $this->get_status_code()) { $approved = true; } return $approved; }
/** * Adds any gateway-specific transaction data to the order * * @since 1.0 * @see SV_WC_Payment_Gateway::add_payment_gateway_transaction_data() * @param WC_Order $order the order object * @param WC_Intuit_QBMS_API_Response $response the transaction response */ public function add_payment_gateway_transaction_data($order, $response) { // transaction results (CustomerCreditCardWalletAuthRs doesn't return a client trans id) if ($response->get_client_trans_id()) { $this->update_order_meta($order->id, 'client_trans_id', $response->get_client_trans_id()); } if ($this->perform_credit_card_charge()) { // performing a cc charge returns a number of more response elements than a simple auth $this->update_order_meta($order->id, 'merchant_account_number', $response->get_merchant_account_number()); $this->update_order_meta($order->id, 'recon_batch_id', $response->get_recon_batch_id()); $this->update_order_meta($order->id, 'payment_grouping_code', $response->get_payment_grouping_code()); $this->update_order_meta($order->id, 'txn_authorization_stamp', $response->get_txn_authorization_stamp()); } }
/** * Adds any gateway-specific transaction data to the order * * @since 1.0 * @see SV_WC_Payment_Gateway::add_payment_gateway_transaction_data() * @param WC_Order $order the order object * @param WC_Intuit_QBMS_API_Response $response the transaction response */ public function add_payment_gateway_transaction_data($order, $response) { // transaction results $this->update_order_meta($order->id, 'authorization_code', $response->get_check_authorization_code()); $this->update_order_meta($order->id, 'client_trans_id', $response->get_client_trans_id()); }