関数
Logger::getSettlementHistoryLog( string $log_key )
決済履歴ログ取得
パラメータ パラメータ
- $log_key
(文字列) (必須) '[chargeId]'
ファイル: src/Models/Logger.php
public function getSettlementHistoryLog($log_key) { global $wpdb; $log_table_name = $wpdb->prefix . 'usces_log'; $query = $wpdb->prepare( "SELECT * FROM {$log_table_name} WHERE `log_type` = %s AND `log_key` = %s ORDER BY datetime DESC", Log::LOG_TYPE, $log_key ); $log_data = $wpdb->get_results($query, ARRAY_A); $decodedLog = []; foreach ($log_data as $entry) { $entry['log'] = json_decode($entry['log'], true); $entry['log']['actionTypeText'] = Log::getActionTypeText($entry['log']['actionType']); $decodedLog[] = $entry; } return $decodedLog; }