| Total Complexity | 4 |
| Total Lines | 38 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | class ReturnAdvancePlugin extends GeneralPlugin |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * @throws \Yansongda\Pay\Exception\InvalidParamsException |
||
| 17 | */ |
||
| 18 | protected function getUri(Rocket $rocket): string |
||
| 21 | } |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @throws \Yansongda\Pay\Exception\InvalidParamsException |
||
| 25 | */ |
||
| 26 | protected function getPartnerUri(Rocket $rocket): string |
||
| 27 | { |
||
| 28 | $payload = $rocket->getPayload(); |
||
| 29 | |||
| 30 | if (is_null($payload->get('refund_id'))) { |
||
| 31 | throw new InvalidParamsException(Exception::MISSING_NECESSARY_PARAMS); |
||
| 32 | } |
||
| 33 | |||
| 34 | return 'v3/ecommerce/refunds/'.$payload->get('refund_id').'/return-advance'; |
||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @throws \Yansongda\Pay\Exception\ContainerDependencyException |
||
| 39 | * @throws \Yansongda\Pay\Exception\ContainerException |
||
| 40 | * @throws \Yansongda\Pay\Exception\ServiceNotFoundException |
||
| 41 | */ |
||
| 42 | protected function doSomething(Rocket $rocket): void |
||
| 51 | } |
||
| 52 | } |
||
| 53 |