mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fix for cancelled mollie payments
This commit is contained in:
parent
38ef857c14
commit
e4929c1008
@ -1,5 +1,7 @@
|
|||||||
<?php namespace App\Ninja\PaymentDrivers;
|
<?php namespace App\Ninja\PaymentDrivers;
|
||||||
|
|
||||||
|
use Exception;
|
||||||
|
|
||||||
class MolliePaymentDriver extends BasePaymentDriver
|
class MolliePaymentDriver extends BasePaymentDriver
|
||||||
{
|
{
|
||||||
public function completeOffsitePurchase($input)
|
public function completeOffsitePurchase($input)
|
||||||
@ -10,6 +12,12 @@ class MolliePaymentDriver extends BasePaymentDriver
|
|||||||
|
|
||||||
$response = $this->gateway()->fetchTransaction($details)->send();
|
$response = $this->gateway()->fetchTransaction($details)->send();
|
||||||
|
|
||||||
|
if ($response->isCancelled()) {
|
||||||
|
return false;
|
||||||
|
} elseif ( ! $response->isSuccessful()) {
|
||||||
|
throw new Exception($response->getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
return $this->createPayment($response->getTransactionReference());
|
return $this->createPayment($response->getTransactionReference());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user