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