Skip to content

Commit

Permalink
Merge pull request #8 from firewizard/master
Browse files Browse the repository at this point in the history
added flag for not sending reponse automatically
  • Loading branch information
adrianbarbos authored Oct 17, 2019
2 parents f36d4a1 + ef33cc4 commit 68aef06
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/MobilpayGateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,16 @@ public function purchase($autoRedirect = true)
return $response;
}

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

$response = $gateway->completePurchase($_POST)->send();
$response->sendResponse();

if ($autoSendResponse) {
$response->sendResponse();
}

return $response;
}
Expand Down

0 comments on commit 68aef06

Please sign in to comment.