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