| @@ 245-249 (lines=5) @@ | ||
| 242 | if (in_array($command, $this->verifyRequestCommands(), true)) { |
|
| 243 | $client = $this->getClient($clientId); |
|
| 244 | ||
| 245 | if ($request === null && Yii::$app instanceof \yii\web\Application) { |
|
| 246 | $request = Yii::$app->getRequest(); |
|
| 247 | } else { |
|
| 248 | throw new InvalidArgumentException('Request instance arg must be set to verify return request is valid or not!'); |
|
| 249 | } |
|
| 250 | ||
| 251 | $data = $this->getVerifyRequestData($command, $request); |
|
| 252 | /** @var VerifiedData $requestData */ |
|
| @@ 285-289 (lines=5) @@ | ||
| 282 | { |
|
| 283 | if ($command === self::VRC_IPN) { |
|
| 284 | ||
| 285 | if ($request === null && Yii::$app instanceof \yii\web\Application) { |
|
| 286 | $request = Yii::$app->getRequest(); |
|
| 287 | } else { |
|
| 288 | throw new InvalidArgumentException('Request instance arg must be set to verify return request is valid or not!'); |
|
| 289 | } |
|
| 290 | ||
| 291 | $content = $this->getHttpClient()->post(self::VERIFY_IPN_URL, $request->post())->send()->getContent(); |
|
| 292 | ||