| @@ 285-291 (lines=7) @@ | ||
| 282 | { |
|
| 283 | if ($command === self::VRC_IPN) { |
|
| 284 | ||
| 285 | if ($request === null) { |
|
| 286 | if (Yii::$app instanceof \yii\web\Application) { |
|
| 287 | $request = Yii::$app->getRequest(); |
|
| 288 | } else { |
|
| 289 | throw new InvalidArgumentException('Request instance arg must be set to verify return request is valid or not!'); |
|
| 290 | } |
|
| 291 | } |
|
| 292 | ||
| 293 | $content = $this->getHttpClient()->post(self::VERIFY_IPN_URL, $request->post())->send()->getContent(); |
|
| 294 | ||
| @@ 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 */ |
|