PluginProbe
The Innovative Form Builder – IvyForms / 1.5.1
The Innovative Form Builder – IvyForms v1.5.1
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.1, at backend/src/Common/Constants/SupportedCurrencyCodes.php

54 lines 940 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 'AED',
27 'JPY',
28 'CHF',
29 'SEK',
30 'NOK',
31 'DKK',
32 'PLN',
33 'CZK',
34 'HUF',
35 'NZD',
36 'SGD',
37 'HKD',
38 'INR',
39 'BRL',
40 'MXN',
41 'ZAR',
42 ];
43
44 /**
45 * @param string $code
46 *
47 * @return bool
48 */
49 public static function isAllowed(string $code): bool
50 {
51 return in_array($code, self::CODES, true);
52 }
53 }
54