Ejemplo n.º 1
0
     * @return String
     */
    public function getFriendlyType()
    {
        return $this->friendlyType;
    }
    /**
     * @param String $type
     */
    private function setType($type)
    {
        $this->type = $type;
        if (!array_key_exists($type, self::$TYPES)) {
            self::$TYPES[$type] = $this;
        }
    }
    public function equals(PaymentType $obj)
    {
        return $this->getType() == $obj->getType();
    }
}
PaymentType::$GIFT_CARD = new PaymentType("GIFT_CARD", "Gift Card");
PaymentType::$CREDIT_CARD = new PaymentType("CREDIT_CARD", "Credit Card");
PaymentType::$BANK_ACCOUNT = new PaymentType("BANK_ACCOUNT", "Bank Account");
PaymentType::$CHECK = new PaymentType("CHECK", "Check");
PaymentType::$ELECTRONIC_CHECK = new PaymentType("ELECTRONIC_CHECK", "Electronic Check");
PaymentType::$WIRE = new PaymentType("WIRE", "Wire Transfer");
PaymentType::$MONEY_ORDER = new PaymentType("MONEY_ORDER", "Money Order");
PaymentType::$CUSTOMER_CREDIT = new PaymentType("CUSTOMER_CREDIT", "Customer Credit");
PaymentType::$COD = new PaymentType("COD", "Collect On Delivery");
PaymentType::$THIRD_PARTY_ACCOUNT = new PaymentType("THIRD_PARTY_ACCOUNT", "3rd-Party Account");