mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Update AuthorizeCreditCard.php
This commit is contained in:
parent
63c0363f19
commit
26966090a4
@ -211,12 +211,20 @@ class AuthorizeCreditCard
|
||||
{
|
||||
$response = $data['response'];
|
||||
|
||||
$code = '';
|
||||
$description = '';
|
||||
|
||||
if($response->getTransactionResponse()->getMessages() !== null){
|
||||
$code = $response->getTransactionResponse()->getMessages()[0]->getCode();
|
||||
$description = $response->getTransactionResponse()->getMessages()[0]->getDescription();
|
||||
}
|
||||
|
||||
return [
|
||||
'transaction_reference' => $response->getTransactionResponse()->getTransId(),
|
||||
'amount' => $vars['amount'],
|
||||
'auth_code' => $response->getTransactionResponse()->getAuthCode(),
|
||||
'code' => $response->getTransactionResponse()->getMessages()[0]->getCode(),
|
||||
'description' => $response->getTransactionResponse()->getMessages()[0]->getDescription(),
|
||||
'code' => $code,
|
||||
'description' => $description,
|
||||
'invoices' => $vars['invoices'],
|
||||
];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user