| Total Complexity | 5 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | class QueryRefundPlugin extends GeneralPlugin |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * @throws \Yansongda\Pay\Exception\InvalidParamsException |
||
| 19 | */ |
||
| 20 | protected function getUri(Rocket $rocket): string |
||
| 21 | { |
||
| 22 | $payload = $rocket->getPayload(); |
||
| 23 | |||
| 24 | if (is_null($payload->get('out_refund_no'))) { |
||
| 25 | throw new InvalidParamsException(Exception::MISSING_NECESSARY_PARAMS); |
||
| 26 | } |
||
| 27 | |||
| 28 | return 'v3/refund/domestic/refunds/'.$payload->get('out_refund_no'); |
||
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @throws \Yansongda\Pay\Exception\ContainerException |
||
| 33 | * @throws \Yansongda\Pay\Exception\ServiceNotFoundException |
||
| 34 | */ |
||
| 35 | protected function getPartnerUri(Rocket $rocket): string |
||
| 41 | } |
||
| 42 | |||
| 43 | protected function getMethod(): string |
||
| 46 | } |
||
| 47 | |||
| 48 | protected function doSomething(Rocket $rocket): void |
||
| 53 |