1 | <?php |
||
10 | class GetPaymentData extends AbstractGetPaymentData |
||
11 | { |
||
12 | use KeyVerifier; |
||
13 | |||
14 | const APPROVED_TRANSACTION_STATUS = "APPROVED"; |
||
15 | |||
16 | const UNAPPROVED_TRANSACTION_STATUS = "UNAPPROVED"; |
||
17 | |||
18 | const TRANSACTION_VERIFICATION = '/verify'; |
||
19 | |||
20 | protected $baseUrl; |
||
21 | |||
22 | protected $apiKeys; |
||
23 | |||
24 | 25 | public function __construct(string $baseUrl, array $apiKeys) |
|
29 | |||
30 | /** |
||
31 | * @param string $transactionRef |
||
32 | * @return mixed |
||
33 | * @throws \Gbowo\Adapter\AmplifyPay\Exception\TransactionVerficationFailedException if the transaction failed |
||
34 | * @throws \Gbowo\Exception\InvalidHttpResponseException if the status code isn't 200 |
||
35 | */ |
||
36 | 3 | public function handle(string $transactionRef) |
|
67 | |||
68 | /** |
||
69 | * @param string $link |
||
70 | * @return \Psr\Http\Message\ResponseInterface |
||
71 | */ |
||
72 | 3 | protected function verifyTransaction(string $link) |
|
77 | } |
||
78 |