Skip to content

Commit

Permalink
Merge pull request #3 from JesperFiltenborg/patch-1
Browse files Browse the repository at this point in the history
fix: transact missing on instant completion
  • Loading branch information
addgod authored Mar 5, 2024
2 parents 5108084 + 7af17f8 commit 95e9862
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Http/Controllers/OmnipayController.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public function purchase(Transaction $transaction)
// We assume this means API driven
if ($response->isTransparentRedirect()) {
if ($response->isSuccessful()) {
$transaction->transaction = $response->getTransactionReference();
$transaction->status = Transaction::STATUS_PURCHASE_COMPLETE;
$transaction->save();
}
Expand Down Expand Up @@ -163,6 +164,7 @@ public function authorize(Transaction $transaction)
// We assume this means API driven
if ($response->isTransparentRedirect()) {
if ($response->isSuccessful()) {
$transaction->transaction = $response->getTransactionReference();
$transaction->status = Transaction::STATUS_AUTHORIZE_COMPLETE;
$transaction->save();
}
Expand Down Expand Up @@ -304,6 +306,7 @@ public function capture(Transaction $transaction)
]);

if ($response->isSuccessful()) {
$transaction->transaction = $response->getTransactionReference();
$transaction->status = Transaction::STATUS_CAPTURE;
$transaction->save();
} else {
Expand Down

0 comments on commit 95e9862

Please sign in to comment.