関数
LinePay::filterActingOpts( array $opts )
パラメータ パラメータ
- $opts
(配列) (必須)
ファイル: src/LinePay.php
public function filterActingOpts($opts) {
$opts['channel_id'] = isset($opts['channel_id']) ? $opts['channel_id'] : '';
$opts['channel_secret_key'] = isset($opts['channel_secret_key']) ? $opts['channel_secret_key'] : '';
$linepay_locale = 'en';
$locale = get_locale();
switch ($locale) {
case 'ja':
$linepay_locale = 'ja';
break;
case 'th':
$linepay_locale = 'th';
break;
case 'ko_KR':
$linepay_locale = 'ko';
break;
case 'zh_CN':
case 'zh_HK':
case 'zh_SG':
$linepay_locale = 'zh_CN';
break;
case 'zh_TW':
$linepay_locale = 'zh_TW';
break;
}
$opts['allowed_locales'] = ['ja', 'ko', 'en', 'zh_CN', 'zh_TW', 'th'];
$opts['locale'] = $linepay_locale;
$opts['allowed_currencies'] = Config\Constants::ALLOWED_CURRENCIES;
return $opts;
}