Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions Paycom/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ private function CheckTransaction()

// todo: Prepare and send found transaction
$this->response->send([
'create_time' => Format::datetime2timestamp($found->create_time),
'perform_time' => Format::datetime2timestamp($found->perform_time),
'cancel_time' => Format::datetime2timestamp($found->cancel_time),
'create_time' => Format::timestamp2milliseconds(Format::datetime2timestamp($found->create_time)),
'perform_time' => (Format::datetime2timestamp($found->perform_time) != null) ? Format::timestamp2milliseconds(Format::datetime2timestamp($found->perform_time)) : 0,
'cancel_time' => (Format::datetime2timestamp($found->cancel_time) != null) ? Format::timestamp2milliseconds(Format::datetime2timestamp($found->cancel_time)) : 0,
'transaction' => $found->id,
'state' => $found->state,
'reason' => isset($found->reason) ? 1 * $found->reason : null
Expand Down Expand Up @@ -177,7 +177,7 @@ private function CreateTransaction()

// send response
$this->response->send([
'create_time' => $create_time,
'create_time' => Format::timestamp2milliseconds($create_time),
'transaction' => $transaction->id,
'state' => $transaction->state,
'receivers' => null
Expand Down Expand Up @@ -219,7 +219,7 @@ private function PerformTransaction()

$this->response->send([
'transaction' => $found->id,
'perform_time' => $perform_time,
'perform_time' => Format::timestamp2milliseconds($perform_time),
'state' => $found->state
]);
}
Expand All @@ -229,7 +229,7 @@ private function PerformTransaction()
// todo: If transaction completed, just return it
$this->response->send([
'transaction' => $found->id,
'perform_time' => Format::datetime2timestamp($found->perform_time),
'perform_time' => Format::timestamp2milliseconds(Format::datetime2timestamp($found->perform_time)),
'state' => $found->state
]);
break;
Expand Down Expand Up @@ -262,7 +262,7 @@ private function CancelTransaction()
case Transaction::STATE_CANCELLED_AFTER_COMPLETE:
$this->response->send([
'transaction' => $found->id,
'cancel_time' => Format::datetime2timestamp($found->cancel_time),
'cancel_time' => Format::timestamp2milliseconds(Format::datetime2timestamp($found->cancel_time)),
'state' => $found->state
]);
break;
Expand All @@ -281,7 +281,7 @@ private function CancelTransaction()
// send response
$this->response->send([
'transaction' => $found->id,
'cancel_time' => Format::datetime2timestamp($found->cancel_time),
'cancel_time' => Format::timestamp2milliseconds(Format::datetime2timestamp($found->cancel_time)),
'state' => $found->state
]);
break;
Expand All @@ -300,7 +300,7 @@ private function CancelTransaction()
// send response
$this->response->send([
'transaction' => $found->id,
'cancel_time' => Format::datetime2timestamp($found->cancel_time),
'cancel_time' => Format::timestamp2milliseconds(Format::datetime2timestamp($found->cancel_time)),
'state' => $found->state
]);
} else {
Expand Down Expand Up @@ -361,4 +361,4 @@ private function GetStatement()
// send results back
$this->response->send(['transactions' => $transactions]);
}
}
}