Zend certified PHP/Magento developer

formatting price in specific currency

In PayFlow there is a line that retrieves the amount of the order,

   $request->setAmt($this->formatPrice($amount));

I want to format this in another currency, in my case Canadian $, it seems the amount returned by this statement is the default US dollars. What’s the best way to retrieve the Canadian dollar amount in Magento 2.4? This of course would depend on which currency the user is in, in my case default is USD alternate is CAD$, my Canadian amounts are in USD values.

Most of the formatting I see uses Mage::helper which I do not believe would be the right way in Magento 2.4, but maybe I’m wrong, it happened once before! 🙂

Any help would be appreciated. Thank you

The entire request is here

    $request = $this->buildBasicRequest();
    $request->setAmt($this->formatPrice($amount));
    $request->setAcct($payment->getCcNumber());
    $request->setExpdate(sprintf('%02d', $payment->getCcExpMonth()) . substr($payment->getCcExpYear(), -2, 2));
    $request->setCvv2($payment->getCcCid());

    $order = $payment->getOrder();
    $request->setCurrency($order->getBaseCurrencyCode());
    $request = $this->fillCustomerContacts($order, $request);
    return $request;