Skip to content

Commit

Permalink
VB2C-346: profile data is reverted with erroneous transaction
Browse files Browse the repository at this point in the history
CR fixes
  • Loading branch information
Serhiy Shkolyarenko committed Feb 13, 2019
1 parent 8a8c86d commit f4961cc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Gateway/Http/Client/Curl.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class Curl implements ClientInterface
/**
* @var array
*/
private $knownFields = [
private $allowedFields = [
'orderId',
'customerInfo',
'merchantInfo',
Expand Down Expand Up @@ -160,10 +160,10 @@ private function place(TransferInterface $transfer)
*/
private function preparePostFields($fields)
{
$knownFields = $this->knownFields;
$allowedFields = $this->allowedFields;
$fields = array_filter(
$fields,
function ($key) use ($knownFields) { return in_array($key, $knownFields, false);},
function ($key) use ($allowedFields) { return in_array($key, $allowedFields);},
ARRAY_FILTER_USE_KEY
);

Expand Down
2 changes: 1 addition & 1 deletion Model/Profiling/Profiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public function save(TransferInterface $transfer, Response $response)
$itemDO->setStatusCode($response->getStatusCode());
$itemDO->setIncrementId($orderId);
$itemDO->setResponse($this->packArray($this->parseResponse($response)));
$itemDO->setCreatedAt(date(\Magento\Framework\Stdlib\DateTime::DATETIME_PHP_FORMAT));
$itemDO->setCreatedAt(gmdate(\Magento\Framework\Stdlib\DateTime::DATETIME_PHP_FORMAT));

$item = $this->itemRepository->save($itemDO);
return $item->getEntityId();
Expand Down

0 comments on commit f4961cc

Please sign in to comment.