Skip to content

Commit 68aef06

Browse files
authored
Merge pull request #8 from firewizard/master
added flag for not sending reponse automatically
2 parents f36d4a1 + ef33cc4 commit 68aef06

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/MobilpayGateway.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,16 @@ public function purchase($autoRedirect = true)
3030
return $response;
3131
}
3232

33-
public function response()
33+
public function response($autoSendResponse = true)
3434
{
3535
$gateway = Omnipay::create('MobilPay');
3636
$gateway->setPrivateKey(config('mobilpay.private_key_path'));
3737

3838
$response = $gateway->completePurchase($_POST)->send();
39-
$response->sendResponse();
39+
40+
if ($autoSendResponse) {
41+
$response->sendResponse();
42+
}
4043

4144
return $response;
4245
}

0 commit comments

Comments
 (0)