Ejemplo n.º 1
0
 /**
  * Delete a payment
  *
  * @param PaymentEntity the payment object
  */
 public function delete(PaymentEntity $payment)
 {
     $sql = "DELETE FROM Payment WHERE OrderId = :id";
     $stmt = $this->db->prepare($sql);
     $result = $stmt->execute(["id" => $payment->getId()]);
     if (!$result) {
         throw new Exception("could not delete record");
     }
     return $result;
 }