mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 17:54:30 -04:00
Catch exception in Authorize - failedResponse method
This commit is contained in:
parent
066e6aaf72
commit
bf6436e350
@ -98,29 +98,8 @@ class AuthorizeCreditCard
|
|||||||
/*Refactor and push to BaseDriver*/
|
/*Refactor and push to BaseDriver*/
|
||||||
if ($data['response'] != null && $data['response']->getMessages()->getResultCode() == 'Ok') {
|
if ($data['response'] != null && $data['response']->getMessages()->getResultCode() == 'Ok') {
|
||||||
|
|
||||||
// $response = $data['response'];
|
|
||||||
|
|
||||||
// $payment_record = [];
|
|
||||||
// $payment_record['amount'] = $amount;
|
|
||||||
// $payment_record['payment_type'] = PaymentType::CREDIT_CARD_OTHER;;
|
|
||||||
// $payment_record['transaction_reference'] = $response->getTransactionResponse()->getTransId();
|
|
||||||
|
|
||||||
// $this->authorize->createPayment($payment_record);
|
|
||||||
|
|
||||||
$this->storePayment($payment_hash, $data);
|
$this->storePayment($payment_hash, $data);
|
||||||
|
|
||||||
// $payment = $this->createPaymentRecord($data, $amount);
|
|
||||||
// $payment->meta = $cgt->meta;
|
|
||||||
// $payment->save();
|
|
||||||
|
|
||||||
// $payment_hash->payment_id = $payment->id;
|
|
||||||
// $payment_hash->save();
|
|
||||||
|
|
||||||
// $this->authorize->attachInvoices($payment, $payment_hash);
|
|
||||||
// $payment->service()->updateInvoicePayment($payment_hash);
|
|
||||||
|
|
||||||
// event(new PaymentWasCreated($payment, $payment->company, Ninja::eventVars()));
|
|
||||||
|
|
||||||
$vars = [
|
$vars = [
|
||||||
'hashed_ids' => $invoice->hashed_id,
|
'hashed_ids' => $invoice->hashed_id,
|
||||||
'amount' => $amount,
|
'amount' => $amount,
|
||||||
@ -212,8 +191,7 @@ class AuthorizeCreditCard
|
|||||||
|
|
||||||
private function processFailedResponse($data, $request)
|
private function processFailedResponse($data, $request)
|
||||||
{
|
{
|
||||||
//dd($data);
|
throw new \Exception(ctrans('texts.error_title'));
|
||||||
// nlog(print_r($data, 1));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function formatGatewayResponse($data, $vars)
|
private function formatGatewayResponse($data, $vars)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user