mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-30 22:24:32 -04:00
Fixes for Check 3DS
This commit is contained in:
parent
26aa36d131
commit
7b97729eee
@ -13,7 +13,7 @@ class PaymentFailed extends Exception
|
|||||||
|
|
||||||
public function render($request)
|
public function render($request)
|
||||||
{
|
{
|
||||||
if (auth()->user()) {
|
if (auth()->user() || ($request->has('cko-session-id') && $request->query('cko-session-id') )) {
|
||||||
return render('gateways.unsuccessful', [
|
return render('gateways.unsuccessful', [
|
||||||
'message' => $this->getMessage(),
|
'message' => $this->getMessage(),
|
||||||
'code' => $this->getCode(),
|
'code' => $this->getCode(),
|
||||||
|
@ -84,8 +84,15 @@ trait Utilities
|
|||||||
|
|
||||||
public function processUnsuccessfulPayment(Payment $_payment, $throw_exception = true)
|
public function processUnsuccessfulPayment(Payment $_payment, $throw_exception = true)
|
||||||
{
|
{
|
||||||
$this->getParent()->sendFailureMail($_payment->response_summary);
|
|
||||||
// $this->getParent()->clientPaymentFailureMailer($_payment->status);
|
$error_message = '';
|
||||||
|
|
||||||
|
if(property_exists($_payment, 'server_response'))
|
||||||
|
$error_message = $_payment->response_summary;
|
||||||
|
elseif(property_exists($_payment, 'status'))
|
||||||
|
$error_message = $_payment->status;
|
||||||
|
|
||||||
|
$this->getParent()->sendFailureMail($error_message);
|
||||||
|
|
||||||
$message = [
|
$message = [
|
||||||
'server_response' => $_payment,
|
'server_response' => $_payment,
|
||||||
@ -102,7 +109,8 @@ trait Utilities
|
|||||||
);
|
);
|
||||||
|
|
||||||
if ($throw_exception) {
|
if ($throw_exception) {
|
||||||
throw new PaymentFailed($_payment->status . " " . optional($_payment)->response_summary, $_payment->http_code);
|
|
||||||
|
throw new PaymentFailed($_payment->status . " " . $error_message, $_payment->http_code);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user