| @@ 430-434 (lines=5) @@ | ||
| 427 | $this->fraudExplanation = (string)$this->xmlDoc->FraudExplanation; |
|
| 428 | ||
| 429 | $this->createdDate = \DateTimeImmutable::createFromFormat('Y-m-d H:i:s', (string)$this->xmlDoc->CreatedDate); |
|
| 430 | if ($this->createdDate === false) { |
|
| 431 | $exception = new ResponseException('The created date format is wrong'); |
|
| 432 | $exception->setResponse($this->getOriginalResponse()); |
|
| 433 | throw $exception; |
|
| 434 | } |
|
| 435 | ||
| 436 | $this->updatedDate = \DateTimeImmutable::createFromFormat('Y-m-d H:i:s', (string)$this->xmlDoc->UpdatedDate); |
|
| 437 | if ($this->updatedDate === false) { |
|
| @@ 437-441 (lines=5) @@ | ||
| 434 | } |
|
| 435 | ||
| 436 | $this->updatedDate = \DateTimeImmutable::createFromFormat('Y-m-d H:i:s', (string)$this->xmlDoc->UpdatedDate); |
|
| 437 | if ($this->updatedDate === false) { |
|
| 438 | $exception = new ResponseException('The updated date format is wrong'); |
|
| 439 | $exception->setResponse($this->getOriginalResponse()); |
|
| 440 | throw $exception; |
|
| 441 | } |
|
| 442 | ||
| 443 | // populating payment nature service object |
|
| 444 | $this->paymentNatureService = new PaymentNatureService( |
|
| @@ 82-86 (lines=5) @@ | ||
| 79 | $this->type = (string)$this->xmlDoc->Type; |
|
| 80 | ||
| 81 | $this->date = \DateTimeImmutable::createFromFormat(DATE_RFC3339, (string)$this->xmlDoc->Date); |
|
| 82 | if ($this->date === false) { |
|
| 83 | $exception = new ResponseException('The date format is wrong'); |
|
| 84 | $exception->setResponse($this->getOriginalResponse()); |
|
| 85 | throw $exception; |
|
| 86 | } |
|
| 87 | } |
|
| 88 | } |
|
| 89 | ||