Skip to content

Commit 95e9862

Browse files
authored
Merge pull request #3 from JesperFiltenborg/patch-1
fix: transact missing on instant completion
2 parents 5108084 + 7af17f8 commit 95e9862

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Http/Controllers/OmnipayController.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ public function purchase(Transaction $transaction)
4444
// We assume this means API driven
4545
if ($response->isTransparentRedirect()) {
4646
if ($response->isSuccessful()) {
47+
$transaction->transaction = $response->getTransactionReference();
4748
$transaction->status = Transaction::STATUS_PURCHASE_COMPLETE;
4849
$transaction->save();
4950
}
@@ -163,6 +164,7 @@ public function authorize(Transaction $transaction)
163164
// We assume this means API driven
164165
if ($response->isTransparentRedirect()) {
165166
if ($response->isSuccessful()) {
167+
$transaction->transaction = $response->getTransactionReference();
166168
$transaction->status = Transaction::STATUS_AUTHORIZE_COMPLETE;
167169
$transaction->save();
168170
}
@@ -304,6 +306,7 @@ public function capture(Transaction $transaction)
304306
]);
305307

306308
if ($response->isSuccessful()) {
309+
$transaction->transaction = $response->getTransactionReference();
307310
$transaction->status = Transaction::STATUS_CAPTURE;
308311
$transaction->save();
309312
} else {

0 commit comments

Comments
 (0)