Exemple #1
0
 /**
  *  Add country ID to start request
  *  @param Request $request 
  */
 public function beforeStart($request)
 {
     if (!$this->country) {
         throw new Exception("No country selected for Sofort Banking");
     }
     $request->bind("country", $this->country);
     $request->bind("type", 1);
 }
Exemple #2
0
 /**
  *  Get list with bank codes
  *  @param string $bank 4-digit bank code, obtained by Ideal::bankList()
  *  @return array List with banks
  */
 public function bankList()
 {
     $request = new Request("https://www.targetpay.com/api/idealplugins?banklist=IDE");
     $xml = $request->execute();
     if (!$xml) {
         $banks_array["IDE0001"] = "Bankenlijst kon niet opgehaald worden bij TargetPay, controleer of curl werkt!";
         $banks_array["IDE0002"] = "  ";
     } else {
         $banks_object = new SimpleXMLElement($xml);
         foreach ($banks_object->bank as $bank) {
             $banks_array["{$bank->bank_id}"] = "{$bank->bank_name}";
         }
     }
     return $banks_array;
 }
 /**
  *  Check transaction with TargetPay
  */
 public function check()
 {
     // Create request object
     $request = new Request($this->checkApi);
     // Fill it up
     $request->bind(array("rtlo" => $this->rtlo, "trxid" => $this->txid, "test" => $this->test, "checksum" => md5($this->txid . $this->rtlo . self::SALT)));
     // Run check
     $httpResponse = $request->execute();
     // Make check response object and return it
     return $this->parseCheckResponse($httpResponse);
 }