Created
October 17, 2018 18:22
-
-
Save davidchc/d66d9b5ec6ade1872b408c8282c8da0c 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 PaymentConfig | |
{ | |
private $data = []; | |
public function set($key, $value) | |
{ | |
$this->data[$key] = $value; | |
} | |
public function get($key) | |
{ | |
return $this->data[$key] ?? null ; | |
} | |
public function has($key) | |
{ | |
return isset($this->data[$key]); | |
} | |
} | |
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 | |
interface RecurringPayment | |
{ | |
public function create(PaymentConfig $config); | |
public function setResponse($data); | |
public function getResponse(); | |
} |
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 | |
interface RecurringPaymentController | |
{ | |
public function confirm(); | |
public function callback(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment