Skip to content

Commit

Permalink
Remove delay logic (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
imeleshko authored and guacamoli committed Nov 6, 2018
1 parent 03544ea commit 792027a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion .gitignore

This file was deleted.

7 changes: 3 additions & 4 deletions modules/gateways/callback/coinbase.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ class Webhook
*/
private $gatewayParams;


public function __construct()
{
$this->init();
Expand Down Expand Up @@ -75,8 +74,8 @@ public function process()
$this->log(sprintf('Charge %s was created. Awaiting payment.', $charge['id']));
return;
case 'UNRESOLVED':
// mark order as paid on overpaid or delayed
if ($lastTimeLine['context'] === 'OVERPAID' || $lastTimeLine['context'] === 'DELAYED') {
// mark order as paid on overpaid
if ($lastTimeLine['context'] === 'OVERPAID') {
$this->handlePaid($orderId, $charge);
} else {
$this->log(sprintf('Charge %s was unresolved.', $charge['id']));
Expand Down Expand Up @@ -149,7 +148,7 @@ private function getCharge($chargeId)
}

if ($charge->metadata[METADATA_SOURCE_PARAM] != METADATA_SOURCE_VALUE) {
$this->failProcess( 'Not whmcs charge');
$this->failProcess( 'Not ' . METADATA_SOURCE_VALUE . ' charge');
}

return $charge;
Expand Down
1 change: 1 addition & 0 deletions modules/gateways/coinbase.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,4 @@ function coinbase_link($params)

return $form;
}

0 comments on commit 792027a

Please sign in to comment.