|
|
| $trusted_table = "cutrustedmaster" |
| |
|
| $trusted_default |
| |
Updates trusted master to include EnrollMICR for IPAY_V3
Definition at line 13 of file 2019080900_UpdateIpayV3.php.
◆ down()
Assuming the previous state was properly added without EnrollMICR, re-add it as such.
- Returns
- void
Definition at line 128 of file 2019080900_UpdateIpayV3.php.
130 $def = $this->trusted_default;
131 unset ($def[
'trustedfields'][
'EnrollMICR']);
133 $sql =
"update {$this->trusted_table} set trustedfields = '" 134 . json_encode($def[
'trustedfields'])
135 .
"' where trustedid = 'IPAY_V3'";
◆ up()
See if IPAY_V3 exists, if so if the EnrollMIRC key is not present update it. If there's more than 1 record, we wind up updating all of them and something else is messed up.
- Returns
- void
Definition at line 86 of file 2019080900_UpdateIpayV3.php.
88 if ($this->hasTable($this->trusted_table)) {
90 $def = $this->trusted_default;
91 $ipay_row = $this->fetchRow(
"select * from {$this->trusted_table} where trustedid = 'IPAY_V3'");
93 if (count($ipay_row) > 0) {
95 $details = json_decode($ipay_row[
'trustedfields'], 1);
96 if (array_key_exists(
'EnrollMICR', $details)) {
102 $sql =
"update {$this->trusted_table} set trustedfields = '" 103 . json_encode($def[
'trustedfields'])
104 .
"' where trustedid = 'IPAY_V3'";
111 if (count($ipay_row) == 0) {
113 $sql =
"insert into {$this->trusted_table} (trustedid, trustedvendor, trustedtype, hcuinterface, trustedfields)" 114 .
" values('{$def['trustedid']}', '{$def['trustedvendor']}', '{$def['trustedtype']},'" 115 .
" '{$def['hcuinterface']}', '" . json_encode($def[
'trustedfields']) .
"'";
The documentation for this class was generated from the following file: