Skip to content
Open
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions Paycom/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ private function CancelTransaction()

// change order state to cancelled
$order = new Order($this->request->id);
$order->find($this->request->params);
$order->find(['order_id' => $found->order_id]);
$order->changeState(Order::STATE_CANCELLED);

// send response
Expand All @@ -298,7 +298,7 @@ private function CancelTransaction()
case Transaction::STATE_COMPLETED:
// find order and check, whether cancelling is possible this order
$order = new Order($this->request->id);
$order->find($this->request->params);
$order->find(['order_id' => $found->order_id]);
if ($order->allowCancel()) {
// cancel and change state to cancelled
$found->cancel(1 * $this->request->params['reason']);
Expand Down
3 changes: 3 additions & 0 deletions Paycom/Format.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ public static function datetime2timestamp($datetime)
if ($datetime) {
return 1000 * strtotime($datetime);
}
if (is_null($datetime)) {
return 0;
}

return $datetime;
}
Expand Down