| 1 | <?php |
||
| 11 | class GetPaymentData extends AbstractGetPaymentData |
||
| 12 | { |
||
| 13 | |||
| 14 | use VerifyHttpStatusResponseCode; |
||
| 15 | |||
| 16 | const VERIFIED_TRANSACTION = 'Verification successful'; |
||
| 17 | |||
| 18 | const INVALID_TRANSACTION = "Invalid transaction reference"; |
||
| 19 | |||
| 20 | const TRANSACTION_VERIFICATION = '/transaction/verify/'; |
||
| 21 | |||
| 22 | protected $baseUrl; |
||
| 23 | |||
| 24 | public function __construct(string $baseUrl) |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @param string $reference |
||
| 31 | * @return mixed |
||
| 32 | * @throws \Gbowo\Adapter\Paystack\Exception\TransactionVerficationFailedException |
||
| 33 | */ |
||
| 34 | 4 | public function handle(string $reference) : array |
|
| 56 | |||
| 57 | /** |
||
| 58 | * @param string $link |
||
| 59 | * @return \Psr\Http\Message\ResponseInterface |
||
| 60 | */ |
||
| 61 | 4 | protected function verifyTransaction(string $link) |
|
| 66 | } |
||
| 67 |