WOOCS - WooCommerce Currency Switcher

Intuit Payments/QBMS Gateway

Plugin linkhttps://woocommerce.com/products/intuit-qbms/

Resolved byhttps://wordpress.org/support/topic/intuit-paymentsqbms-gateway-support/

TroubleI use multiple payment gateway like PayPal I want to allow customers to pay by CAD or USD as they want but Intuit Payments/QBMS Gateway only charge USD

Add next code to the functions.php file of the current wp theme:

add_filter('wc_payment_gateway_intuit_qbms_get_order_base', 'intuit_qbms_return_currency_to_usd', 10, 1);

function intuit_qbms_return_currency_to_usd($order) {
    global $WOOCS;
    if ($WOOCS) {
	      $currencies = $WOOCS->get_currencies();
	      $current_currency = $WOOCS->current_currency;
	      $usd_total = $WOOCS->back_convert($order->get_total(), $currencies[$current_currency]['rate'], 2);
	      $order->payment_total = number_format($usd_total, 2, '.', '');
    }
    return $order;
}

this will convert total to USD before send to Intuit Payments/QBMS Gateway.