mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-31 17:14:34 -04:00
fixes for checkout payment gateway
This commit is contained in:
parent
d071ed0d3b
commit
f061fd49f9
@ -295,17 +295,19 @@ class CheckoutComPaymentDriver extends BaseDriver
|
|||||||
|
|
||||||
public function processInternallyFailedPayment($e, $state)
|
public function processInternallyFailedPayment($e, $state)
|
||||||
{
|
{
|
||||||
$message = json_decode($e->getBody());
|
$error_message = json_decode($e->getBody());
|
||||||
|
|
||||||
PaymentFailureMailer::dispatch($this->client, $message->error_type, $this->client->company, $state['value']);
|
PaymentFailureMailer::dispatch($this->client, $error_message->message, $this->client->company, $state['value']);
|
||||||
|
|
||||||
$message = [
|
$message = [
|
||||||
'server_response' => $state['server_response'],
|
'server_response' => $state['server_response'],
|
||||||
'data' => $message,
|
'data' => $e->getBody(),
|
||||||
];
|
];
|
||||||
|
|
||||||
SystemLogger::dispatch($message, SystemLog::CATEGORY_GATEWAY_RESPONSE, SystemLog::EVENT_GATEWAY_FAILURE, SystemLog::TYPE_CHECKOUT, $this->client);
|
SystemLogger::dispatch($message, SystemLog::CATEGORY_GATEWAY_RESPONSE, SystemLog::EVENT_GATEWAY_FAILURE, SystemLog::TYPE_CHECKOUT, $this->client);
|
||||||
|
|
||||||
|
//todo push to a error page with the exception message.
|
||||||
|
|
||||||
throw new \Exception('Failed to process the payment.', 1);
|
throw new \Exception('Failed to process the payment.', 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,7 +75,9 @@ class UpdateInvoicePayment
|
|||||||
->updateBalance($paid_amount * -1)
|
->updateBalance($paid_amount * -1)
|
||||||
->save();
|
->save();
|
||||||
|
|
||||||
|
info("firing invoice was updated event");
|
||||||
event(new InvoiceWasUpdated($invoice, $invoice->company, Ninja::eventVars()));
|
event(new InvoiceWasUpdated($invoice, $invoice->company, Ninja::eventVars()));
|
||||||
|
info("fired invoice was updated event");
|
||||||
});
|
});
|
||||||
|
|
||||||
return $this->payment;
|
return $this->payment;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user