Last active
December 17, 2017 13:35
-
-
Save darkin1/b326e9f1050bdd030f7ecc717cc7aa66 to your computer and use it in GitHub Desktop.
This file contains 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 | |
class Checkout | |
{ | |
public function payment($type) | |
{ | |
if ($type == 'cash') { | |
$payment = 'cash';//new Chash(); | |
} elseif ($type == 'credit-card') { | |
$payment = 'creadit card';//new CreditCard(); | |
} elseif ($type == 'bitcoin') { | |
$payment = 'bitcoin';//new Bitcoin(); | |
} | |
return $payment; | |
} | |
} | |
$checkout = new Checkout(); | |
echo $checkout->payment('bitcoin'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment