Skip to content

Commit

Permalink
Merge branch 'master' of github.com:addgod/laravel-omnipay
Browse files Browse the repository at this point in the history
  • Loading branch information
addgod committed Jun 4, 2024
2 parents 6aa737a + 95e9862 commit d23ed30
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 @@ -160,6 +161,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 @@ -299,6 +301,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 d23ed30

Please sign in to comment.