8 use Phinx\Migration\AbstractMigration;
16 protected $trusted_table =
"cutrustedmaster";
19 protected $trusted_default = [
20 'trustedid' =>
'IPAY_V3',
21 'trustedvendor' =>
'IPAY',
22 'trustedtype' =>
'BillPay',
23 'hcuinterface' =>
'\["CLS","CMB"\]',
28 'Message' =>
"set to 1 to exclude ''CompanyID'' tag in Login XML" 32 'Default' =>
'https://moc.billpaysite.com/messaging/messagehandler.aspx',
36 'Default' =>
'https://moc.billpaysite.com/intro.asp',
44 'Default' =>
'https://www.billpaysite.com/messaging/messagehandler.aspx',
48 'Default' =>
'https://www.billpaysite.com/intro.asp',
53 'Message' =>
'issued by iPay / Jack Henry' 58 'Message' =>
'issued by iPay / Jack Henry' 63 'Message' =>
"From linux run pwgen 16 -C and pick a value" 76 'Message' =>
'0=Enroll using member number as AccountNumber or 1= Enroll using micraccount as AccountNumber' 86 public function up() {
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']) .
"'";
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'";