PluginProbe
The Innovative Form Builder – IvyForms / 1.5
The Innovative Form Builder – IvyForms v1.5
1.5.1 1.5 1.4.1 1.4 trunk 0.1.2 0.2 0.2.1 0.3 0.3.1 0.4 0.5 0.6 0.6.1 0.6.1-backup 0.6.1.1 0.7 0.8 0.8.1 0.8.2 0.9 0.9.1 1.0 1.1 1.1.1 All 27 releases
ivyforms / backend / src / Common / Constants / SupportedCurrencyCodes.php

SupportedCurrencyCodes.php in The Innovative Form Builder – IvyForms 1.5, at backend/src/Common/Constants/SupportedCurrencyCodes.php

53 lines 925 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * @copyright © Melograno Venture Studio. All rights reserved.
5 * @licence See LICENCE.md for license details.
6 */
7
8 namespace IvyForms\Common\Constants;
9
10 /**
11 * ISO 4217 codes supported for form payment display (keep in sync with frontend `supportedCurrencies.ts`).
12 */
13 final class SupportedCurrencyCodes
14 {
15 public const DEFAULT_CODE = 'USD';
16
17 /**
18 * @var string[]
19 */
20 public const CODES = [
21 'USD',
22 'EUR',
23 'GBP',
24 'CAD',
25 'AUD',
26 'JPY',
27 'CHF',
28 'SEK',
29 'NOK',
30 'DKK',
31 'PLN',
32 'CZK',
33 'HUF',
34 'NZD',
35 'SGD',
36 'HKD',
37 'INR',
38 'BRL',
39 'MXN',
40 'ZAR',
41 ];
42
43 /**
44 * @param string $code
45 *
46 * @return bool
47 */
48 public static function isAllowed(string $code): bool
49 {
50 return in_array($code, self::CODES, true);
51 }
52 }
53