| @@ 245-251 (lines=7) @@ | ||
| 242 | if (in_array($command, $this->verifyRequestCommands(), true)) { |
|
| 243 | $client = $this->getClient($clientId); |
|
| 244 | ||
| 245 | if ($request === null) { |
|
| 246 | if (Yii::$app instanceof \yii\web\Application) { |
|
| 247 | $request = Yii::$app->getRequest(); |
|
| 248 | } else { |
|
| 249 | throw new InvalidArgumentException('Request instance arg must be set to verify return request is valid or not!'); |
|
| 250 | } |
|
| 251 | } |
|
| 252 | ||
| 253 | $data = $this->getVerifyRequestData($command, $request); |
|
| 254 | /** @var VerifiedData $requestData */ |
|
| @@ 297-303 (lines=7) @@ | ||
| 294 | { |
|
| 295 | if ($command === self::VRC_IPN) { |
|
| 296 | ||
| 297 | if ($request === null) { |
|
| 298 | if (Yii::$app instanceof \yii\web\Application) { |
|
| 299 | $request = Yii::$app->getRequest(); |
|
| 300 | } else { |
|
| 301 | throw new InvalidArgumentException('Request instance arg must be set to verify return request is valid or not!'); |
|
| 302 | } |
|
| 303 | } |
|
| 304 | ||
| 305 | $content = $this->getHttpClient()->post(self::VERIFY_IPN_URL, $request->post())->send()->getContent(); |
|
| 306 | ||