src/ShopCurrencyBundle/Bridge/Chameleon/Objects/CurrencyBasket.php
public function SetActivePaymentMethod($oShopPayment)
    {
        $oldActivePaymentMethod = $this->GetActivePaymentMethod();
        $isPaymentSet = parent::SetActivePaymentMethod($oShopPayment);
        $newActivePaymentMethod = $this->GetActivePaymentMethod();
        if (null === $oldActivePaymentMethod || null === $newActivePaymentMethod) {
            return $isPaymentSet;
        }
        if (false === $oldActivePaymentMethod->IsSameAs($newActivePaymentMethod)) {
            return $isPaymentSet;
        }
        $activeCurrency = $this->getCurrencyService()->getObject();

        if (null === $newActivePaymentMethod->fieldValueOriginal && true == $activeCurrency->fieldIsBaseCurrency) {
            return $isPaymentSet;
        }

        if (null !== $newActivePaymentMethod->fieldValueOriginal) {
            $convertedValue = \TdbPkgShopCurrency::ConvertToActiveCurrency($newActivePaymentMethod->fieldValueOriginal);
            if ($convertedValue === $newActivePaymentMethod->GetPrice()) {
                return $isPaymentSet;
            }
        }

        $reloadedPayment = \TdbShopPaymentMethod::GetNewInstance($newActivePaymentMethod->id);
        parent::SetActivePaymentMethod($reloadedPayment);

        return $isPaymentSet;
    }
public function SetActivePaymentMethod($oShopPayment)
    {
        $oldActivePaymentMethod = $this->GetActivePaymentMethod();
        $isPaymentSet = parent::SetActivePaymentMethod($oShopPayment);
        $newActivePaymentMethod = $this->GetActivePaymentMethod();
        if (null === $oldActivePaymentMethod || null === $newActivePaymentMethod) {
            return $isPaymentSet;
        }
        if (false === $oldActivePaymentMethod->IsSameAs($newActivePaymentMethod)) {
            return $isPaymentSet;
        }
        $activeCurrency = $this->getCurrencyService()->getObject();

        if (null === $newActivePaymentMethod->fieldValueOriginal && true == $activeCurrency->fieldIsBaseCurrency) {
            return $isPaymentSet;
        }

        if (null !== $newActivePaymentMethod->fieldValueOriginal) {
            $convertedValue = \TdbPkgShopCurrency::ConvertToActiveCurrency($newActivePaymentMethod->fieldValueOriginal);
            if ($convertedValue === $newActivePaymentMethod->GetPrice()) {
                return $isPaymentSet;
            }
        }

        $reloadedPayment = \TdbShopPaymentMethod::GetNewInstance($newActivePaymentMethod->id);
        parent::SetActivePaymentMethod($reloadedPayment);

        return $isPaymentSet;
    }
public function SetActivePaymentMethod ( $ oShopPayment ) { $ oldActivePaymentMethod = $ this -> GetActivePaymentMethod ( ) ; $ isPaymentSet = parent :: SetActivePaymentMethod ( $ oShopPayment ) ; $ newActivePaymentMethod = $ this -> GetActivePaymentMethod ( ) ; if ( null === $ oldActivePaymentMethod || null === $ newActivePaymentMethod ) { return $ isPaymentSet ; } if ( false === $ oldActivePaymentMethod -> IsSameAs ( $ newActivePaymentMethod ) ) { return $ isPaymentSet ; } $ activeCurrency = $ this -> getCurrencyService ( ) -> getObject ( ) ; if ( null === $ newActivePaymentMethod -> fieldValueOriginal && true == $ activeCurrency -> fieldIsBaseCurrency ) { return $ isPaymentSet ; } if ( null !== $ newActivePaymentMethod -> fieldValueOriginal ) { $ convertedValue = \ TdbPkgShopCurrency :: ConvertToActiveCurrency ( $ newActivePaymentMethod -> fieldValueOriginal ) ; if ( $ convertedValue === $ newActivePaymentMethod -> GetPrice ( ) ) { return $ isPaymentSet ; } } $ reloadedPayment = \ TdbShopPaymentMethod :: GetNewInstance ( $ newActivePaymentMethod -> id ) ; parent :: SetActivePaymentMethod ( $ reloadedPayment ) ; return $ isPaymentSet ; }
Reloads the active payment method on currency change,
so that the payment method holds the payment charges in the correct currency.

{@inheritdoc}
Reloads the active payment method on currency change so that the payment method holds the payment charges in the correct currency .