1 | <?php |
||
12 | class UnsubscribeCustomer extends AbstractPlugin |
||
13 | { |
||
14 | use KeyVerifier; |
||
15 | |||
16 | const UN_SUBSCRIBE_LINK = "/subscription/cancel"; |
||
17 | |||
18 | /** |
||
19 | * It's with a double `ll` |
||
20 | * @see https://amplifypay.com/developers Unsubscribe a customer from plan |
||
21 | * @var string |
||
22 | */ |
||
23 | const STATUS_DESCRIPTION_SUCCESS = "Successfull Request"; |
||
24 | |||
25 | const STATUS_DESCRIPTION_FAILURE = "Unsuccessfull Request"; |
||
26 | |||
27 | protected $baseUrl; |
||
28 | |||
29 | protected $apiKeys; |
||
30 | |||
31 | 25 | public function __construct(string $baseUrl, array $apiKeys) |
|
36 | |||
37 | 25 | public function getPluginAccessor() :string |
|
41 | |||
42 | /** |
||
43 | * @param array $args |
||
44 | * @return mixed |
||
45 | * @throws \Gbowo\Exception\TransactionVerficationFailedException |
||
46 | * @throws \Gbowo\Exception\InvalidHttpResponseException if we don't get a 200 Status code |
||
47 | */ |
||
48 | 3 | public function handle(array $args) |
|
81 | } |
||
82 |