|
|
| $trusted_table = "cutrustedmaster" |
| |
|
| $trusted_default |
| |
Updates trusted master to include override options for IPAYBPS
Definition at line 13 of file 2019111200_updIPAYBPSTrustedMaster.php.
◆ down()
| updIPAYBPSTrustedMaster::down |
( |
| ) |
|
◆ up()
| updIPAYBPSTrustedMaster::up |
( |
| ) |
|
See if IPAYBPS exists, if so, update it to force the override entries and updated default values
Since trustedid is unique key to table, counting on only one IPAYBPS entry
- Returns
- void
Definition at line 161 of file 2019111200_updIPAYBPSTrustedMaster.php.
163 if ($this->hasTable($this->trusted_table)) {
165 $def = $this->trusted_default;
166 $sql =
"select * from {$this->trusted_table} where trustedid = '{$def['trustedid']}'";
168 # note appears that fetchRow always returns count of 1, even if no row is found. 169 # using fetchAll even though I expect max 1 record (trustedid is unique key) 171 $trusted_row = $this->fetchAll($sql);
173 if (count($trusted_row) > 0) {
174 $sql =
"update {$this->trusted_table} set trustedfields = E'" 175 . json_encode($def[
'trustedfields'])
176 .
"' where trustedid = '{$def['trustedid']}'";
178 echo
" updating {$def['trustedid']} trusted master\n";
183 $sql =
"insert into {$this->trusted_table} (trustedid, trustedvendor, trustedtype, hcuinterface, trustedfields)" 184 .
" values('{$def['trustedid']}', '{$def['trustedvendor']}', '{$def['trustedtype']}'," 185 .
" E'{$def['hcuinterface']}', E'" . json_encode($def[
'trustedfields']) .
"')";
187 echo
" inserting {$def['trustedid']} trusted master\n";
The documentation for this class was generated from the following file: