Skip to content

Commit 87b1e49

Browse files
Anet wip
1 parent a3b5ac0 commit 87b1e49

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

vendor/omnipay/authorizenet/src/Message/AIMAbstractRequest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public function setDeveloperEndpoint($value)
9797

9898
public function getEndpoint()
9999
{
100-
return $this->getDeveloperMode() ? $this->getDeveloperEndpoint() : $this->getLiveEndpoint();
100+
return $this->getDeveloperMode() || $this->getTestMode() ? $this->getDeveloperEndpoint() : $this->getLiveEndpoint();
101101
}
102102

103103
/**
@@ -113,10 +113,13 @@ public function setTransactionReference($value)
113113
if (substr($value, 0, 1) === '{') {
114114
// Value is a complex key containing the transaction ID and other properties
115115
$transactionRef = new TransactionReference($value);
116+
$data = json_decode($value);
117+
$transactionRef = $data->transId;
116118
} else {
117119
// Value just contains the transaction ID
118120
$transactionRef = new TransactionReference();
119121
$transactionRef->setTransId($value);
122+
$transactionRef = $value;
120123
}
121124

122125
return $this->setParameter('transactionReference', $transactionRef);

vendor/omnipay/authorizenet/src/Message/AIMCaptureRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public function getData()
1515

1616
$data = $this->getBaseData();
1717
$data->transactionRequest->amount = $this->getAmount();
18-
$data->transactionRequest->refTransId = $this->getTransactionReference()->getTransId();
18+
$data->transactionRequest->refTransId = $this->getTransactionReference();
1919
$this->addTransactionSettings($data);
2020

2121
return $data;

vendor/omnipay/authorizenet/src/Message/AIMResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ public function getTransactionReference($serialize = true)
134134
}
135135
} catch (\Exception $e) {
136136
}
137-
137+
return (string)$body->transId;
138138
return $serialize ? (string)$transactionRef : $transactionRef;
139139
}
140140
}

0 commit comments

Comments
 (0)