mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 21:22:58 +01: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)
|
||||
{
|
||||
$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 = [
|
||||
'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);
|
||||
|
||||
|
||||
//todo push to a error page with the exception message.
|
||||
|
||||
throw new \Exception('Failed to process the payment.', 1);
|
||||
}
|
||||
|
||||
|
@ -75,7 +75,9 @@ class UpdateInvoicePayment
|
||||
->updateBalance($paid_amount * -1)
|
||||
->save();
|
||||
|
||||
info("firing invoice was updated event");
|
||||
event(new InvoiceWasUpdated($invoice, $invoice->company, Ninja::eventVars()));
|
||||
info("fired invoice was updated event");
|
||||
});
|
||||
|
||||
return $this->payment;
|
||||
|
Loading…
Reference in New Issue
Block a user