Esempio n. 1
0
 /**
  * Instantiates III tools class and returns a usable object.
  */
 private function get_tools($cardnum, $pin)
 {
     require_once 'iiitools_2007.php';
     $iii = new iiitools();
     $iii->set_iiiserver(self::iii_server_info());
     $iii->set_cardnum($cardnum);
     $iii->set_pin($pin);
     return $iii;
 }
Esempio n. 2
0
 /**
  * Pays patron fines.
  * @param string $cardnum Patron barcode/card number
  * @param string $pin Patron pin/password
  * @param array payment_details
  * @return array Payment result
  */
 public function pay_patron_fines($cardnum, $pin = NULL, $payment_details)
 {
     require_once 'iiitools_2006.php';
     $iii = new iiitools();
     $iii->set_iiiserver($this->locum_config[ils_config][ils_server]);
     $iii->set_cardnum($cardnum);
     $iii->set_pin($pin);
     if ($iii->catalog_login() == FALSE) {
         return FALSE;
     }
     foreach ($payment_details[varnames] as $varname) {
         $iii_payment_details[$varname] = 'on';
     }
     $iii_payment_details[amount] = '$' . number_format($payment_details[total], 2);
     $iii_payment_details[ccname] = $payment_details[name];
     $iii_payment_details[address1] = $payment_details[address1];
     $iii_payment_details[city] = $payment_details[city];
     $iii_payment_details[state] = $payment_details[state];
     $iii_payment_details[zip] = $payment_details[zip];
     $iii_payment_details[emailaddr] = $payment_details[email];
     $iii_payment_details[ccnum] = $payment_details[ccnum];
     $iii_payment_details[ccexpmonth] = $payment_details[ccexpmonth];
     $iii_payment_details[ccexpyear] = $payment_details[ccexpyear];
     $iii_payment_details[cc_cvv2] = $payment_details[ccseccode];
     $payment_result = $iii->pay_fine($iii_payment_details);
     return $payment_result;
 }