Skip to content

Instantly share code, notes, and snippets.

@davidchc
Created October 17, 2018 18:22
Show Gist options
  • Save davidchc/d66d9b5ec6ade1872b408c8282c8da0c to your computer and use it in GitHub Desktop.
Save davidchc/d66d9b5ec6ade1872b408c8282c8da0c to your computer and use it in GitHub Desktop.
<?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]);
}
}
<?php
interface RecurringPayment
{
public function create(PaymentConfig $config);
public function setResponse($data);
public function getResponse();
}
<?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