Get system currencies

@return array
An array of arrays as follows: array( array('label'=>$name0, 'value'=>$id0), array('label'=>$name1, 'value'=>$id1),…)
777312
public function getSystemCurrencies()
  {
    $currencies = array();

    $this->Currency->all()->each(function($Currency) use (&$currencies)
    {
      array_push($currencies, array('label'=> $Currency->name . ' (' . $Currency->symbol . ')', 'value'=>$Currency->id));
    });

    return $currencies;
  }
1043886
protected function getListCurrency()
    {
        $id = $this->getParam(0);

        if (!isset($id)) {
            $list = $this->currency->getList();
            $this->limitArray($list);
            return $list;
        }

        $result = $this->currency->get($id);

        if (empty($result)) {
            $this->errorAndExit($this->text('Unexpected result'));
        }

        return array($result);
    }
1325634
def get_available_currencies():
    """"""
    r = requests.get(API_CURRENCIES)
    if r.status_code != requests.codes.ok:
        raise CryptonatorException(
            ("An error occurred while getting available currencies "
             "({} from Cryptonator).").format(r.status_code)
        )

    return [currency['code'] for currency in r.json()['rows']]
954444
public function getStorableData()
    {
        return [
            'id' => 'Transaction',
            'flat' => [
                'Total' => \Heystack\Ecommerce\convertMoneyToString($this->total),
                'Status' => $this->status,
                'Currency' => $this->currencyService->getActiveCurrencyCode()
            ],
            'related' => []
        ];

    }
205225
public function getCurrenciesForCountry(string $countryCode) : array
    {
        if ($this->countryToCurrency === null) {
            $this->countryToCurrency = require __DIR__ . '/../data/country-to-currency.php';
        }

        $result = [];

        if (isset($this->countryToCurrency[$countryCode])) {
            foreach ($this->countryToCurrency[$countryCode] as $currencyCode) {
                $result[] = $this->getCurrency($currencyCode);
            }
        }

        return $result;
    }
177094
protected function getPaymentTransactionStructure()
    {
        return [
            'usage'              => $this->usage,
            'remote_ip'          => $this->remote_ip,
            'return_success_url' => $this->return_success_url,
            'return_failure_url' => $this->return_failure_url,
            'amount'             => $this->transformAmount($this->amount, $this->currency),
            'currency'           => $this->currency,
            'consumer_reference' => $this->consumer_reference,
            'customer_email'     => $this->customer_email,
            'iban'               => $this->iban,
            'bic'                => $this->bic,
            'billing_address'    => $this->getBillingAddressParamsStructure(),
            'shipping_address'   => $this->getShippingAddressParamsStructure()
        ];
    }
508319
public function getExchangeRateList()
    {
        if (!empty($this->exchangeRateList)) {
            return $this->exchangeRateList;
        }

        $this->exchangeRateList = [];

        $currencyBase = $this
            ->currencyRepository
            ->findOneBy([
                'iso' => $this->exchangeCurrencyIso,
            ]);

        $availableExchangeRates = $this
            ->currencyExchangeRateRepository
            ->findBy([
                'sourceCurrency' => $currencyBase,
            ]);

        /**
         * @var CurrencyExchangeRate $exchangeRate
         */
        foreach ($availableExchangeRates as $exchangeRate) {
            $targetCurrency = $exchangeRate->getTargetCurrency();
            $targetCurrencyIso = $targetCurrency->getIso();

            $this->exchangeRateList[$targetCurrencyIso] = [
                'rate' => $exchangeRate->getExchangeRate(),
                'currency' => $targetCurrency,
            ];
        }

        return $this->exchangeRateList;
    }
1093034
public function toArray()
    {
        return [
            'rowId'    => $this->rowId,
            'id'       => $this->id,
            'name'     => $this->name,
            'type'     => $this->type,
            'qty'      => $this->qty,
            'uri'      => $this->uri,

            'value'   => [
                'currency' =>  $this->price->getCurrency(),

                'price'    => $this->formatMoney($this->getPrice()),
                'subtotal' => $this->formatMoney($this->getSubtotal()),

                'taxes'    => [
                    'tax' => $this->formatMoney($this->getTax()),
                    'rate' => (string)$this->taxRate,
                    'total' => $this->formatMoney($this->getTaxTotal()),
                ],

                'total'    => $this->formatMoney($this->getTotal()),
            ],

            'options'  => $this->options,
        ];
    }
1279239
protected function getPaymentTransactionStructure()
    {
        return array_merge(
            [
                'amount'   => \Genesis\Utils\Currency::amountToExponent($this->amount, $this->currency),
                'currency' => $this->currency,
            ],
            $this->items instanceof Items ? $this->items->toArray() : []
        );
    }
38044
public function getAvailableCurrencies() : array
    {
        if ($this->isPartial) {
            foreach ($this->currencyData as $currencyCode => $data) {
                if (! isset($this->currencies[$currencyCode])) {
                    $this->currencies[$currencyCode] = new Currency(... $data);
                }
            }

            ksort($this->currencies);

            $this->isPartial = false;
        }

        return $this->currencies;
    }
789922
public function getPaymentCurrencyOptions()
    { 
        // Create the base options
        $options = [
            [
                'value' => self::BASE_CURRENCY,
                'label' => __('Use Magento default')
            ],
            [
                'value' => self::ORDER_CURRENCY,
                'label' => __('Order currency')
            ],
            [
                'value' => self::CUSTOM_CURRENCY,
                'label' => __('Custom currency')
            ],
        ];

        // Return the options as array
        return $options;
    }
1159919
public function getCurrency($currency = null): ?array
    {
        $currency = $currency ? mb_strtoupper($currency) : null;

        return $this->get("currency.{$currency}") ?: (current($this->get('currency', [])) ?: null);
    }
129889
public function toOptionArray() {
        return [
            [
                'value' => self::CARD_VISA,
                'label' => __('Visa')
            ],
            [
                'value' => self::CARD_MASTERCARD,
                'label' => __('Mastercard')
            ],
            [
                'value' => self::CARD_AMEX,
                'label' => __('American Express')
            ],
            [
                'value' => self::CARD_JCB,
                'label' => __('JCB')
            ],
            [
                'value' => self::CARD_DISCOVER,
                'label' => __('Discover')
            ],
        ];
    }
1187529
public function toArray()
    {
        $array = array();

        $array['orderNumber'] = $this->orderNumber;
        if (isset($this->referenceNumber)) {
            $array['referenceNumber'] = $this->referenceNumber;
        }
        if (isset($this->description)) {
            $array['description'] = $this->description;
        }
        $array['currency'] = $this->currency;
        if (isset($this->locale)) {
            $array['locale'] = $this->locale;
        }
        $array['orderDetails'] = array(
            'includeVat' => $this->vatMode,
            'products'   => array(),
        );
        if ($this->urlSet !== null) {
            $array['urlSet'] = $this->urlSet->toArray();
        }
        if ($this->contact !== null) {
            $array['orderDetails']['contact'] = $this->contact->toArray();
        }
        foreach ($this->products as $product) {
            $array['orderDetails']['products'][] = $product->toArray();
        }

        return $array;
    }
797984
protected function getCurrency()
    {
        if (null === $this->currency) {
            $this->currency = $this->getSession() ? $this->getSession()->getCurrency(true) : Currency::getDefaultCurrency();
        }

        return $this->currency;
    }
