Created
November 15, 2020 12:40
-
-
Save ksmylmz/52809a6df69a15e4086aef37eb9806b8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| public class Cart | |
| { | |
| public $KartIsım; | |
| public $Kartno; | |
| public $KartGecerlilikAy; | |
| public $KartGecerlilikYıl; | |
| public $CVC; | |
| } | |
| public interface ITekCekimOdeme | |
| { | |
| public function tekCekimOdemeAl(); | |
| } | |
| public interface ITaksitliCekimOdeme | |
| { | |
| public function taksitliOdemeAl(); | |
| } | |
| public class KrediKart extends Card implements ITekCekimOdeme,ITaksitliCekimOdeme | |
| { | |
| public function __construct(Card $card) | |
| { | |
| $this->KartIsım = $card->KartIsım; | |
| $this->Kartno = $card->Kartno; | |
| $this->KartGecerlilikAy = $card->KartGecerlilikAy; | |
| $this->KartGecerlilikYıl = $card->KartGecerlilikYıl; | |
| $this->CVC = $card->CVC; | |
| } | |
| public function tekCekimOdemeAl() | |
| { | |
| //tekçekim odemealmaişlemleri | |
| } | |
| public function taksitliOdemeAl() | |
| { | |
| //tekçekim odemealmaişlemleri | |
| } | |
| public function fraudKontrol() | |
| { | |
| //fraudKontrol | |
| } | |
| } | |
| public class DebitKart extends Card implements ITekCekimOdeme | |
| { | |
| public function __construct(Card $card) | |
| { | |
| $this->KartIsım = $card->KartIsım; | |
| $this->Kartno = $card->Kartno; | |
| $this->KartGecerlilikAy = $card->KartGecerlilikAy; | |
| $this->KartGecerlilikYıl = $card->KartGecerlilikYıl; | |
| $this->CVC = $card->CVC; | |
| } | |
| public function tekCekimOdemeAl() | |
| { | |
| //tekçekim odemealmaişlemleri | |
| } | |
| public function fraudKontrol() | |
| { | |
| //fraudKontrol | |
| } | |
| } | |
| ITekCekimOdeme $tekçekim = new KrediKart(); | |
| $tekçekim->tekCekimOdemeAl(); | |
| ITaksitliCekimOdeme $taksitliOdeme = new KrediKart(); | |
| $tekçekim->taksitliOdemeAl(); | |
| /////////////// | |
| ITekCekimOdeme $tekçekim = new DebitKart(); | |
| $tekçekim->tekCekimOdemeAl(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment