1
0
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:
Hillel Coren 2016-08-11 13:17:01 +03:00
parent 38ef857c14
commit e4929c1008

View File

@ -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());
}