1069263
public static function data_currencies() {

		// If it's already done, do not redo the filter
		if ( ! empty( static::$currencies ) ) {
			return static::$currencies;
		}

		$default_currencies = array(
			'aud'     => array(
				'label'  => 'AUD',
				'name'   => __( 'Australian Dollar', 'pods' ),
				'sign'   => '$',
				'entity' => '&#36;',
			),
			'brl'     => array(
				'label'  => 'BRL',
				'name'   => __( 'Brazilian Real', 'pods' ),
				'sign'   => 'R$',
				'entity' => 'R&#36;',
			),
			'gbp'     => array(
				'label'  => 'GBP',
				'name'   => __( 'British Pound', 'pods' ),
				'sign'   => '£',
				'entity' => '&pound;',
			),
			'cad'     => array(
				'label'  => 'CAD',
				'name'   => __( 'Canadian Dollar', 'pods' ),
				'sign'   => '$',
				'entity' => '&#36;',
			),
			'cny'     => array(
				'label'  => 'CNY',
				'name'   => __( 'Chinese Yen (¥)', 'pods' ),
				'sign'   => '¥',
				'entity' => '&yen;',
			),
			'cny2'    => array(
				'label'  => 'CNY',
				'name'   => __( 'Chinese Yuan (元)', 'pods' ),
				'sign'   => '元',
				'entity' => '&#20803;',
			),
			'czk'     => array(
				'label'  => 'CZK',
				'name'   => __( 'Czech Koruna', 'pods' ),
				'sign'   => 'Kč',
				'entity' => 'K&#x10D;',
			),
			'dkk'     => array(
				'label'  => 'DKK',
				'name'   => __( 'Danish Krone', 'pods' ),
				'sign'   => 'kr.',
				'entity' => 'kr.',
			),
			'euro'    => array(
				'label'  => 'EUR',
				'name'   => __( 'Euro', 'pods' ),
				'sign'   => '€',
				'entity' => '&euro;',
			),
			'hkd'     => array(
				'label'  => 'HKD',
				'name'   => __( 'Hong Kong Dollar', 'pods' ),
				'sign'   => '$',
				'entity' => '&#36;',
			),
			'huf'     => array(
				'label'  => 'HUF',
				'name'   => __( 'Hungarian Forint', 'pods' ),
				'sign'   => 'Ft',
				'entity' => 'Ft',
			),
			'inr'     => array(
				'label'  => 'INR',
				'name'   => __( 'Indian Rupee', 'pods' ),
				'sign'   => '₹',
				'entity' => '&#x20B9;',
			),
			'idr'     => array(
				'label'  => 'IDR',
				'name'   => __( 'Indonesian Rupiah', 'pods' ),
				'sign'   => 'Rp',
				'entity' => 'Rp',
			),
			'ils'     => array(
				'label'  => 'ILS',
				'name'   => __( 'Israeli New Sheqel', 'pods' ),
				'sign'   => '₪',
				'entity' => '&#x20AA;',
			),
			'jpy'     => array(
				'label'  => 'JPY',
				'name'   => __( 'Japanese Yen', 'pods' ),
				'sign'   => '¥',
				'entity' => '&yen;',
			),
			'krw'     => array(
				'label'  => 'KRW',
				'name'   => __( 'Korean Won', 'pods' ),
				'sign'   => '₩',
				'entity' => '&#8361;',
			),
			'myr'     => array(
				'label'  => 'MYR',
				'name'   => __( 'Malaysian Ringgit', 'pods' ),
				'sign'   => 'MR',
				'entity' => 'MR',
			),
			'mxn'     => array(
				'label'  => 'MXN',
				'name'   => __( 'Mexican Peso', 'pods' ),
				'sign'   => '$',
				'entity' => '&#36;',
			),
			'nzd'     => array(
				'label'  => 'NZD',
				'name'   => __( 'New Zealand Dollar', 'pods' ),
				'sign'   => '$',
				'entity' => '&#36;',
			),
			'nok'     => array(
				'label'  => 'NOK',
				'name'   => __( 'Norwegian Krone', 'pods' ),
				'sign'   => 'kr',
				'entity' => 'kr',
			),
			'php'     => array(
				'label'  => 'PHP',
				'name'   => __( 'Philippine Peso', 'pods' ),
				'sign'   => '₱',
				'entity' => '&#x20B1;',
			),
			'pln'     => array(
				'label'  => 'PLN',
				'name'   => __( 'Polish Złoty', 'pods' ),
				'sign'   => 'zł',
				'entity' => 'z&#x142;',
			),
			'rub'     => array(
				'label'  => 'RUB',
				'name'   => __( 'Russian Ruble', 'pods' ),
				'sign'   => '₽',
				'entity' => '&#8381;',
			),
			'sek'     => array(
				'label'  => 'SEK',
				'name'   => __( 'Swedish Krona', 'pods' ),
				'sign'   => 'kr',
				'entity' => 'kr',
			),
			'sgd'     => array(
				'label'  => 'SGD',
				'name'   => __( 'Singapore Dollar', 'pods' ),
				'sign'   => '$',
				'entity' => '&#36;',
			),
			'zar'     => array(
				'label'  => 'ZAR',
				'name'   => __( 'South African Rand', 'pods' ),
				'sign'   => 'R',
				'entity' => 'R',
			),
			'chf'     => array(
				'label'  => 'CHF',
				'name'   => __( 'Swiss Franc', 'pods' ),
				'sign'   => 'Fr',
				'entity' => 'Fr',
			),
			'twd'     => array(
				'label'  => 'TWD',
				'name'   => __( 'Taiwan New Dollar', 'pods' ),
				'sign'   => '$',
				'entity' => '&#36;',
			),
			'thb'     => array(
				'label'  => 'THB',
				'name'   => __( 'Thai Baht', 'pods' ),
				'sign'   => '฿',
				'entity' => '&#x0E3F;',
			),
			'trl'     => array(
				'label'  => 'TRL',
				'name'   => __( 'Turkish Lira', 'pods' ),
				'sign'   => '₺',
				'entity' => '&#8378;',
			),
			'usd'     => array(
				'label'  => 'USD',
				'name'   => __( 'US Dollar', 'pods' ),
				'sign'   => '$',
				'entity' => '&#36;',
			),
			'usdcent' => array(
				'label'  => 'USDCENT',
				'name'   => __( 'US Dollar Cent', 'pods' ),
				'sign'   => '¢',
				'entity' => '&cent;',
			),
			'vnd'     => array(
				'label'  => 'VND',
				'name'   => __( 'Vietnamese Dong', 'pods' ),
				'sign'   => '₫',
				'entity' => '&#8363;',
			),
		);

		/**
		 * Add custom currencies
		 *
		 * @param  array $options {
		 *                        Required array of arrays.
		 *
		 * @type  array {
		 * @type  string $label   The label (example: USD).
		 * @type  string $name    The full name (example: US Dollar).
		 * @type  string $sign    The sign (example: $).
		 * @type  string $entity  The HTML entity (example: &#36;).
		 *     }
		 * }
		 * @return array
		 */
		static::$currencies = apply_filters( 'pods_form_ui_field_currency_currencies', $default_currencies );

		// Sort the currencies
		ksort( static::$currencies );

		// Backwards compatibility
		foreach ( static::$currencies as $key => $value ) {
			if ( is_string( $value ) ) {
				static::$currencies[ $key ] = array(
					'label'  => strtoupper( $key ),
					'name'   => strtoupper( $key ),
					'sign'   => $value,
					'entity' => $value,
				);
			} elseif ( is_array( $value ) ) {
				// Make sure all required values are set
				if ( empty( $value['label'] ) ) {
					$value['label'] = $key;
				}
				if ( empty( $value['name'] ) ) {
					$value['name'] = $key;
				}
				if ( empty( $value['sign'] ) ) {
					$value['sign'] = $key;
				}
				if ( empty( $value['entity'] ) ) {
					$value['entity'] = $key;
				}
			} else {
				// Invalid
				unset( static::$currencies[ $key ] );
			}//end if
		}//end foreach

		return static::$currencies;
	}
660956
public function getData()
    {
        $this->validate('merchantId', 'merchantPassword', 'acquirerId', 'transactionId', 'amount');

        $data = [
            'AcquirerId'       => $this->getAcquirerId(),
            'Amount'           => $this->formatAmount(),
            'CurrencyExponent' => $this->getCurrencyDecimalPlaces(),
            'MerchantId'       => $this->getMerchantId(),
            'ModificationType' => $this->getModificationType(),
            'OrderNumber'      => $this->getTransactionId(),
            'Password'         => $this->getMerchantPassword()
        ];

        return $data;
    }