Skip to content

Commit

Permalink
YKB PosNet 3D fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
mewebstudio committed Dec 9, 2019
1 parent 7889ae1 commit 897aeb5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/PosNet.php
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ public function make3DPayment()
$this->send($contents);
}

if ($this->getProcReturnCode() == '00' && $this->getStatusDetail() == 'approved' && $this->getStatusDetail() == 'approved') {
if ($this->getProcReturnCode() == '00' && $this->getStatusDetail() == 'approved') {
if ($this->data->oosResolveMerchantDataResponse->mdStatus == '1') {
$transaction_security = 'Full 3D Secure';
$status = 'approved';
Expand All @@ -525,7 +525,7 @@ public function make3DPayment()
}

$nodes = [
'posnetRequest' => [
'posnetRequest' => [
'mid' => $this->account->client_id,
'tid' => $this->account->terminal_id,
'oosTranData' => [
Expand All @@ -543,6 +543,10 @@ public function make3DPayment()

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

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

$this->response = (object) [
'id' => isset($this->data->AuthCode) ? $this->printData($this->data->AuthCode) : null,
'order_id' => isset($this->order->id) ? $this->printData($this->order->id) : null,
Expand Down

0 comments on commit 897aeb5

Please sign in to comment.