Skip to content

Commit

Permalink
Merge pull request #10 from nuryagdym/nuryagdym-updates
Browse files Browse the repository at this point in the history
Don't finish payment if 3D Authentication is Failed
  • Loading branch information
mewebstudio authored Jun 24, 2020
2 parents a33c15e + 6e9860d commit 9552bb1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/PosNet.php
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,10 @@ public function make3DPayment()
$transaction_security = 'Half 3D Secure';
$status = 'approved';
}


//if 3D Authentication is failed
if($status != 'approved') goto end;

$nodes = [
'posnetRequest' => [
'mid' => $this->account->client_id,
Expand All @@ -551,8 +554,6 @@ public function make3DPayment()
$this->send($contents);
}

$this->response = (object) $this->data;

if ($this->data->approved != 1) {
$status = 'declined';
}
Expand Down

0 comments on commit 9552bb1

Please sign in to comment.