クラス
Constants
Defines constants. We prefer this method over using ‘define’ in the global namespace.
ソース ソース
ファイル: src/Config/Constants.php
final class Constants { const PAYMENT_NAME = 'Amazon Pay'; const ACTING = 'amazon_pay'; const ACTING_FLAG = 'acting_amazon_pay'; const NONCE_KEY = 'wcex_amzpay_nonce_key'; const NONCE_NAME = 'wcex_amzpay_nonce'; const FORM_EXTRAS_PREFIX = 'wcexaap_extras_'; const PLATFORM_ID = 'A13IU1DKQ45KMF'; // TCD stylesheet names (temporary) const TCD_GLOMOUR = 'glamour_tcd073'; const TCD_ICONIC = 'iconic_tcd062'; const TCD_EGO = 'ego_welcart_tcd079'; /** * All prefectures in Japan * * @var array */ const PREFECTURES = [ '北海道', '青森県', '岩手県', '宮城県', '秋田県', '山形県', '福島県', '茨城県', '栃木県', '群馬県', '埼玉県', '千葉県', '東京都', '神奈川県', '新潟県', '富山県', '石川県', '福井県', '山梨県', '長野県', '岐阜県', '静岡県', '愛知県', '三重県', '滋賀県', '京都府', '大阪府', '兵庫県', '奈良県', '和歌山県', '鳥取県', '島根県', '岡山県', '広島県', '山口県', '徳島県', '香川県', '愛媛県', '高知県', '福岡県', '佐賀県', '長崎県', '熊本県', '大分県', '宮崎県', '鹿児島県', '沖縄県', ]; /** * English prefecture name to Japanese prefecture name map * * @var array */ const ETOJ_PREF_MAP = [ 'Hokkaido' => '北海道', 'Aomori-ken' => '青森県', 'Iwate-ken' => '岩手県', 'Miyagi-ken' => '宮城県', 'Akita-ken' => '秋田県', 'Yamagata-ken' => '山形県', 'Fukushima-ken' => '福島県', 'Ibaraki-ken' => '茨城県', 'Tochigi-ken' => '栃木県', 'Gunma-ken' => '群馬県', 'Saitama-ken' => '埼玉県', 'Chiba-ken' => '千葉県', 'Tokyo-to' => '東京都', 'Kanagawa-ken' => '神奈川県', 'Niigata-ken' => '新潟県', 'Toyama-ken' => '富山県', 'Ishikawa-ken' => '石川県', 'Fukui-ken' => '福井県', 'Yamanashi-ken' => '山梨県', 'Nagano-ken' => '長野県', 'Gifu-ken' => '岐阜県', 'Shizuoka-ken' => '静岡県', 'Aichi-ken' => '愛知県', 'Mie-ken' => '三重県', 'Shiga-ken' => '滋賀県', 'Kyoto-fu' => '京都府', 'Osaka-fu' => '大阪府', 'Hyogo-ken' => '兵庫県', 'Nara-ken' => '奈良県', 'Wakayama-ken' => '和歌山県', 'Tottori-ken' => '鳥取県', 'Shimane-ken' => '島根県', 'Okayama-ken' => '岡山県', 'Hiroshima-ken' => '広島県', 'Yamaguchi-ken' => '山口県', 'Tokushima-ken' => '徳島県', 'Kagawa-ken' => '香川県', 'Ehime-ken' => '愛媛県', 'Kochi-ken' => '高知県', 'Fukuoka-ken' => '福岡県', 'Saga-ken' => '佐賀県', 'Nagasaki-ken' => '長崎県', 'Kumamoto-ken' => '熊本県', 'Oita-ken' => '大分県', 'Miyazaki-ken' => '宮崎県', 'Kagoshima-ken' => '鹿児島県', 'Okinawa-ken' => '沖縄県', ]; /** * ISO 3166 2-letter US state code to full state name map * * @var array */ const ISO_US_STATE_CODE_MAP = [ 'AL' => 'Alabama', 'AK' => 'Alaska', 'AZ' => 'Arizona', 'AR' => 'Arkansas', 'CA' => 'California', 'CO' => 'Colorado', 'CT' => 'Connecticut', 'DE' => 'Delaware', 'DC' => 'District of Columbia', 'FL' => 'Florida', 'GA' => 'Georgia', 'HI' => 'Hawaii', 'ID' => 'Idaho', 'IL' => 'Illinois', 'IN' => 'Indiana', 'IA' => 'Iowa', 'KS' => 'Kansas', 'KY' => 'Kentucky', 'LA' => 'Louisiana', 'ME' => 'Maine', 'MD' => 'Maryland', 'MA' => 'Massachusetts', 'MI' => 'Michigan', 'MN' => 'Minnesota', 'MS' => 'Mississippi', 'MO' => 'Missouri', 'MT' => 'Montana', 'NE' => 'Nebraska', 'NV' => 'Nevada', 'NH' => 'New Hampshire', 'NJ' => 'New Jersey', 'NM' => 'New Mexico', 'NY' => 'New York', 'NC' => 'North Carolina', 'ND' => 'North Dakota', 'OH' => 'Ohio', 'OK' => 'Oklahoma', 'OR' => 'Oregon', 'PA' => 'Pennsylvania', 'RI' => 'Rhode Island', 'SC' => 'South Carolina', 'SD' => 'South Dakota', 'TN' => 'Tennessee', 'TX' => 'Texas', 'UT' => 'Utah', 'VT' => 'Vermont', 'VA' => 'Virginia', 'WA' => 'Washington', 'WV' => 'West Virginia', 'WI' => 'Wisconsin', 'WY' => 'Wyoming', ]; /** * Currency codes supported by Amazon Pay * * @see https://amazonpaycheckoutintegrationguide.s3.amazonaws.com/amazon-pay-checkout/multi-currency-integration.html */ const AMZ_PAY_SUPPORTED_CURRENCY_CODES = [ 'AUD', // Australian Dollar 'GBP', // British Pound 'DKK', // Danish Krone 'EUR', // Euro 'HKD', // Hong Kong Dollar 'JPY', // Japanese Yen 'NZD', // New Zealand Dollar 'NOK', // Norwegian Krone 'ZAR', // South African Rand 'SEK', // Swedish Krone 'CHF', // Swiss Franc 'USD', // United States Dollar ]; /** * Prevents instantiation of this class. * * @throws Exception // thrown if instantiation is attempted. */ private function __construct() { throw new Exception("Can't create instance of this class"); } }
- __construct — Prevents instantiation of this class.